Skip to content

Commit d3efc8e

Browse files
matosattiavikivity
authored andcommitted
KVM: use vcpu_id instead of bsp_vcpu pointer in kvm_vcpu_is_bsp
Change kvm_vcpu_is_bsp to use vcpu_id instead of bsp_vcpu pointer, which is only initialized at the end of kvm_vm_ioctl_create_vcpu. Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 2023a29 commit d3efc8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ static inline void kvm_irqfd_release(struct kvm *kvm) {}
538538
#ifdef CONFIG_KVM_APIC_ARCHITECTURE
539539
static inline bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
540540
{
541-
return vcpu->kvm->bsp_vcpu == vcpu;
541+
return vcpu->kvm->bsp_vcpu_id == vcpu->vcpu_id;
542542
}
543543
#endif
544544
#endif

0 commit comments

Comments
 (0)