[Qemu-devel] [PATCH 2/2] qom-test: Test shutdown in addition to startup

2014-01-10 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/qom-test.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qom-test.c b/tests/qom-test.c index 3cbd480..8f42716 100644 --- a/tests/qom-test.c +++ b/tests/qom-test.c @@ -48,17 +48,17 @@ st

[Qemu-devel] [PATCH 0/2] qom-test: Improve coverage

2014-01-10 Thread armbru
From: Markus Armbruster Markus Armbruster (2): qom-test: Run for all available machines qom-test: Test shutdown in addition to startup tests/qom-test.c | 293 ++- 1 file changed, 71 insertions(+), 222 deletions(-) -- 1.8.1.4

[Qemu-devel] [PATCH 1/2] qom-test: Run for all available machines

2014-01-10 Thread armbru
From: Markus Armbruster Get available machines via QMP instead of hardcoding a list that's perpetually out of date. A few machines don't work out of the box: * Several ppcemb machines can't initialize their CPU. * Xen machines can work only when running under the Xen hypervisor. Blacklist the

[Qemu-devel] [PATCH] qdev-monitor: Improve error message for -device nonexistant

2013-12-19 Thread armbru
From: Markus Armbruster Once upon a time, the error message was: qemu: -device nonexistant: "Device "nonexistant" not found. Try -device '?' for a list. But progress marches on, and conversion to QError (commit 0204276) changed it into: Invalid parameter 'driver' Try with argumen

[Qemu-devel] [PATCH 1/2] hw: cannot_instantiate_with_device_add_yet due to pointer props

2013-11-29 Thread armbru
From: Markus Armbruster Pointer properties can be set only by code, not by device_add. A device with a pointer property can work with device_add only when the property may remain null. This is the case for property "interrupt_vector" of device "etraxfs,pic". Add a comment there. Set cannot_in

[Qemu-devel] [PATCH 2/2] qdev: Document that pointer properties kill device_add

2013-11-29 Thread armbru
From: Markus Armbruster Ask users of DEFINE_PROP_PTR() to set cannot_instantiate_with_device_add_yet, or explain why it's not needed. Signed-off-by: Markus Armbruster --- include/hw/qdev-properties.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/hw/qdev-propert

[Qemu-devel] [PATCH 0/2] Pointer properties and device_add

2013-11-29 Thread armbru
From: Markus Armbruster Pointer properties can be set only by code, not by device_add. A device with a pointer property can't work with device_add only unless the property may remain null. cannot_instantiate_with_device_add_yet needs to be set then. PATCH 1/2 sets it when needed and else docum

[Qemu-devel] [PATCH v4 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster A PIIX3/PIIX4 southbridge has multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0, and the SMBus controller at 01.3. The IDE controller at 01.1 (pii

[Qemu-devel] [PATCH v4 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v4 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster Many PCI host bridges consist of a sysbus device and a PCI device. You need both for the thing to work. Arguably, these bridges should be modelled as a single, composite devices instead of pairs of seemingly independent devices you can only use together, but we're not the

[Qemu-devel] [PATCH v4 10/10] qdev: Do not let the user try to device_add when it cannot work

2013-11-28 Thread armbru
From: Markus Armbruster Such devices have always been unavailable and omitted from the list of available devices shown by device_add help. Until commit 18b6dad silently broke the former, setting up nasty traps for unwary users, like this one: $ qemu-system-x86_64 -nodefaults -monitor stdio

[Qemu-devel] [PATCH v4 03/10] cpu: Document why cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- qom/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/cpu.c b/qom/cpu.c index 09c15e6..6e0d54e 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -254,7 +254,11 @@ static void cpu_cl

[Qemu-devel] [PATCH v4 09/10] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc: drop * i8042: drop, even though its I/O base is hardcoded (because you could conceivably still add one to a board that has none), and even though PC board cod

[Qemu-devel] [PATCH v4 02/10] sysbus: Set cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconnected, and could not possibly work. Quite a few, but no

[Qemu-devel] [PATCH v4 06/10] ich9: Document why cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster An ICH9 southbridge contains several PCI devices, some of them with multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_q35_init() to work: the LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3. S

[Qemu-devel] [PATCH v4 08/10] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster A VT82C686B southbridge has multiple functions. We model each function as a separate qdev. One of them need some special wiring set up in mips_fulong2e_init() to work: the ISA bridge at 05.0. The IDE controller at 05.1 (via-ide) has always had cannot_instantiate_with_de

[Qemu-devel] [PATCH v4 00/10] Clean up and fix no_user

2013-11-28 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v4 04/10] apic: Document why cannot_instantiate_with_device_add_yet

2013-11-28 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- hw/intc/apic_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index ea420c7..aaef054 100644 --- a/hw/intc/apic_common.c +++ b/h

[Qemu-devel] [PATCH] qdev-monitor: device_add crashes on non-device driver name, fix

2013-11-28 Thread armbru
From: Markus Armbruster Watch this: $ upstream-qemu -nodefaults -S -display none -monitor stdio QEMU 1.7.50 monitor - type 'help' for more information (qemu) device_add rng-egd /work/armbru/qemu/qdev-monitor.c:491:qdev_device_add: Object 0x2089b00 is not an instan

[Qemu-devel] [PATCH] trace-events: Clean up after removal of old usb-host code

2013-11-25 Thread armbru
From: Markus Armbruster Commit b5613fd neglected to drop the trace events along with the code. Signed-off-by: Markus Armbruster --- trace-events | 13 - 1 file changed, 13 deletions(-) diff --git a/trace-events b/trace-events index 8695e9e..14c7c92 100644 --- a/trace-events +++ b/

[Qemu-devel] [PATCH v2 7/9] ide: Drop redundant IDEState member drive_serial_str

2013-11-20 Thread armbru
From: Markus Armbruster It's a copy of dev->serial. The copy was needed for non-qdevified controllers, which lacked dev. Note that pci_piix3_xen_ide_unplug() did not clear the copy (it only cleared the copy of bs). Begs the question whether stale data could have been used after unplug. As far

[Qemu-devel] [PATCH v2 9/9] ide: Drop redundant IDEState member wwn

2013-11-20 Thread armbru
From: Markus Armbruster It's a copy of dev->wwn. The copy was needed for non-qdevified controllers, which lacked dev. Note that pci_piix3_xen_ide_unplug() did not clear the copy (it only cleared the copy of bs). Begs the question whether stale data could have been used after unplug. As far as

[Qemu-devel] [PATCH v2 2/9] ide: Use IDEState member dev for "device connected" test

2013-11-20 Thread armbru
From: Markus Armbruster Testing dev is more obvious than testing bs, in my opinion. Signed-off-by: Markus Armbruster --- hw/ide/ahci.c | 8 hw/ide/core.c | 56 - hw/ide/microdrive.c | 2 +- hw/ide/qdev.c | 2 +-

[Qemu-devel] [PATCH v2 6/9] ide: Drop redundant IDEState member version

2013-11-20 Thread armbru
From: Markus Armbruster It's a copy of dev->version. The copy was needed for non-qdevified controllers, which lacked dev. Note that pci_piix3_xen_ide_unplug() did not clear the copy (it only cleared the copy of bs). Begs the question whether stale data could have been used after unplug. As fa

[Qemu-devel] [PATCH v2 4/9] ide: Drop redundant IDEState member bs

2013-11-20 Thread armbru
From: Markus Armbruster It's a copy of dev->conf.bs. The copy was needed for non-qdevified controllers, which lacked dev. Note how pci_piix3_xen_ide_unplug() cleared the copy. We'll get back to that in the next few commits. Signed-off-by: Markus Armbruster --- hw/ide/ahci.c | 11 +--

[Qemu-devel] [PATCH v2 5/9] ide: Drop redundant IDEState geometry members

2013-11-20 Thread armbru
From: Markus Armbruster Members cylinders, heads, sectors, chs_trans are copies of dev->conf.cyls, dev->conf.heads, dev->conf.secs, dev->chs_trans. Copies were needed for non-qdevified controllers, which lacked dev. Note that pci_piix3_xen_ide_unplug() did not clear the copies (it only cleared t

[Qemu-devel] [PATCH v2 8/9] ide: Drop redundant IDEState member model

2013-11-20 Thread armbru
From: Markus Armbruster It's a copy of dev->serial. The copy was needed for non-qdevified controllers, which lacked dev. Note that pci_piix3_xen_ide_unplug() did not clear the copy (it only cleared the copy of bs). Begs the question whether stale data could have been used after unplug. As far

[Qemu-devel] [PATCH v2 1/9] ide: Move IDEDevice pointer from IDEBus to IDEState

2013-11-20 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/ide/core.c | 2 +- hw/ide/internal.h | 3 +-- hw/ide/qdev.c | 12 +++- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index e1f4c33..2d382b2 100644 --- a/hw/ide/core

[Qemu-devel] [PATCH v2 3/9] ide: Don't block-align IDEState member smart_selftest_data

2013-11-20 Thread armbru
From: Markus Armbruster All uses are simple array subscripts. Signed-off-by: Markus Armbruster --- hw/ide/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 0022cc5..2ed7cb8 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2164,8

[Qemu-devel] [PATCH v2 0/9] Clean up IDE after completion of qdevification

2013-11-20 Thread armbru
From: Markus Armbruster Obvious cleanups possible since we no longer have the special case of a non-qdevified controller. v2: * Dropped PATCH 1/10 ide: Break all non-qdevified controllers Andreas qdevified them since; thanks! * Series renamed from "Drop code for non-qdevified IDE, and clean up

[Qemu-devel] [PATCH v3 09/10] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc: drop * i8042: drop, even though its I/O base is hardcoded (because you could conceivably still add one to a board that has none), and even though PC board cod

[Qemu-devel] [PATCH v3 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster A PIIX3/PIIX4 southbridge has multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0, and the SMBus controller at 01.3. The IDE controller at 01.1 (pii

[Qemu-devel] [PATCH v3 08/10] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster A VT82C686B southbridge has multiple functions. We model each function as a separate qdev. One of them need some special wiring set up in mips_fulong2e_init() to work: the ISA bridge at 05.0. The IDE controller at 05.1 (via-ide) has always had cannot_instantiate_with_de

[Qemu-devel] [PATCH v3 06/10] ich9: Document why cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster An ICH9 southbridge contains several PCI devices, some of them with multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_q35_init() to work: the LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3. S

[Qemu-devel] [PATCH v3 10/10] qdev: Do not let the user try to device_add when it cannot work

2013-10-30 Thread armbru
From: Markus Armbruster Such devices have always been unavailable and omitted from the list of available devices shown by device_add help. Until commit 18b6dad silently broke the former, setting up nasty traps for unwary users, like this one: $ qemu-system-x86_64 -nodefaults -monitor stdio

[Qemu-devel] [PATCH v3 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster Many PCI host bridges consist of a sysbus device and a PCI device. You need both for the thing to work. Arguably, these bridges should be modelled as a single, composite devices instead of pairs of seemingly independent devices you can only use together, but we're not the

[Qemu-devel] [PATCH v3 04/10] apic: Document why cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- hw/intc/apic_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index ea420c7..aaef054 100644 --- a/hw/intc/apic_common.c +++ b/h

[Qemu-devel] [PATCH v3 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v3 02/10] sysbus: Set cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconnected, and could not possibly work. Quite a few, but no

[Qemu-devel] [PATCH v3 03/10] cpu: Document why cannot_instantiate_with_device_add_yet

2013-10-30 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- qom/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/cpu.c b/qom/cpu.c index 09c15e6..6e0d54e 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -254,7 +254,11 @@ static void cpu_cl

[Qemu-devel] [PATCH v3 00/10] Clean up and fix no_user

2013-10-30 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v3 2/2] smbios: Set system manufacturer, product & version by default

2013-10-30 Thread armbru
From: Markus Armbruster Currently, we get SeaBIOS defaults: manufacturer Bochs, product Bochs, no version. Best SeaBIOS can do, but we can provide better defaults: manufacturer QEMU, product & version taken from QEMUMachine desc and name. Take care to do this only for new machine types, of cour

[Qemu-devel] [PATCH v3 0/2] smbios nicer defaults for DMI type 1 (System)

2013-10-30 Thread armbru
From: Markus Armbruster Currently, we get SeaBIOS defaults: manufacturer Bochs, product Bochs, no version. Best SeaBIOS can do, but we can provide better defaults: manufacturer QEMU, product & version taken from QEMUMachine desc and name. This series used to be called "[PATCH v2 0/7] smbios cle

[Qemu-devel] [PATCH v3 1/2] hw: Pass QEMUMachine to its init() method

2013-10-30 Thread armbru
From: Markus Armbruster Put it in QEMUMachineInitArgs, so I don't have to touch every board. Signed-off-by: Markus Armbruster --- include/hw/boards.h | 7 +-- vl.c| 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards

[Qemu-devel] [PATCH v2 02/10] sysbus: Set cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconnected, and could not possibly work. Quite a few, but no

[Qemu-devel] [PATCH v2 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v2 09/10] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc: drop * i8042: drop, even though its I/O base is hardcoded (because you could conceivably still add one to a board that has none), and even though PC board cod

[Qemu-devel] [PATCH v2 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster A PIIX3/PIIX4 southbridge has multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0, and the SMBus controller at 01.3. The IDE controller at 01.1 (pii

[Qemu-devel] [PATCH v2 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster Many PCI host bridges consist of a sysbus device and a PCI device. You need both for the thing to work. Arguably, these bridges should be modelled as a single, composite devices instead of pairs of seemingly independent devices you can only use together, but we're not the

[Qemu-devel] [PATCH v2 06/10] ich9: Document why cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster An ICH9 southbridge contains several PCI devices, some of them with multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_q35_init() to work: the LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3. S

[Qemu-devel] [PATCH v2 10/10] qdev: Do not let the user try to device_add when it cannot work

2013-10-29 Thread armbru
From: Markus Armbruster Such devices have always been unavailable and omitted from the list of available devices shown by device_add help. Until commit 18b6dad silently broke the former, setting up nasty traps for unwary users, like this one: $ qemu-system-x86_64 -nodefaults -monitor stdio

[Qemu-devel] [PATCH v2 03/10] cpu: Document why cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- qom/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/cpu.c b/qom/cpu.c index 09c15e6..6e0d54e 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -254,7 +254,11 @@ static void cpu_cl

[Qemu-devel] [PATCH v2 04/10] apic: Document why cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell --- hw/intc/apic_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index ea420c7..aaef054 100644 --- a/hw/intc/apic_common.c +++ b/h

[Qemu-devel] [PATCH v2 00/10] Clean up and fix no_user

2013-10-29 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH v2 08/10] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-29 Thread armbru
From: Markus Armbruster A VT82C686B southbridge has multiple functions. We model each function as a separate qdev. One of them need some special wiring set up in mips_fulong2e_init() to work: the ISA bridge at 05.0. The IDE controller at 05.1 (via-ide) has always had cannot_instantiate_with_de

[Qemu-devel] [PATCH 05/10] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster Many PCI host bridges consist of a sysbus device and a PCI device. You need both for the thing to work. Arguably, these bridges should be modelled as a single, composite devices instead of pairs of seemingly independent devices you can only use together, but we're not the

[Qemu-devel] [PATCH 07/10] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster A PIIX3/PIIX4 southbridge has multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0, and the SMBus controller at 01.3. The IDE controller at 01.1 (pii

[Qemu-devel] [PATCH 06/10] ich9: Document why cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster An ICH9 southbridge contains several PCI devices, some of them with multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_q35_init() to work: the LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3. S

[Qemu-devel] [PATCH 10/10] qdev: Do not let the user try to device_add when it cannot work

2013-10-17 Thread armbru
From: Markus Armbruster Such devices have always been unavailable and omitted from the list of available devices shown by device_add help. Until commit 18b6dad silently broke the former, setting up nasty traps for unwary users, like this one: $ qemu-system-x86_64 -nodefaults -monitor stdio

[Qemu-devel] [PATCH 03/10] cpu: Document why cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster --- qom/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/cpu.c b/qom/cpu.c index 09c15e6..6e0d54e 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -254,7 +254,11 @@ static void cpu_class_init(ObjectClass *klass

[Qemu-devel] [PATCH 09/10] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc, port92, i8042, m48t59_isa, mc146818rtc, isa-pit, kvm-pit: drop (from the last two by dropping it from their abstract base pit-common) * pcspk: keep because of

[Qemu-devel] [PATCH 01/10] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH 02/10] sysbus: Set cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconncected, and could not possibly work. Many, but not all

[Qemu-devel] [PATCH 08/10] vt82c686: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster A VT82C686B southbridge has multiple functions. We model each function as a separate qdev. One of them need some special wiring set up in mips_fulong2e_init() to work: the ISA bridge at 05.0. The IDE controller at 05.1 (via-ide) has always had cannot_instantiate_with_de

[Qemu-devel] [PATCH 00/10] Clean up and fix no_user

2013-10-17 Thread armbru
From: Markus Armbruster In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll

[Qemu-devel] [PATCH 04/10] apic: Document why cannot_instantiate_with_device_add_yet

2013-10-17 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/intc/apic_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index ea420c7..aaef054 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -38

[Qemu-devel] [PATCH RFC 7/9] vt82c686: Document why cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster A VT82C686B southbridge has multiple functions. We model each function as a separate qdev. One of them need some special wiring set up in mips_fulong2e_init() to work: the ISA bridge at 05.0. Additionally, the IDE controller at 05.1 has always had cannot_instantiate_wit

[Qemu-devel] [PATCH RFC 5/9] ich9: Document why cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster An ICH9 southbridge contains several PCI devices, some of them with multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_q35_init() to work: the LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3. S

[Qemu-devel] [PATCH RFC 1/9] qdev: Replace no_user by cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster DeviceClass member no_user used to make device models unavailable with -device / device_add, but that regressed in commit 18b6dad. All that's left is the device model is still omitted from help. Attempts to fix the regression have been rejected with the argument that the

[Qemu-devel] [PATCH RFC 8/9] isa: Clean up use of cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster Drop it when there's no obvious reason why device_add could not work. Else keep and document why. * isa-fdc, port92, i8042, m48t59_isa, mc146818rtc, isa-pit, kvm-pit: drop (the last two by dropping it from their abstract base pit-common) * pcspk: keep because of poin

[Qemu-devel] [PATCH RFC 6/9] piix3 piix4: Document why cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster A PIIX3/PIIX4 southbridge has multiple functions. We model each function as a separate qdev. Two of them need some special wiring set up in pc_init1() or mips_malta_init() to work: the ISA bridge at 01.0, and the SMBus controller at 01.3. Additionally, the IDE controlle

[Qemu-devel] [PATCH RFC 3/9] apic: Document why cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster --- hw/intc/apic_common.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index ea420c7..aaef054 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -38

[Qemu-devel] [PATCH RFC 0/9] Clean up and fix no_user

2013-10-10 Thread armbru
From: Markus Armbruster Note: this series is on top of my "Improve -device command line help some more" series. You can also get it from branch no-user at git://repo.or.cz/qemu/armbru.git In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortun

[Qemu-devel] [PATCH RFC 9/9] qdev: Do not let the user try to device_add when it cannot work

2013-10-10 Thread armbru
From: Markus Armbruster Such devices have always been unavailable and omitted from the list of available devices shown by device_add help. Until commit 18b6dad silently broke the former, setting up nasty traps for unwary users, like this one: $ qemu-system-x86_64 -nodefaults -monitor stdio

[Qemu-devel] [PATCH RFC 4/9] pci-host: Consistently set cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster Many PCI host bridges consist of a sysbus device and a PCI device. You need both for the thing to work. Arguably, these bridges should be modelled as a single, composite devices instead of pairs of seemingly independent devices you can only use together, but we're not the

[Qemu-devel] [PATCH RFC 2/9] sysbus: Set cannot_instantiate_with_device_add_yet

2013-10-10 Thread armbru
From: Markus Armbruster device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconncected, and could not possibly work. Many, but not all

[Qemu-devel] [PATCH 2/2] qdev-monitor: Group "device_add help" and "info qdm" by category

2013-10-10 Thread armbru
From: Markus Armbruster Output is a long, unsorted list. Not very helpful. Print one list per device category instead, with a header line identifying the category, plus a list of uncategorized devices. Print each list in case-insenitive alphabetical order. Devices with multiple categories are

[Qemu-devel] [PATCH 1/2] Mostly revert "qemu-help: Sort devices by logical functionality"

2013-10-10 Thread armbru
From: Markus Armbruster This reverts most of commit 3d1237fb2ab4edb926c717767bb5e31d6053a7c5. The commit claims to sort the output of "-device help" "by functionality rather than alphabetical". Issues: * The output was unsorted before, not alphabetically sorted. Misleading, but harmless enou

[Qemu-devel] [PATCH 0/2] Improve -device command line help some more

2013-10-10 Thread armbru
From: Markus Armbruster Marcel's recent improvements (commit dbd94f8..125ee0e) go in the right direction, but there are issues (see PATCH 1/2), and I find the resulting help output still hard to read. This series redoes the help printing part of Marcel's series. Result looks like this (moxie pi

[Qemu-devel] [PATCH] vl: Clean up unnecessary boot_order complications

2013-10-01 Thread armbru
From: Markus Armbruster Messed up in commit 8281abd. Signed-off-by: Markus Armbruster --- vl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 983cdc6..7e1f408 100644 --- a/vl.c +++ b/vl.c @@ -2825,7 +2825,7 @@ int main(int argc, char **argv, char **

[Qemu-devel] [PATCH v3 1/2] tests: Fix schema parser test for in-tree build

2013-09-24 Thread armbru
From: Markus Armbruster Commit 4f193e3 added the test, but screwed up in-tree builds (SRCDIR=.): the tests's output overwrites the expected output, and is thus compared to itself. Cc: qemu-sta...@nongnu.org Reported-by: Laszlo Ersek Reviewed-by: Andreas Färber Reviewed-by: Laszlo Ersek Signed

[Qemu-devel] [PATCH v3 2/2] tests: Update .gitignore for test-int128 and test-bitops

2013-09-24 Thread armbru
From: Markus Armbruster Forgotten in commit 6046c62 and 3464700. Cc: qemu-sta...@nongnu.org Reviewed-by: Andreas Färber Reviewed-by: Laszlo Ersek Signed-off-by: Markus Armbruster --- tests/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/.gitignore b/tests/.gitignore in

[Qemu-devel] [PATCH v3 0/2] tests: Fixes for in-tree build

2013-09-24 Thread armbru
From: Markus Armbruster Hasn't gotten maintainer attention for two months. Retrying via qemu-trivial. v3: Trivially rebased v2: Nominate for qemu-stable (Andreas) Markus Armbruster (2): tests: Fix schema parser test for in-tree build tests: Update .gitignore for test-int128 and test-bitops

[Qemu-devel] [PATCH] trace-events: Clean up with scripts/cleanup-trace-events.pl again

2013-09-13 Thread armbru
From: Markus Armbruster Event qxl_render_blit_guest_primary_initialized is unused since commit c58c7b9, drop it. Commit 42e5b4c moved hw/ppc/xics.c to hw/intc/xics.c without updating the comment in trace-events. "scripts/cleanup-trace-events.pl trace-events | diff trace-events" is now clean aga

[Qemu-devel] [PATCH] scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial

2013-08-23 Thread armbru
From: Markus Armbruster scsi_bus_legacy_add_drive() creates either a scsi-disk or a scsi-generic device. It sets property "serial" to argument serial unless null. Crashes with scsi-generic, because it doesn't have such the property. Only usb_msd_initfn_storage() passes non-null serial. Reprod

[Qemu-devel] [PATCH v2 0/2] tests: Fixes for in-tree build

2013-08-20 Thread armbru
From: Markus Armbruster v2: Nominate for qemu-stable (Andreas) Markus Armbruster (2): tests: Fix schema parser test for in-tree build tests: Update .gitignore for test-int128 and test-bitops tests/.gitignore | 3 +++ tests/Makefile | 8 2 files changed, 7 insertions(+), 4 deleti

[Qemu-devel] [PATCH v2 2/2] tests: Update .gitignore for test-int128 and test-bitops

2013-08-20 Thread armbru
From: Markus Armbruster Forgotten in commit 6046c62 and 3464700. Cc: qemu-sta...@nongnu.org Reviewed-by: Andreas Färber Signed-off-by: Markus Armbruster --- tests/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/.gitignore b/tests/.gitignore index d9c2ef4..9ac044d 100644

[Qemu-devel] [PATCH v2 1/2] tests: Fix schema parser test for in-tree build

2013-08-20 Thread armbru
From: Markus Armbruster Commit 4f193e3 added the test, but screwed up in-tree builds (SRCDIR=.): the tests's output overwrites the expected output, and is thus compared to itself. Cc: qemu-sta...@nongnu.org Reported-by: Laszlo Ersek Reviewed-by: Andreas Färber Signed-off-by: Markus Armbruster

[Qemu-devel] [PATCH 2/2] tests: Update .gitignore for test-int128 and test-bitops

2013-08-20 Thread armbru
From: Markus Armbruster Forgotten in commit 6046c62 and 3464700. Signed-off-by: Markus Armbruster --- tests/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/.gitignore b/tests/.gitignore index d9c2ef4..9ac044d 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -5,8 +

[Qemu-devel] [PATCH 0/2] tests: Fixes for in-tree build

2013-08-20 Thread armbru
From: Markus Armbruster Markus Armbruster (2): tests: Fix schema parser test for in-tree build tests: Update .gitignore for test-int128 and test-bitops tests/.gitignore | 3 +++ tests/Makefile | 8 2 files changed, 7 insertions(+), 4 deletions(-) -- 1.8.1.4

[Qemu-devel] [PATCH 1/2] tests: Fix schema parser test for in-tree build

2013-08-20 Thread armbru
From: Markus Armbruster Commit 4f193e3 added the test, but screwed up in-tree builds (SRCDIR=.): the tests's output overwrites the expected output, and is thus compared to itself. Reported-by: Laszlo Ersek Signed-off-by: Markus Armbruster --- tests/.gitignore | 1 + tests/Makefile | 8 -

[Qemu-devel] [PATCH 1/1] virtio-scsi: Make type virtio-scsi-common abstract

2013-08-19 Thread armbru
From: Markus Armbruster It's the abstract base of virtio-scsi-device and vhost-scsi. Signed-off-by: Markus Armbruster --- hw/scsi/virtio-scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 05da56b..a9ee17b 100644 --- a/hw/scsi/virtio-s

[Qemu-devel] [PATCH v2 7/7] smbios: Set system manufacturer, product & version by default

2013-08-16 Thread armbru
From: Markus Armbruster Currently, we get SeaBIOS defaults: manufacturer Bochs, product Bochs, no version. Best SeaBIOS can do, but we can provide better defaults: manufacturer QEMU, product & version taken from QEMUMachine desc and name. Take care to do this only for new machine types, of cour

[Qemu-devel] [PATCH v2 0/7] smbios cleanup & nicer defaults for type 1

2013-08-16 Thread armbru
From: Markus Armbruster This gets rid of one of the last get_param_value() users, makes multiple -smbios work sanely, cleans up the gross side effect in qemu_uuid_parse(), and more. Topped off with a little feature in the last patch. v2: Rebase, only last patch had conflicts Markus Armbruster

[Qemu-devel] [PATCH v2 1/7] smbios: Normalize smbios_entry_add()'s error handling to exit(1)

2013-08-16 Thread armbru
From: Markus Armbruster It exits on all error conditions but one, where it returns -1. Normalize, and return void. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- arch_init.c | 4 +--- hw/i386/smbios.c | 10 +- include/hw/i386/smbios.h | 2 +- 3 fil

[Qemu-devel] [PATCH v2 6/7] vl: Set current_machine early

2013-08-16 Thread armbru
From: Markus Armbruster I'd like to access QEMUMachine from a QEMUMachine init() method, which is currently not possible. Instead of passing it as an argument, I simply set current_machine earlier. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- vl.c | 3 +-- 1 file changed, 1 i

[Qemu-devel] [PATCH v2 5/7] smbios: Factor out smbios_maybe_add_str()

2013-08-16 Thread armbru
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- hw/i386/smbios.c | 61 +++- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c index fb1b27b..a2eb9bf 100644

[Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely

2013-08-16 Thread armbru
From: Markus Armbruster Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with value VAL to fw_cfg for each unique NAME. If NAME occurs multiple times, the last one's VAL is used (before the QemuOpts conversion, the first one was used). Multiple -smbios can add multiple fields with

[Qemu-devel] [PATCH v2 3/7] smbios: Improve diagnostics for conflicting entries

2013-08-16 Thread armbru
From: Markus Armbruster We allow either tables or fields for the same type. Makes sense, because SeaBIOS uses fields only when no tables are present. We do this by searching the SMBIOS blob for a previously added table or field. Error messages look like this: qemu-system-x86_64: -smbios t

[Qemu-devel] [PATCH v2 2/7] smbios: Convert to QemuOpts

2013-08-16 Thread armbru
From: Markus Armbruster So that it can be set in config file for -readconfig. This tightens parsing of -smbios, and makes it more consistent with other options: unknown parameters are rejected, numbers with trailing junk are rejected, when a parameter is given multiple times, last rather than fi

  1   2   >