Skip to contentSkip to conversation

Question about unbind MSI in xen_pt_msi.c

Qemu-devel Julien Grall 2 participants 5 messages Apr 1, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

I'm looking to replace any call to xc_domain_bind_pt_irq and xc_domain_unbind_pt_irq by specific IRQ type helpers.

I found one strange call which will always fail in xen_pt_msix_update_remap. The function xc_domain_unbind_pt_irq is called with PT_IRQ_TYPE_MSI which is not supported by the function.

I'm not familiar with x86 passthrough but this looks wrong to me. Am I right? Shouldn't we replace this call by xc_domain_unbind_msi_irq?

Regards,

Signature · 1 line
Julien Grall
#1 lore raw
Quoted 11 lines · Julien Grall

Hi,

I'm looking to replace any call to xc_domain_bind_pt_irq and xc_domain_unbind_pt_irq by specific IRQ type helpers.

I found one strange call which will always fail in xen_pt_msix_update_remap. The function xc_domain_unbind_pt_irq is called with PT_IRQ_TYPE_MSI which is not supported by the function.

I'm not familiar with x86 passthrough but this looks wrong to me. Am I right? Shouldn't we replace this call by xc_domain_unbind_msi_irq?

I think that nobody noticed because xen_pt_msix_update_remap is only called by xen_pt_region_add at assignement time, when pirq is XEN_PT_UNASSIGNED_PIRQ, therefore xc_domain_unbind_pt_irq is not actually called.

Yes, I think it should be xc_domain_unbind_msi_irq.

#2 lore raw
In reply to Julien Grall
Quoted 11 lines · Julien Grall

Hi,

I'm looking to replace any call to xc_domain_bind_pt_irq and xc_domain_unbind_pt_irq by specific IRQ type helpers.

I found one strange call which will always fail in xen_pt_msix_update_remap. The function xc_domain_unbind_pt_irq is called with PT_IRQ_TYPE_MSI which is not supported by the function.

I'm not familiar with x86 passthrough but this looks wrong to me. Am I right? Shouldn't we replace this call by xc_domain_unbind_msi_irq?

I think that nobody noticed because xen_pt_msix_update_remap is only called by xen_pt_region_add at assignement time, when pirq is XEN_PT_UNASSIGNED_PIRQ, therefore xc_domain_unbind_pt_irq is not actually called.

Yes, I think it should be xc_domain_unbind_msi_irq.

#3 lore raw

Hi,

Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Julien Grall

Hi,

I'm looking to replace any call to xc_domain_bind_pt_irq and xc_domain_unbind_pt_irq by specific IRQ type helpers.

I found one strange call which will always fail in xen_pt_msix_update_remap. The function xc_domain_unbind_pt_irq is called with PT_IRQ_TYPE_MSI which is not supported by the function.

Quoted 7 lines
Quoted 2 lines

I'm not familiar with x86 passthrough but this looks wrong to me. Am I right? Shouldn't we replace this call by xc_domain_unbind_msi_irq?

I think that nobody noticed because xen_pt_msix_update_remap is only called by xen_pt_region_add at assignement time, when pirq is XEN_PT_UNASSIGNED_PIRQ, therefore xc_domain_unbind_pt_irq is not actually called.

Right. I think it would be possible to hit the problem if the guest decide to relocate the BAR.

Quoted 1 line

Yes, I think it should be xc_domain_unbind_msi_irq.

I don't have any x86 platform. Can someone take this item?

Otherwise I will do a blind port.

Regards,

Signature · 1 line
Julien Grall
#4 lore raw
In reply to Stefano Stabellini

Hi,

Quoted 10 lines · Stefano Stabellini
Quoted 9 lines · Julien Grall

Hi,

I'm looking to replace any call to xc_domain_bind_pt_irq and xc_domain_unbind_pt_irq by specific IRQ type helpers.

I found one strange call which will always fail in xen_pt_msix_update_remap. The function xc_domain_unbind_pt_irq is called with PT_IRQ_TYPE_MSI which is not supported by the function.

Quoted 7 lines
Quoted 2 lines

I'm not familiar with x86 passthrough but this looks wrong to me. Am I right? Shouldn't we replace this call by xc_domain_unbind_msi_irq?

I think that nobody noticed because xen_pt_msix_update_remap is only called by xen_pt_region_add at assignement time, when pirq is XEN_PT_UNASSIGNED_PIRQ, therefore xc_domain_unbind_pt_irq is not actually called.

Right. I think it would be possible to hit the problem if the guest decide to relocate the BAR.

Quoted 1 line

Yes, I think it should be xc_domain_unbind_msi_irq.

I don't have any x86 platform. Can someone take this item?

Otherwise I will do a blind port.

Regards,

Signature · 1 line
Julien Grall