]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Add save/restore support for firmware workaround state
authorAndre Przywara <andre.przywara@arm.com>
Fri, 3 May 2019 14:27:49 +0000 (15:27 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 5 Jul 2019 12:56:27 +0000 (13:56 +0100)
commit6340339d6e21b55230c698317bf09fa6fd4b5226
tree8ab57ed170e6851704686ce05fe28cbd2fd63277
parent4abc73ed1ee345d2c53d27510f606e9431e6cff5
KVM: arm/arm64: Add save/restore support for firmware workaround state

KVM implements the firmware interface for mitigating cache speculation
vulnerabilities. Guests may use this interface to ensure mitigation is
active.
If we want to migrate such a guest to a host with a different support
level for those workarounds, migration might need to fail, to ensure that
critical guests don't loose their protection.

Introduce a way for userland to save and restore the workarounds state.
On restoring we do checks that make sure we don't downgrade our
mitigation level.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_emulate.h
arch/arm/include/uapi/asm/kvm.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/uapi/asm/kvm.h
virt/kvm/arm/psci.c