diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 6237623a4c..da657187bc 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -395,7 +395,7 @@ void vmx_pi_hooks_deassign(struct domain *d) * when guest changes MSI/MSI-X information. */ static int cf_check vmx_pi_update_irte(const struct vcpu *v, - const struct pirq *pirq, uint8_t gvec) + const struct pirq *pirq) { const struct pi_desc *pi_desc = v ? &v->arch.hvm.vmx.pi_desc : NULL; struct irq_desc *desc; @@ -414,7 +414,7 @@ static int cf_check vmx_pi_update_irte(const struct vcpu *v, goto unlock_out; } msi_desc->pi_desc = pi_desc; - msi_desc->gvec = gvec; + msi_desc->gvec = pi_desc ? pirq_dpci(pirq)->gmsi.gvec : 0; msg = msi_desc->msg; spin_unlock_irq(&desc->lock); diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h index 16383e1084..9bf2064925 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -220,8 +220,7 @@ struct hvm_function_table { void (*sync_pir_to_irr)(struct vcpu *v); bool (*test_pir)(const struct vcpu *v, uint8_t vector); void (*handle_eoi)(uint8_t vector, int isr); - int (*pi_update_irte)(const struct vcpu *v, const struct pirq *pirq, - uint8_t gvec); + int (*pi_update_irte)(const struct vcpu *v, const struct pirq *pirq); void (*update_vlapic_mode)(struct vcpu *v); /*Walk nested p2m */ @@ -835,9 +834,9 @@ static inline void hvm_set_nonreg_state(struct vcpu *v, } static inline int hvm_pi_update_irte(const struct vcpu *v, - const struct pirq *pirq, uint8_t gvec) + const struct pirq *pirq) { - return alternative_call(hvm_funcs.pi_update_irte, v, pirq, gvec); + return alternative_call(hvm_funcs.pi_update_irte, v, pirq); } static inline void hvm_update_vlapic_mode(struct vcpu *v) diff --git a/xen/drivers/passthrough/x86/hvm.c b/xen/drivers/passthrough/x86/hvm.c index 67486b99bd..aa3bcd4cf4 100644 --- a/xen/drivers/passthrough/x86/hvm.c +++ b/xen/drivers/passthrough/x86/hvm.c @@ -388,7 +388,7 @@ int pt_irq_create_bind( /* Use interrupt posting if it is supported. */ if ( iommu_intpost ) { - rc = hvm_pi_update_irte(vcpu, info, pirq_dpci->gmsi.gvec); + rc = hvm_pi_update_irte(vcpu, info); if ( rc ) { @@ -689,7 +689,7 @@ int pt_irq_destroy_bind( what = "bogus"; } else if ( pirq_dpci && pirq_dpci->gmsi.posted ) - hvm_pi_update_irte(NULL, pirq, 0); + hvm_pi_update_irte(NULL, pirq); if ( pirq_dpci && (pirq_dpci->flags & HVM_IRQ_DPCI_MAPPED) && list_empty(&pirq_dpci->digl_list) )