From da9fbe76a0639c529f9678aabcc052dfe4cd9cc4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 11 Jul 2012 12:21:23 +0200 Subject: fix info qtree indention Without the patch bus properties are are not in line with the other properties: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] With the patch applied everything is lined up properly: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] Needed to make the autotest qtree parser happy. Signed-off-by: Gerd Hoffmann --- hw/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 018b386..33b7f79 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -543,7 +543,7 @@ static void qdev_print(Monitor *mon, DeviceState *dev, int indent) qdev_print_props(mon, dev, DEVICE_CLASS(class)->props, indent); class = object_class_get_parent(class); } while (class != object_class_by_name(TYPE_DEVICE)); - bus_print_dev(dev->parent_bus, mon, dev, indent + 2); + bus_print_dev(dev->parent_bus, mon, dev, indent); QLIST_FOREACH(child, &dev->child_bus, sibling) { qbus_print(mon, child, indent); } -- cgit v1.1 From c3ebd3ba786e1be5449527e47001eded6b59322b Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 30 Aug 2012 20:30:00 +0200 Subject: kvm: i386: Add classic PCI device assignment This adds PCI device assignment for i386 targets using the classic KVM interfaces. This version is 100% identical to what is being maintained in qemu-kvm for several years and is supported by libvirt as well. It is expected to remain relevant for another couple of years until kernels without full-features and performance-wise equivalent VFIO support are obsolete. A refactoring to-do that should be done in-tree is to model MSI and MSI-X support via the generic PCI layer, similar to what VFIO is already doing for MSI-X. This should improve the correctness and clean up the code from duplicate logic. Signed-off-by: Jan Kiszka Acked-by: Acked-by: Michael S. Tsirkin Signed-off-by: Avi Kivity --- hw/qdev-monitor.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 33b7f79..479eecd 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -44,6 +44,7 @@ static const QDevAlias qdev_alias_table[] = { { "virtio-serial-s390", "virtio-serial", QEMU_ARCH_S390X }, { "lsi53c895a", "lsi" }, { "ich9-ahci", "ahci" }, + { "kvm-pci-assign", "pci-assign" }, { } }; -- cgit v1.1 From e912c96f7d2e5ccd8a6352ee74f5beee2a7d9976 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Thu, 29 Nov 2012 07:46:23 -0600 Subject: qdev: relax bus type check in qdev_device_add() (v2) We are currently checking for an exact type match. Use QOM dynamic_cast to check for a compatible type instead. Cc: Konrad Frederic Cc: Peter Maydell Signed-off-by: Anthony Liguori --- v1 -> v2: - also add cast to qbus_find_recursive (Peter) - simplify by doing object_dynamic_cast instead of messing with classes --- hw/qdev-monitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 479eecd..a1b4d6a 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -289,8 +289,7 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name, if (name && (strcmp(bus->name, name) != 0)) { match = 0; } - if (bus_typename && - (strcmp(object_get_typename(OBJECT(bus)), bus_typename) != 0)) { + if (bus_typename && !object_dynamic_cast(OBJECT(bus), bus_typename)) { match = 0; } if (match) { @@ -435,7 +434,7 @@ DeviceState *qdev_device_add(QemuOpts *opts) if (!bus) { return NULL; } - if (strcmp(object_get_typename(OBJECT(bus)), k->bus_type) != 0) { + if (!object_dynamic_cast(OBJECT(bus), k->bus_type)) { qerror_report(QERR_BAD_BUS_FOR_DEVICE, driver, object_get_typename(OBJECT(bus))); return NULL; -- cgit v1.1 From 077805fa92b9089137c6b6b196d449ee05cc342f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 25 Sep 2012 10:04:17 +0200 Subject: janitor: do not rely on indirect inclusions of or from qemu-char.h Various header files rely on qemu-char.h including qemu-config.h or main-loop.h, but they really do not need qemu-char.h at all (particularly interesting is the case of the block layer!). Clean this up, and also add missing inclusions of qemu-char.h itself. Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index a1b4d6a..5aaf74b 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -21,6 +21,7 @@ #include "monitor.h" #include "qmp-commands.h" #include "arch_init.h" +#include "qemu-config.h" /* * Aliases were a bad idea from the start. Let's keep them -- cgit v1.1 From 83c9089e73b81c69dc1ecdf859fa84d2c500fb5f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Dec 2012 18:19:49 +0100 Subject: monitor: move include files to include/monitor/ Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 5aaf74b..207282c 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -18,7 +18,7 @@ */ #include "qdev.h" -#include "monitor.h" +#include "monitor/monitor.h" #include "qmp-commands.h" #include "arch_init.h" #include "qemu-config.h" -- cgit v1.1 From 1de7afc984b49af164e2619e6850b9732b173b34 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Dec 2012 18:20:00 +0100 Subject: misc: move include files to include/qemu/ Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 207282c..1c6712e 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -21,7 +21,7 @@ #include "monitor/monitor.h" #include "qmp-commands.h" #include "arch_init.h" -#include "qemu-config.h" +#include "qemu/config-file.h" /* * Aliases were a bad idea from the start. Let's keep them -- cgit v1.1 From 9c17d615a66ebd655871bf891ec0fe901ad8b332 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Dec 2012 18:20:04 +0100 Subject: softmmu: move include files to include/sysemu/ Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/qdev-monitor.c') diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 1c6712e..b739867 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -20,7 +20,7 @@ #include "qdev.h" #include "monitor/monitor.h" #include "qmp-commands.h" -#include "arch_init.h" +#include "sysemu/arch_init.h" #include "qemu/config-file.h" /* -- cgit v1.1