Skip to content

Commit 1ba11da

Browse files
shaoqinhMarc Zyngier
authored andcommitted
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
1 parent 6eaae19 commit 1ba11da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
462462
vcpu_ptrauth_disable(vcpu);
463463
kvm_arch_vcpu_load_debug_state_flags(vcpu);
464464

465-
if (!cpumask_test_cpu(smp_processor_id(), vcpu->kvm->arch.supported_cpus))
465+
if (!cpumask_test_cpu(cpu, vcpu->kvm->arch.supported_cpus))
466466
vcpu_set_on_unsupported_cpu(vcpu);
467467
}
468468

0 commit comments

Comments
 (0)