]> git.baikalelectronics.ru Git - kernel.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)
commit1860825fe234a55a0aa012556f195a16ba475d60
treebc443010e3993eb477128be3d1e5eefeae9ed408
parent369cfa19778871ec623c6c7318b972a6391ec4ee
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