summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/arm.c
diff options
context:
space:
mode:
authorShaoqin Huang <shahuang@redhat.com>2023-07-27 05:07:54 -0400
committerMarc Zyngier <maz@kernel.org>2023-07-28 09:50:08 +0100
commit1ba11daef0a9b062e40b5393d285c82ab6483730 (patch)
treec30b6d302368fa79f1e8e3686a3bf26dbc2fc33e /arch/arm64/kvm/arm.c
parent6eaae198076080886b9e7d57f4ae06fa782f90ef (diff)
KVM: arm64: Use the known cpu id instead of smp_processor_id()
In kvm_arch_vcpu_load(), it has the parameter cpu which is the value of smp_processor_id(), so no need to get it again. Simply replace it. Signed-off-by: Shaoqin Huang <shahuang@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230727090754.1900310-1-shahuang@redhat.com
Diffstat (limited to 'arch/arm64/kvm/arm.c')
-rw-r--r--arch/arm64/kvm/arm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 72dc53a75d1c..3c015bdd35ee 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -462,7 +462,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
vcpu_ptrauth_disable(vcpu);
kvm_arch_vcpu_load_debug_state_flags(vcpu);
- if (!cpumask_test_cpu(smp_processor_id(), vcpu->kvm->arch.supported_cpus))
+ if (!cpumask_test_cpu(cpu, vcpu->kvm->arch.supported_cpus))
vcpu_set_on_unsupported_cpu(vcpu);
}