|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 6/6] x86/HVM: drop vector parameter from .pi_update_irte() hook
It's redundant with the struct pirq * being passed, and the vector field
in struct msi_desc wanting to be cleared can be derived from v (and hence
pi_desc) being NULL.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- 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
* 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(c
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);
--- 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(
}
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)
--- 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 )
{
@@ -686,7 +686,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) )
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |