]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Add ARCH_WORKAROUND_2 support for guests
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 29 May 2018 12:11:16 +0000 (13:11 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 31 May 2018 17:00:55 +0000 (18:00 +0100)
commit369cfa19778871ec623c6c7318b972a6391ec4ee
tree958684771ff102d79d40080b685d6db6af6e272e
parent77827e515025767ab3c06d8eae4d82f7435b9dc9
arm64: KVM: Add ARCH_WORKAROUND_2 support for guests

In order to offer ARCH_WORKAROUND_2 support to guests, we need
a bit of infrastructure.

Let's add a flag indicating whether or not the guest uses
SSBD mitigation. Depending on the state of this flag, allow
KVM to disable ARCH_WORKAROUND_2 before entering the guest,
and enable it when exiting it.

Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/kvm_mmu.h
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/hyp/switch.c
virt/kvm/arm/arm.c