]> asedeno.scripts.mit.edu Git - linux.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)
commit55e3748e8902ff641e334226bdcb432f9a5d78d3
tree958684771ff102d79d40080b685d6db6af6e272e
parent85478bab409171de501b719971fd25a3d5d639f9
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