Skip to content

Commit

Permalink
KVM: VMX: Use vcpu_to_pi_desc() uniformly in posted_intr.c
Browse files Browse the repository at this point in the history
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 <yuan.yao@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-Id: <ee7be7832bc424546fd4f05015a844a0205b5ba2.1646422845.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Yuan Yao authored and Paolo Bonzini committed May 2, 2022
1 parent f502cc5 commit c180269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/vmx/posted_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c180269

Please sign in to comment.