diff options
author | Marc Zyngier <maz@kernel.org> | 2020-12-03 20:12:24 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-03 20:12:24 +0100 |
commit | f86e54653e67171a7cc0f85e0fe5766deb310e03 (patch) | |
tree | b2be5165cb614be0199c71f703a27b1019481428 /arch/arm64/kvm/arm.c | |
parent | Merge branch 'kvm-arm64/misc-5.11' into kvmarm-master/next (diff) | |
parent | KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV3=1 if the CPUs are Meltdown-safe (diff) | |
download | linux-f86e54653e67171a7cc0f85e0fe5766deb310e03.tar.xz linux-f86e54653e67171a7cc0f85e0fe5766deb310e03.zip |
Merge remote-tracking branch 'origin/kvm-arm64/csv3' into kvmarm-master/queue
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/arm.c')
-rw-r--r-- | arch/arm64/kvm/arm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index f60f4a5e1a22..7e86207fa2fc 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -101,7 +101,7 @@ static int kvm_arm_default_max_vcpus(void) return vgic_present ? kvm_vgic_get_max_vcpus() : KVM_MAX_VCPUS; } -static void set_default_csv2(struct kvm *kvm) +static void set_default_spectre(struct kvm *kvm) { /* * The default is to expose CSV2 == 1 if the HW isn't affected. @@ -113,6 +113,8 @@ static void set_default_csv2(struct kvm *kvm) */ if (arm64_get_spectre_v2_state() == SPECTRE_UNAFFECTED) kvm->arch.pfr0_csv2 = 1; + if (arm64_get_meltdown_state() == SPECTRE_UNAFFECTED) + kvm->arch.pfr0_csv3 = 1; } /** @@ -140,7 +142,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) /* The maximum number of VCPUs is limited by the host's GIC model */ kvm->arch.max_vcpus = kvm_arm_default_max_vcpus(); - set_default_csv2(kvm); + set_default_spectre(kvm); return ret; out_free_stage2_pgd: |