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)
commit99adb567632b656a4a54a90adb2172cc725b6896
tree8ab57ed170e6851704686ce05fe28cbd2fd63277
parentc118bbb52743df70e6297671606c1c08edc659fe
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