Skip to contentSkip to conversation

KVM: arm64: Use the known cpu id instead of smp_processor_id()

PATCH Applied Shaoqin Huang 2 participants 2 messages Jul 27, 2023 – Jul 28, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/arm64/kvm/arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/arm.c +1 -1
index c2c14059f6a8..2e5d8f4b902b 100644
@@ -457,7 +457,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);
 }
 
Signature · 1 line
2.39.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Shaoqin Huang

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.

Applied to next, thanks!

[1/1] KVM: arm64: Use the known cpu id instead of smp_processor_id()

      commit: 1ba11daef0a9b062e40b5393d285c82ab6483730

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.