From: Shaoqin Huang Date: Thu, 27 Jul 2023 09:07:54 +0000 (-0400) Subject: KVM: arm64: Use the known cpu id instead of smp_processor_id() X-Git-Tag: v6.6.17~3972^2~9^2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ba11daef0a9b062e40b5393d285c82ab6483730;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230727090754.1900310-1-shahuang@redhat.com --- diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index 72dc53a7..3c015bd 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); }