Qing He
2009-Apr-15 13:40 UTC
[Xen-devel] [PATCH] ioemu: fix INTx disable bit in MSI-INTx translation
Fix the bug introduced in commit 8c771eb6: when msi-intx translation is enabled, int disable bit in PCI_COMMAND is set. This approach has two issues: 1. for some (buggy) devices, set INTx bit will also disable MSI so that MSI doesn''t work any more. 2. it''s never re-enabled when msi translation is turned off. If the guest uses INTx, it can''t receive any interrupts from then. This patch leaves INTx disable bit unset if MSI-INTx translation is used. Signed-off-by: Qing He <qing.he@intel.com> --- diff --git a/hw/pass-through.c b/hw/pass-through.c index 95b4a47..d16f177 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -3769,9 +3769,11 @@ static struct pt_dev * register_real_device(PCIBus *e_bus, /* setup MSI-INTx translation if support */ rc = pt_enable_msi_translate(assigned_device); + if (rc == 0) + goto out; /* bind machine_irq to device */ - if (rc < 0 && machine_irq != 0) + if (machine_irq != 0) { e_device = (assigned_device->dev.devfn >> 3) & 0x1f; /* fix virtual interrupt pin to INTA# */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yuji Shimada
2009-Apr-16 08:44 UTC
Re: [Xen-devel] [PATCH] ioemu: fix INTx disable bit in MSI-INTx translation
On Wed, 15 Apr 2009 21:40:52 +0800 Qing He <qing.he@intel.com> wrote:> Fix the bug introduced in commit 8c771eb6: when msi-intx > translation is enabled, int disable bit in PCI_COMMAND is set. > This approach has two issues: > 1. for some (buggy) devices, set INTx bit will also disable > MSI so that MSI doesn''t work any more. > 2. it''s never re-enabled when msi translation is turned off. > If the guest uses INTx, it can''t receive any interrupts > from then. > > This patch leaves INTx disable bit unset if MSI-INTx translation > is used.I have sent the patch to fix the issue that you pointed out. The following patch is. http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00300.html The patch has already applied in commit 290b6d18585c887ff2cfa30b239aa2fecfcd0308. Your changeset seem to be old. Could you test the latest qemu-xen? Thanks, -- Yuji Shimada _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Qing He
2009-Apr-16 09:01 UTC
Re: [Xen-devel] [PATCH] ioemu: fix INTx disable bit in MSI-INTx translation
On Thu, 2009-04-16 at 16:44 +0800, Yuji Shimada wrote:> On Wed, 15 Apr 2009 21:40:52 +0800 > Qing He <qing.he@intel.com> wrote: > > > Fix the bug introduced in commit 8c771eb6: when msi-intx > > translation is enabled, int disable bit in PCI_COMMAND is set. > > This approach has two issues: > > 1. for some (buggy) devices, set INTx bit will also disable > > MSI so that MSI doesn''t work any more. > > 2. it''s never re-enabled when msi translation is turned off. > > If the guest uses INTx, it can''t receive any interrupts > > from then. > > > > This patch leaves INTx disable bit unset if MSI-INTx translation > > is used. > > I have sent the patch to fix the issue that you pointed out. > > The following patch is. > http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00300.html > > The patch has already applied in commit 290b6d18585c887ff2cfa30b239aa2fecfcd0308.Seems I didn''t notice that. I''ll have a look. Thanks, Qing> > Your changeset seem to be old. > Could you test the latest qemu-xen? > > Thanks, > -- > Yuji Shimada >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel