Skip to contentSkip to conversation

qemu-kvm: Don't break device assignment INTx

PATCH Superseded Alex Williamson 2 participants 2 messages Mar 23, 2011 – Mar 24, 2011 KVM

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-kvm: Don't break device assignment INTx

Commit 1a836445 moved pci.o from a target object to a generic hardware object, which drops CONFIG_KVM_DEVICE_ASSIGNMENT. This results in the device assignment kludge to update INTx vectors on interrupt routing changes never getting called, which means device assignment level triggered interrupts don't work. This mostly reverts that commit, but makes pci.o conditional on CONFIG_PCI, which hopefully addresses the original intent of the change. Fixes:

https://bugs.launchpad.net/qemu/+bug/730441

---

 Makefile.objs   |    2 +-
 Makefile.target |    1 +
 hw/pci.c        |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
Makefile.objs +1 -1
index d1a2264..6080db0 100644
@@ -172,7 +172,7 @@ hw-obj-y =
 hw-obj-y += loader.o
 hw-obj-$(CONFIG_VIRTIO) += virtio.o virtio-console.o
 hw-obj-y += fw_cfg.o
-hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
+hw-obj-$(CONFIG_PCI) += pci_bridge.o
 hw-obj-$(CONFIG_PCI) += msix.o msi.o
 hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
 hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
Makefile.target +1 -0
index fdbdc6c..95597e7 100644
@@ -199,6 +199,7 @@ obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o vl.o balloon.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-$(CONFIG_NO_PCI) += pci-stub.o
+obj-$(CONFIG_PCI) += pci.o
 obj-$(CONFIG_VIRTIO) += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
 obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
 obj-y += vhost_net.o
hw/pci.c +1 -1
index 730df5f..51bf98d 100644
@@ -29,8 +29,8 @@
 #include "net.h"
 #include "sysemu.h"
 #include "loader.h"
+#include "qemu-kvm.h"
 #include "hw/pc.h"
-#include "kvm.h"
 #include "device-assignment.h"
 #include "qemu-objects.h"
 #include "range.h"
#1 lore raw
Quoted 7 lines · Alex Williamson

Commit 1a836445 moved pci.o from a target object to a generic hardware object, which drops CONFIG_KVM_DEVICE_ASSIGNMENT. This results in the device assignment kludge to update INTx vectors on interrupt routing changes never getting called, which means device assignment level triggered interrupts don't work. This mostly reverts that commit, but makes pci.o conditional on CONFIG_PCI, which hopefully addresses the original intent of the change. Fixes:

What a mess - but a still required one.

Quoted 42 lines

https://bugs.launchpad.net/qemu/+bug/730441

---

 Makefile.objs   |    2 +-
 Makefile.target |    1 +
 hw/pci.c        |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
Makefile.objs +1 -1
index d1a2264..6080db0 100644
@@ -172,7 +172,7 @@ hw-obj-y =
 hw-obj-y += loader.o
 hw-obj-$(CONFIG_VIRTIO) += virtio.o virtio-console.o
 hw-obj-y += fw_cfg.o
-hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
+hw-obj-$(CONFIG_PCI) += pci_bridge.o
 hw-obj-$(CONFIG_PCI) += msix.o msi.o
 hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
 hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
Makefile.target +1 -0
index fdbdc6c..95597e7 100644
@@ -199,6 +199,7 @@ obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o vl.o balloon.o
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 obj-$(CONFIG_NO_PCI) += pci-stub.o
+obj-$(CONFIG_PCI) += pci.o
 obj-$(CONFIG_VIRTIO) += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
 obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
 obj-y += vhost_net.o
hw/pci.c +0 -0
index 730df5f..51bf98d 100644

hw/pci.c line 36

Quoted 9 lines
hw/pci.c +1 -1
@@ -29,8 +29,8 @@
 #include "net.h"
 #include "sysemu.h"
 #include "loader.h"
+#include "qemu-kvm.h"
 #include "hw/pc.h"
-#include "kvm.h"
 #include "device-assignment.h"
 #include "qemu-objects.h"
 #include "range.h"

However, this hunk remains obsolete (kvm.h includes qemu-kvm.h), just drop it.

Jan