From: Yuan Yao Date: Fri, 4 Mar 2022 19:49:33 +0000 (-0800) Subject: KVM: VMX: Use vcpu_to_pi_desc() uniformly in posted_intr.c X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c180269d27bfadc9e79e20c233b06e49c3127732;p=linux.git KVM: VMX: Use vcpu_to_pi_desc() uniformly in posted_intr.c The helper function, vcpu_to_pi_desc(), is defined to get the posted interrupt descriptor from vcpu. There is one place that doesn't use it, and instead references vmx_vcpu->pi_desc directly. Remove the inconsistency. Signed-off-by: Yuan Yao Signed-off-by: Isaku Yamahata Message-Id: Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/vmx/posted_intr.c b/arch/x86/kvm/vmx/posted_intr.c index 3834bb30ce549..37d0bfff269d1 100644 --- a/arch/x86/kvm/vmx/posted_intr.c +++ b/arch/x86/kvm/vmx/posted_intr.c @@ -311,7 +311,7 @@ int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq, continue; } - vcpu_info.pi_desc_addr = __pa(&to_vmx(vcpu)->pi_desc); + vcpu_info.pi_desc_addr = __pa(vcpu_to_pi_desc(vcpu)); vcpu_info.vector = irq.vector; trace_kvm_pi_irte_update(host_irq, vcpu->vcpu_id, e->gsi,