diff options
author | Marc Zyngier <maz@kernel.org> | 2020-11-26 20:27:13 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-11-30 19:02:53 +0300 |
commit | 4f1df628d4ec22b04f67e068e6d02538d3dd557b (patch) | |
tree | da117b4f2caab5247116ef5cb944781e1291ba65 /arch/arm64/include/asm/kvm_host.h | |
parent | 7f43c2014fa03bb8718569ae628acf2089683bff (diff) | |
download | linux-4f1df628d4ec22b04f67e068e6d02538d3dd557b.tar.xz |
KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV3=1 if the CPUs are Meltdown-safe
Cores that predate the introduction of ID_AA64PFR0_EL1.CSV3 to
the ARMv8 architecture have this field set to 0, even of some of
them are not affected by the vulnerability.
The kernel maintains a list of unaffected cores (A53, A55 and a few
others) so that it doesn't impose an expensive mitigation uncessarily.
As we do for CSV2, let's expose the CSV3 property to guests that run
on HW that is effectively not vulnerable. This can be reset to zero
by writing to the ID register from userspace, ensuring that VMs can
be migrated despite the new property being set.
Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 0cd9f0f75c13..147347028a20 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -120,6 +120,7 @@ struct kvm_arch { unsigned int pmuver; u8 pfr0_csv2; + u8 pfr0_csv3; }; struct kvm_vcpu_fault_info { |