linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
@ 2010-11-19 16:48 Konrad Rzeszutek Wilk
  2010-11-23 12:36 ` Stefano Stabellini
  0 siblings, 1 reply; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2010-11-19 16:48 UTC (permalink / raw)
  To: linux-kernel, stefano.stabellini
  Cc: Jeremy.Fitzhardinge, xen-devel, Konrad Rzeszutek Wilk

When we allocate a vector for MSI/MSI-X we save away the PIRQ, and the
vector value. When we unmap (de-allocate) the MSI/MSI-X vector(s) we
need to provide the PIRQ and the vector value. What we did instead
was to provide the GSI (which was zero) and the vector value, and we
got these unhappy error messages:

(XEN) irq.c:1575: dom0: pirq 0 not mapped
[    7.733415] unmap irq failed -22

This patches fixes this and we use the PIRQ value instead of the GSI
value.

CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

P.S.
Stefano, I've tested this on domain zero. The path on PVonHVM looks correct,
but I would appreciate you taking a look at this.
---
 drivers/xen/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 321a0c8..7eb720b 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -752,7 +752,7 @@ int xen_destroy_irq(int irq)
 		goto out;
 
 	if (xen_initial_domain()) {
-		unmap_irq.pirq = info->u.pirq.gsi;
+		unmap_irq.pirq = info->u.pirq.pirq;
 		unmap_irq.domid = DOMID_SELF;
 		rc = HYPERVISOR_physdev_op(PHYSDEVOP_unmap_pirq, &unmap_irq);
 		if (rc) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
  2010-11-19 16:48 [PATCH] xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs Konrad Rzeszutek Wilk
@ 2010-11-23 12:36 ` Stefano Stabellini
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Stabellini @ 2010-11-23 12:36 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: linux-kernel, Stefano Stabellini, Jeremy Fitzhardinge, xen-devel

On Fri, 19 Nov 2010, Konrad Rzeszutek Wilk wrote:
> When we allocate a vector for MSI/MSI-X we save away the PIRQ, and the
> vector value. When we unmap (de-allocate) the MSI/MSI-X vector(s) we
> need to provide the PIRQ and the vector value. What we did instead
> was to provide the GSI (which was zero) and the vector value, and we
> got these unhappy error messages:
> 
> (XEN) irq.c:1575: dom0: pirq 0 not mapped
> [    7.733415] unmap irq failed -22
> 
> This patches fixes this and we use the PIRQ value instead of the GSI
> value.
> 
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> P.S.
> Stefano, I've tested this on domain zero. The path on PVonHVM looks correct,
> but I would appreciate you taking a look at this.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-23 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 16:48 [PATCH] xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs Konrad Rzeszutek Wilk
2010-11-23 12:36 ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).