]> asedeno.scripts.mit.edu Git - linux.git/commit
arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 29 May 2018 12:11:17 +0000 (13:11 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 31 May 2018 17:00:57 +0000 (18:00 +0100)
commitb4f18c063a13dfb33e3a63fe1844823e19c2265e
treebc443010e3993eb477128be3d1e5eefeae9ed408
parent55e3748e8902ff641e334226bdcb432f9a5d78d3
arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests

In order to forward the guest's ARCH_WORKAROUND_2 calls to EL3,
add a small(-ish) sequence to handle it at EL2. Special care must
be taken to track the state of the guest itself by updating the
workaround flags. We also rely on patching to enable calls into
the firmware.

Note that since we need to execute branches, this always executes
after the Spectre-v2 mitigation has been applied.

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/arm64/kernel/asm-offsets.c
arch/arm64/kvm/hyp/hyp-entry.S