|
|
|
|
|
|
|
|
|
|
xen-devel
[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@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] ioemu: fix INTx disable bit in MSI-INTx translation,
Qing He <=
|
|
|
|
|