qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
@ 2016-11-25 22:05 Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 01/20] qemu.py: Make logging optional Eduardo Habkost
                   ` (22 more replies)
  0 siblings, 23 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: libvir-list, Laine Stump, Alexey Kardashevskiy, Greg Kurz,
	David Gibson, Andrea Bolognani, Eric Blake, Cornelia Huck,
	David Hildenbrand

Changes v1 -> v2:
* v1 series subject was:
  "qmp: Report supported device types on 'query-machines'"
* Now we return additional bus information: bus ID, bus type,
  and the list of accepted device types on each bus
* Now hotplug can be covered because accepted-device-types can
  be set by individual bus instances if necessary
* Now the new field is optional, and every machine having the
  new field are now validated in "strict mode" on test code
  (meaning all buses must be present on the list)
  * TODO: only PC was converted, machines from other
    architectures don't include the field yet
* Legacy-PCI vs PCIe is now handled:
  * PCIDeviceClass::is_express field was removed
  * Defined INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE,
    buses and devices now report appropriate interface names
  * Now PCIe buses can return the right information
    because each bus instance can set its own
    accepted-device-types list
  * TODO: PCIe pci-bridge classes need to be changed to not include
    INTERFACE_LEGACY_PCI_DEVICE
  * TODO: replace q35 hack with appropriate code that set
    Legacy-PCI rules in PCI code
* Removed patches from v1:
  * pc: Initialize default bus lists
  * s390x: Initialize default bus lists
  * arm: Initialize default bus lists
  * mips: Initialize default bus lists
  * ppc: Initialize default bus lists
  * qdev: Add device_class_set_bus_type() function
    (validation is more difficult with the PCI/PCIe rules, plan
    is to try to remove DeviceClass::bus_type field, se
    "Limitations" below)
* See individual patches for additional details

The Problem
===========

Currently management software has no way to find out which device
types can be plugged in a machine, unless the machine is already
initialized.

Even after the machine is initialized, there's no way to map
existing bus types to supported device types unless management
software hardcodes the mapping between bus types and device
types.

Example: floppy support on q35 vs i440fx
----------------------------------------

There's no way for libvirt to find out that there's no floppy
controller on pc-q35-* machine-types by default.

With this series, pc-i440fx-* will report "floppy" as a supported
device type, but pc-q35-* will not.

Example: Legacy PCI vs vs PCIe devices
--------------------------------------

Some devices require a PCIe bus to be available, others work on
both legacy PCI and PCIe, while others work only on a legacy PCI
bus.

Currently management software has no way to know which devices
can be added to a given machine, unless it hardcodes machine-type
names and device-types names.

Example: spapr and PCIe root bus
--------------------------------

See the thread at:
  Subject: [RFC PATCH qemu] spapr_pci: Create PCI-express root bus by default

If we make new spapr machine-type versions create a PCIe root
bus, management software will need a way to find out:

1) The type of the default bus for the machine type;
2) The ID of the default bus for the machine type.

Otherwise, management software will have to hardcode it based on
machine-type version. The proposed interface should solve this
problem.

The Proposed Interface
======================

Bus info on query-machines
--------------------------

This series adds a new field to the output of 'query-machines':
'always-available-buses'. It will contain a a list of
MachineBusInfo structs. MachineBusInfo will contain:
* bus-id: The bus ID
* bus-type: The bus type
* accepted-device-types: A list of accepted device types for the bus.

bus-id can be used to find out what's the right "bus" argument to
be used when adding a device to the machine configuration (e.g.
when using -device and device_add).

accepted-device-types can be used as the 'implements' argument on
the 'qom-list-types' command, to find out which device types can
be plugged on the bus.

accepted-device-types property on bus objects
---------------------------------------------

This series also adds a 'accepted-device-types' property to bus
objects, so management software can check which kinds of devices
can be plugged at runtime.

Example output
--------------

TODO: update it.

Considered alternatives
=======================

Indirect mapping (machine => bus => device)
-------------------------------------------

This RFC implements a mechanism to implement ax
  machine-type => accepted-device-types
mapping. An alternative solution I considered was to expose an
indirect mapping:
  machine-type => default-bus-types
followed by
  bus-type => accepted-device-types.

But some buses have no correct bus-type => accepted-device-types
mapping. PCIe buses, for example, may or may not accept legacy
PCI buses, depending on the machine and  the bus topology.

imposes less restrictions on how the device and bus type
hierarchy is implemented inside QEMU. There's still a
  machine-type => bus-type => device-type
mapping implemented internally, but it is an implementation
detail on the current version, and not part of the
externally-visible interface.

The Implementation
==================

This add a new field to MachineClass: always_available_buses, a
new field to BusState: accepted_device_types, and a new field to
BusClass: device_type.

On most cases, the normal QOM type hierarchy is used to define
the set of accepted devices for a bus. On the case of PCI buses,
INTERFACE_PCIE_DEVICE and INTERFACE_LEGACY_PCI_DEVICE interface
names were introduced, to indicate the set of devices accepted by
PCI buses.

That means we are duplicating information:
MachineClass::always_available_buses duplicates knowledge that is
already encoded in the machine init function.

To make sure the information is correct, a qmp-machine-info.py
test case is added, that will validate the supported-device-types
field based on the buses created by the machine.

Test Code
---------

qdev-based test code for the new field was implemented in a
Python script.  Some extra support was implemented in
tests/Makefile.include, scripts/qemu.py and scripts/qtest.py to
allow the test to be implemented.

Limitations
===========

TODO: "slots" vs "buses"
------------------------

The current interface is returning information about "available
buses". Future versions might return more detailed information
about "slots" where devices can be plugged. This would make the
proposed mechanism more flexible, and cover cases like CPU
hotplug (in other words, the new interface could replace
query-hotpluggable-cpus in a generic way).

"default defaults" vs "-nodefault defaults"
-------------------------------------------

libvirt use -nodefaults when starting QEMU, so knowing which
buses are available when using -nodefaults is more interesting
for them.

Other software, on the other hand, might be interested in the
results without -nodefaults.

The new 'always-available-bus' field won't cover the more general
cases, where "-nodefaults" is not used, or when there are extra
QEMU options that create more buses (e.g.  "-machine usb=on", or
explicit -device options that would create additional buses).

Additional mechanisms may be added to let management software to
ask which buses are created when extra options are used, but
maybe thoses cases would be more easily solved if management
software checks the bus list at runtime (after the machine was
actually created).

TYPE_SYS_BUS_DEVICE is too generic
----------------------------------

Currently all machines have a TYPE_SYS_BUS bus, and all
TYPE_SYS_BUS_DEVICE subclasses are reported as supported by that
bus.

On the other hand, omitting sysbus would make query-machines lie
about supporting sysbus devices, and would require management
software to add special cases for sysbus devices. For this
reason, sysbus is being included in the output of query-machines,
although its accepted-device-types info is less useful than the
information about other buses.

Future versions of QEMU can keep the same interface, but make it
include more useful information, e.g., return more specific bus
info, with type names that exclude sysbus devices that can't
possibly work with the machine.

PCI vs PCIe
-----------

This was a limitation on v1, but I believe the problem was
addressed on v2.

This series defines two new interface names:
INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE.

* Legacy PCI devices will implement INTERFACE_LEGACY_PCI_DEVICE.
* PCIe devices will implement INTERFACE_PCIE_DEVICE.
* Hybrid devices that support both will implement both
* interfaces.

Buses will have accepted-device-types set accordingly:

* Legacy PCI buses will report INTERFACE_LEGACY_PCI_DEVICE on
  accepted-device-types.
* PCIe buses that accept only PCIe devices will report
  INTERFACE_PCIE_DEVICE on accepted-device-types.
* PCIe buses that accept both PCIe and legacy PCI devices will
  report both INTERFACE_PCIE_DEVICE and
  INTERFACE_LEGACY_PCI_DEVICE on accepted-device-types.

The Q35 root bus is the only existing example of a hybrid bus.
See the next section about the hack where this is implemented.

Q35 root bus hack
-----------------

This series includes a hack on Q35 code to add
INTERFACE_LEGACY_PCI_DEVICE to accepted-device-types on the root
PCIe bus. Suggestions on where this information should be encoded
are welcome.

Only PC is covered
------------------

This series sets always-available-buses only on the PC
machine-types, by now. Future versions might have the field added
to other machines. sPAPR is an obvious candidate, as there are
plans to change new spapr machine-type versions to use PCIe as
the root bus.

Out of scope: Configurable buses
--------------------------------

There's no way to map machine options like "usb=on|off" to
device-types or buses. This is not on the scope of this series.

Additional mechanisms may be added to let management software to
ask which buses are created when extra options are used, but
maybe thoses cases would be more easily solved if management
software checks the bus list at runtime (after the machine was
actually created).

Existing DeviceClass::bus_type field
------------------------------------

The new BusClass::device_type and BusState::accepted_device_types
fields duplicate knowledge that is already encoded in
DeviceClass::bus_type.

v1 of this series included code that validated both fields to
ensure they are consistent with each other. But the PCI/PCIe
hierarchy makes validation more difficult, so the validation code
was removed on v2.

The DeviceClass::bus_type abstraction breaks in the case of
hybrid PCI buses, because only a bus type name is not enough
information to find the right bus to plug a device. This needs to
be addressed somehow (maybe DeviceClass::bus_type can be
completely removed), but I didn't look at the device_add code to
find out the best way to do that.

---
Cc: libvir-list@redhat.com
Cc: Laine Stump <laine@redhat.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Greg Kurz <groug@kaod.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Andrea Bolognani <abologna@redhat.com>,
Cc: Eric Blake <eblake@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: David Hildenbrand <david@redhat.com>

Eduardo Habkost (20):
  qemu.py: Make logging optional
  qtest.py: Support QTEST_LOG environment variable
  qtest.py: make logging optional
  qtest.py: Make 'binary' parameter optional
  tests: Add rules to non-gtester qtest test cases
  qdev: Add 'accepted-device-types' property to BusClass
  qmp: Add 'always-available-buses' field to 'query-machines'
  virtio-pci: Set PCIDeviceClass::is_express=1
  vmxnet3: Set PCIDeviceClass::is_express=1
  pvscsi: Set PCIDeviceClass::is_express=1
  pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces
  pci: Replace is_express with INTERFACE_PCIE_DEVICE
  [trivial] edu: Move edu_info outside function
  [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device
    subclasses
  eepro100: Add INTERFACE_LEGACY_PCI_DEVICE
  [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices
  pci: Set device_type on bus classes
  q35: Hack to make root bus accept legacy PCI devices
  pci: validate interfaces on base_class_init
  pc: Initialize default bus lists

 hw/acpi/piix4.c                     |   1 +
 hw/audio/ac97.c                     |   4 +
 hw/audio/es1370.c                   |   4 +
 hw/audio/intel-hda.c                |  11 +++
 hw/block/fdc.c                      |  15 +++-
 hw/block/nvme.c                     |   5 +-
 hw/char/serial-pci.c                |  12 +++
 hw/char/virtio-serial-bus.c         |   1 +
 hw/core/bus.c                       |  21 +++++
 hw/core/machine.c                   |  33 ++++++-
 hw/core/sysbus.c                    |   1 +
 hw/display/cirrus_vga.c             |   4 +
 hw/display/qxl.c                    |   4 +
 hw/display/vga-pci.c                |   4 +
 hw/display/vmware_vga.c             |   4 +
 hw/i2c/core.c                       |   7 ++
 hw/i2c/smbus_ich9.c                 |   4 +
 hw/i386/amd_iommu.c                 |   4 +
 hw/i386/kvm/pci-assign.c            |   4 +
 hw/i386/pc.c                        |   1 +
 hw/i386/pc_piix.c                   |  29 ++++++
 hw/i386/pc_q35.c                    |  21 +++++
 hw/i386/xen/xen_platform.c          |   4 +
 hw/i386/xen/xen_pvdevice.c          |   4 +
 hw/ide/ich.c                        |   4 +
 hw/ide/pci.c                        |   4 +
 hw/ide/qdev.c                       |   1 +
 hw/input/adb.c                      |   7 ++
 hw/ipack/ipack.c                    |   7 ++
 hw/ipack/tpci200.c                  |   4 +
 hw/isa/i82378.c                     |   4 +
 hw/isa/isa-bus.c                    |   1 +
 hw/isa/lpc_ich9.c                   |   1 +
 hw/isa/piix4.c                      |   4 +
 hw/isa/vt82c686.c                   |  16 ++++
 hw/mips/gt64xxx_pci.c               |   4 +
 hw/misc/auxbus.c                    |   1 +
 hw/misc/edu.c                       |  20 +++--
 hw/misc/ivshmem.c                   |   4 +
 hw/misc/macio/macio.c               |   4 +
 hw/misc/pci-testdev.c               |   4 +
 hw/net/e1000.c                      |   4 +
 hw/net/e1000e.c                     |   5 +-
 hw/net/eepro100.c                   |   5 ++
 hw/net/ne2000.c                     |   4 +
 hw/net/pcnet-pci.c                  |   4 +
 hw/net/rocker/rocker.c              |   4 +
 hw/net/rtl8139.c                    |   4 +
 hw/net/vmxnet3.c                    |  36 ++------
 hw/pci-bridge/dec.c                 |   4 +
 hw/pci-bridge/ioh3420.c             |   6 +-
 hw/pci-bridge/pci_expander_bridge.c |   8 ++
 hw/pci-bridge/xio3130_downstream.c  |   6 +-
 hw/pci-bridge/xio3130_upstream.c    |   6 +-
 hw/pci-host/apb.c                   |   4 +
 hw/pci-host/bonito.c                |   4 +
 hw/pci-host/gpex.c                  |   4 +
 hw/pci-host/grackle.c               |   4 +
 hw/pci-host/piix.c                  |   8 ++
 hw/pci-host/ppce500.c               |   4 +
 hw/pci-host/prep.c                  |   4 +
 hw/pci-host/q35.c                   |  14 +++
 hw/pci-host/uninorth.c              |  16 ++++
 hw/pci-host/versatile.c             |   4 +
 hw/pci/pci.c                        |  41 ++++++++-
 hw/pci/pci_bridge.c                 |   4 +
 hw/ppc/ppc4xx_pci.c                 |   4 +
 hw/ppc/spapr_vio.c                  |   1 +
 hw/s390x/css-bridge.c               |   2 +
 hw/s390x/event-facility.c           |   1 +
 hw/s390x/s390-pci-bus.c             |   7 ++
 hw/scsi/esp-pci.c                   |   4 +
 hw/scsi/lsi53c895a.c                |   4 +
 hw/scsi/megasas.c                   |  12 ++-
 hw/scsi/mptsas.c                    |   4 +
 hw/scsi/scsi-bus.c                  |   1 +
 hw/scsi/vmw_pvscsi.c                |  29 ++----
 hw/sd/core.c                        |   7 ++
 hw/sd/sdhci.c                       |   4 +
 hw/sh4/sh_pci.c                     |   4 +
 hw/sparc64/sun4u.c                  |   4 +
 hw/ssi/ssi.c                        |   7 ++
 hw/usb/bus.c                        |   1 +
 hw/usb/dev-smartcard-reader.c       |   7 ++
 hw/usb/hcd-ehci-pci.c               |   4 +
 hw/usb/hcd-ohci.c                   |   4 +
 hw/usb/hcd-uhci.c                   |   4 +
 hw/usb/hcd-xhci.c                   |   5 +-
 hw/vfio/pci-quirks.c                |   4 +
 hw/vfio/pci.c                       |   6 +-
 hw/virtio/virtio-bus.c              |   1 +
 hw/virtio/virtio-pci.c              |  27 +++---
 hw/watchdog/wdt_i6300esb.c          |   4 +
 hw/xen/xen_pt.c                     |   4 +
 include/hw/boards.h                 |   7 ++
 include/hw/pci/pci.h                |   9 +-
 include/hw/qdev-core.h              |   8 ++
 qapi-schema.json                    |  37 +++++++-
 scripts/qemu.py                     |  25 ++++--
 scripts/qtest.py                    |  15 +++-
 tests/Makefile.include              |  39 +++++++-
 tests/qmp-machine-info.py           | 173 ++++++++++++++++++++++++++++++++++++
 vl.c                                |   6 ++
 103 files changed, 882 insertions(+), 102 deletions(-)
 create mode 100755 tests/qmp-machine-info.py

-- 
2.7.4

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 01/20] qemu.py: Make logging optional
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 02/20] qtest.py: Support QTEST_LOG environment variable Eduardo Habkost
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

If a test case doesn't make QEMU generate any output, there's no
need to redirect stdout and stderr to a file. On those cases,
logging can be disabled so any errors are included on the test
case output.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (none)
---
 scripts/qemu.py | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 6d1b623..1468286 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -24,13 +24,17 @@ class QEMUMachine(object):
     '''A QEMU VM'''
 
     def __init__(self, binary, args=[], wrapper=[], name=None, test_dir="/var/tmp",
-                 monitor_address=None, socket_scm_helper=None, debug=False):
+                 monitor_address=None, socket_scm_helper=None, debug=False,
+                 logging=True):
         if name is None:
             name = "qemu-%d" % os.getpid()
         if monitor_address is None:
             monitor_address = os.path.join(test_dir, name + "-monitor.sock")
         self._monitor_address = monitor_address
-        self._qemu_log_path = os.path.join(test_dir, name + ".log")
+        if logging:
+            self._qemu_log_path = os.path.join(test_dir, name + ".log")
+        else:
+            self._qemu_log_path = None
         self._popen = None
         self._binary = binary
         self._args = list(args) # Force copy args in case we modify them
@@ -91,6 +95,8 @@ class QEMUMachine(object):
         return self._popen.pid
 
     def _load_io_log(self):
+        if self._qemu_log_path is None:
+            return
         with open(self._qemu_log_path, "r") as fh:
             self._iolog = fh.read()
 
@@ -115,17 +121,24 @@ class QEMUMachine(object):
     def _post_shutdown(self):
         if not isinstance(self._monitor_address, tuple):
             self._remove_if_exists(self._monitor_address)
-        self._remove_if_exists(self._qemu_log_path)
+        if self._qemu_log_path is not None:
+            self._remove_if_exists(self._qemu_log_path)
 
     def launch(self):
         '''Launch the VM and establish a QMP connection'''
         devnull = open('/dev/null', 'rb')
-        qemulog = open(self._qemu_log_path, 'wb')
+        if self._qemu_log_path is not None:
+            qemulog = open(self._qemu_log_path, 'wb')
+            stdout=qemulog
+            stderr=subprocess.STDOUT
+        else:
+            stdout=None
+            stderr=None
         try:
             self._pre_launch()
             args = self._wrapper + [self._binary] + self._base_args() + self._args
-            self._popen = subprocess.Popen(args, stdin=devnull, stdout=qemulog,
-                                           stderr=subprocess.STDOUT, shell=False)
+            self._popen = subprocess.Popen(args, stdin=devnull, stdout=stdout,
+                                           stderr=stderr, shell=False)
             self._post_launch()
         except:
             if self._popen:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 02/20] qtest.py: Support QTEST_LOG environment variable
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 01/20] qemu.py: Make logging optional Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 03/20] qtest.py: make logging optional Eduardo Habkost
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

qtest logs everything to stderr by default, but we don't want it
to be the default behavior on test cases.

Implement the same behavior of libqtest.c, and redirect the qtest
log to /dev/null by default unless the QTEST_LOG environment
variable is set.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (none)
---
 scripts/qtest.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/qtest.py b/scripts/qtest.py
index d5aecb5..5ac2c69 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -88,8 +88,14 @@ class QEMUQtestMachine(qemu.QEMUMachine):
         self._qtest_path = os.path.join(test_dir, name + "-qtest.sock")
 
     def _base_args(self):
+        if os.getenv('QTEST_LOG'):
+            qtest_log = '/dev/fd/2'
+        else:
+            qtest_log = '/dev/null'
+
         args = super(QEMUQtestMachine, self)._base_args()
         args.extend(['-qtest', 'unix:path=' + self._qtest_path,
+                     '-qtest-log', qtest_log,
                      '-machine', 'accel=qtest'])
         return args
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 03/20] qtest.py: make logging optional
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 01/20] qemu.py: Make logging optional Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 02/20] qtest.py: Support QTEST_LOG environment variable Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 04/20] qtest.py: Make 'binary' parameter optional Eduardo Habkost
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Support the 'logging' parameter on QEMUQtestMachine, for test
cases that don't require logging.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (none)
---
 scripts/qtest.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/qtest.py b/scripts/qtest.py
index 5ac2c69..0496490 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -80,11 +80,12 @@ class QEMUQtestMachine(qemu.QEMUMachine):
     '''A QEMU VM'''
 
     def __init__(self, binary, args=[], name=None, test_dir="/var/tmp",
-                 socket_scm_helper=None):
+                 socket_scm_helper=None, logging=True):
         if name is None:
             name = "qemu-%d" % os.getpid()
         super(QEMUQtestMachine, self).__init__(binary, args, name=name, test_dir=test_dir,
-                                               socket_scm_helper=socket_scm_helper)
+                                               socket_scm_helper=socket_scm_helper,
+                                               logging=logging)
         self._qtest_path = os.path.join(test_dir, name + "-qtest.sock")
 
     def _base_args(self):
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 04/20] qtest.py: Make 'binary' parameter optional
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (2 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 03/20] qtest.py: make logging optional Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 05/20] tests: Add rules to non-gtester qtest test cases Eduardo Habkost
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

If the 'binary' parameter is omitted, use the $QTEST_QEMU_BINARY
environment variable.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (none)
---
 scripts/qtest.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/qtest.py b/scripts/qtest.py
index 0496490..5a37b48 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -79,8 +79,10 @@ class QEMUQtestProtocol(object):
 class QEMUQtestMachine(qemu.QEMUMachine):
     '''A QEMU VM'''
 
-    def __init__(self, binary, args=[], name=None, test_dir="/var/tmp",
+    def __init__(self, binary=None, args=[], name=None, test_dir="/var/tmp",
                  socket_scm_helper=None, logging=True):
+        if binary is None:
+            binary = os.getenv('QTEST_QEMU_BINARY')
         if name is None:
             name = "qemu-%d" % os.getpid()
         super(QEMUQtestMachine, self).__init__(binary, args, name=name, test_dir=test_dir,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 05/20] tests: Add rules to non-gtester qtest test cases
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (3 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 04/20] qtest.py: Make 'binary' parameter optional Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass Eduardo Habkost
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Today, simple non-gtester binaries can be run easily by a single
Makefile rule (e.g. check-tests/qemu-iotest-quick.sh), but we
don't have anything to help us automatically run the same test
binary for multiple architectures.

This add check-simpleqtest-* rules that will help us run binaries
present in $(check-simpleqtest-*-y).

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* Change "define qtest-target =" to "define qtest-target"
  to make older versions of GNU Make happy
* Print QTEST-<arch> when running QTEST tests
---
 tests/Makefile.include | 37 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index e98d3b6..63c4347 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -791,6 +791,40 @@ check-report.html: check-report.xml
 	$(call quiet-command,gtester-report $< > $@,"GEN","$@")
 
 
+# rules for non-gtester qtest tests:
+
+SIMPLETEST_OPTIONS = $(if $(V),--verbose,--quiet)
+
+# rule dependencies are:
+#   check-simpleqtest: check-simpleqtest-$(ARCH) for each ARCH in QTEST_ARCH
+#   check-simpleqtest-$(ARCH): check-simpleqtest-$(TEST)-$(ARCH) for each
+#                                  TEST in $(check-simpleqtest-$(ARCH)-y)
+#                              (generated by qtest_target macro)
+#   check-simpleqtest-$(TEST)-$(ARCH): runs test with $(SIMPLETEST_OPTIONS)
+#                                      (generated by qtest_target macro)
+#
+# $(check-simpleqtest-$(ARCH)-y) automatically includes
+#                                $(check-simpleqtest-generic-y)
+
+define qtest-target
+
+check-simpleqtest-$(1)-y += $$(check-simpleqtest-generic-y)
+
+.PHONY: $$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y))
+$$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y)): check-simpleqtest-%-$(1): %
+	$$(call quiet-command,QTEST_QEMU_BINARY=$(1)-softmmu/qemu-system-$(1) \
+		QTEST_QEMU_IMG=qemu-img$$(EXESUF) \
+		MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \
+		$$< $$(SIMPLETEST_OPTIONS),"QTEST-$(1)", "$$<")
+
+.PHONY: check-simpleqtest-$(1)
+check-simpleqtest-$(1): $$(patsubst %, check-simpleqtest-%-$(1), $$(check-simpleqtest-$(1)-y))
+
+endef
+
+$(foreach TARGET,$(QTEST_TARGETS),$(eval $(call qtest-target,$(TARGET))))
+
+
 # Other tests
 
 QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
@@ -818,7 +852,8 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
 
 .PHONY: check-qapi-schema check-qtest check-unit check check-clean
 check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y))
-check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
+check-simpleqtest: $(patsubst %,check-simpleqtest-%, $(QTEST_TARGETS))
+check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-simpleqtest
 check-unit: $(patsubst %,check-%, $(check-unit-y))
 check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (4 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 05/20] tests: Add rules to non-gtester qtest test cases Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-29 13:57   ` Cornelia Huck
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 07/20] qmp: Add 'always-available-buses' field to 'query-machines' Eduardo Habkost
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Each bus class will now be aware of the specific device types
that can be plugged on it. That will be useful for:

* Runtime check for which devices types can be plugged to the
  machine;
* Validation of query-machines output by automated tests.

By default, a single type name is used on all bus instances (set
at BusClass::device_type), but bus instances can override it and
return a different type list.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* v1 patch subject was
  "qdev: Add device_type field to BusClass"
* Replace 'device-type' with 'accepted-device-types'
  property
---
 hw/audio/intel-hda.c          |  7 +++++++
 hw/block/fdc.c                | 15 +++++++++++----
 hw/char/virtio-serial-bus.c   |  1 +
 hw/core/bus.c                 | 21 +++++++++++++++++++++
 hw/core/sysbus.c              |  1 +
 hw/i2c/core.c                 |  7 +++++++
 hw/ide/qdev.c                 |  1 +
 hw/input/adb.c                |  7 +++++++
 hw/ipack/ipack.c              |  7 +++++++
 hw/isa/isa-bus.c              |  1 +
 hw/misc/auxbus.c              |  1 +
 hw/pci/pci.c                  |  1 +
 hw/ppc/spapr_vio.c            |  1 +
 hw/s390x/css-bridge.c         |  2 ++
 hw/s390x/event-facility.c     |  1 +
 hw/s390x/s390-pci-bus.c       |  7 +++++++
 hw/scsi/scsi-bus.c            |  1 +
 hw/sd/core.c                  |  7 +++++++
 hw/ssi/ssi.c                  |  7 +++++++
 hw/usb/bus.c                  |  1 +
 hw/usb/dev-smartcard-reader.c |  7 +++++++
 hw/virtio/virtio-bus.c        |  1 +
 include/hw/qdev-core.h        |  8 ++++++++
 23 files changed, 109 insertions(+), 4 deletions(-)

diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 537face..a363993 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -36,9 +36,16 @@ static Property hda_props[] = {
     DEFINE_PROP_END_OF_LIST()
 };
 
+static void hda_codec_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_HDA_CODEC_DEVICE;
+}
+
 static const TypeInfo hda_codec_bus_info = {
     .name = TYPE_HDA_BUS,
     .parent = TYPE_BUS,
+    .class_init = hda_codec_bus_class_init,
     .instance_size = sizeof(HDACodecBus),
 };
 
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index 17d29e7..09bfdda 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -60,6 +60,10 @@
 #define TYPE_FLOPPY_BUS "floppy-bus"
 #define FLOPPY_BUS(obj) OBJECT_CHECK(FloppyBus, (obj), TYPE_FLOPPY_BUS)
 
+#define TYPE_FLOPPY_DRIVE "floppy"
+#define FLOPPY_DRIVE(obj) \
+     OBJECT_CHECK(FloppyDrive, (obj), TYPE_FLOPPY_DRIVE)
+
 typedef struct FDCtrl FDCtrl;
 typedef struct FDrive FDrive;
 static FDrive *get_drv(FDCtrl *fdctrl, int unit);
@@ -69,9 +73,16 @@ typedef struct FloppyBus {
     FDCtrl *fdc;
 } FloppyBus;
 
+static void floppy_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_FLOPPY_DRIVE;
+}
+
 static const TypeInfo floppy_bus_info = {
     .name = TYPE_FLOPPY_BUS,
     .parent = TYPE_BUS,
+    .class_init = floppy_bus_class_init,
     .instance_size = sizeof(FloppyBus),
 };
 
@@ -483,10 +494,6 @@ static const BlockDevOps fd_block_ops = {
 };
 
 
-#define TYPE_FLOPPY_DRIVE "floppy"
-#define FLOPPY_DRIVE(obj) \
-     OBJECT_CHECK(FloppyDrive, (obj), TYPE_FLOPPY_DRIVE)
-
 typedef struct FloppyDrive {
     DeviceState     qdev;
     uint32_t        unit;
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 7975c2c..215e180 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -832,6 +832,7 @@ static void virtser_bus_class_init(ObjectClass *klass, void *data)
 {
     BusClass *k = BUS_CLASS(klass);
     k->print_dev = virtser_bus_dev_print;
+    k->device_type = TYPE_VIRTIO_SERIAL_PORT;
 }
 
 static const TypeInfo virtser_bus_info = {
diff --git a/hw/core/bus.c b/hw/core/bus.c
index cf383fc..d2bf717 100644
--- a/hw/core/bus.c
+++ b/hw/core/bus.c
@@ -21,6 +21,7 @@
 #include "qemu-common.h"
 #include "hw/qdev.h"
 #include "qapi/error.h"
+#include "qapi-visit.h"
 
 static void qbus_set_hotplug_handler_internal(BusState *bus, Object *handler,
                                               Error **errp)
@@ -191,8 +192,15 @@ static void bus_set_realized(Object *obj, bool value, Error **errp)
 static void qbus_initfn(Object *obj)
 {
     BusState *bus = BUS(obj);
+    BusClass *bc = BUS_GET_CLASS(bus);
 
     QTAILQ_INIT(&bus->children);
+
+    if (bc->device_type) {
+        bus->accepted_device_types = g_new0(strList, 1);
+        bus->accepted_device_types->value = g_strdup(bc->device_type);
+    }
+
     object_property_add_link(obj, QDEV_HOTPLUG_HANDLER_PROPERTY,
                              TYPE_HOTPLUG_HANDLER,
                              (Object **)&bus->hotplug_handler,
@@ -208,12 +216,25 @@ static char *default_bus_get_fw_dev_path(DeviceState *dev)
     return g_strdup(object_get_typename(OBJECT(dev)));
 }
 
+static void bus_get_device_type(Object *obj, Visitor *v,
+                                 const char *name, void *opaque,
+                                 Error **errp)
+{
+    BusState *bus = BUS(obj);
+
+    visit_type_strList(v, NULL, &bus->accepted_device_types, errp);
+}
+
 static void bus_class_init(ObjectClass *class, void *data)
 {
     BusClass *bc = BUS_CLASS(class);
 
     class->unparent = bus_unparent;
     bc->get_fw_dev_path = default_bus_get_fw_dev_path;
+
+    object_class_property_add(class, "accepted-device-types", "strList",
+                              bus_get_device_type, NULL, NULL, NULL,
+                              &error_abort);
 }
 
 static void qbus_finalize(Object *obj)
diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
index c0f560b..c065eb8 100644
--- a/hw/core/sysbus.c
+++ b/hw/core/sysbus.c
@@ -76,6 +76,7 @@ static void system_bus_class_init(ObjectClass *klass, void *data)
 
     k->print_dev = sysbus_dev_print;
     k->get_fw_dev_path = sysbus_get_fw_dev_path;
+    k->device_type = TYPE_SYS_BUS_DEVICE;
 }
 
 static const TypeInfo system_bus_info = {
diff --git a/hw/i2c/core.c b/hw/i2c/core.c
index abd4c4c..81b6ae4 100644
--- a/hw/i2c/core.c
+++ b/hw/i2c/core.c
@@ -35,9 +35,16 @@ static Property i2c_props[] = {
 #define TYPE_I2C_BUS "i2c-bus"
 #define I2C_BUS(obj) OBJECT_CHECK(I2CBus, (obj), TYPE_I2C_BUS)
 
+static void i2c_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_I2C_SLAVE;
+}
+
 static const TypeInfo i2c_bus_info = {
     .name = TYPE_I2C_BUS,
     .parent = TYPE_BUS,
+    .class_init = i2c_bus_class_init,
     .instance_size = sizeof(I2CBus),
 };
 
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index dbaa75c..b526f85 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -43,6 +43,7 @@ static void ide_bus_class_init(ObjectClass *klass, void *data)
     BusClass *k = BUS_CLASS(klass);
 
     k->get_fw_dev_path = idebus_get_fw_dev_path;
+    k->device_type = TYPE_IDE_DEVICE;
 }
 
 static void idebus_unrealize(DeviceState *qdev, Error **errp)
diff --git a/hw/input/adb.c b/hw/input/adb.c
index 43d3205..c6a2b31 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -121,9 +121,16 @@ int adb_poll(ADBBusState *s, uint8_t *obuf, uint16_t poll_mask)
     return olen;
 }
 
+static void adb_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_ADB_DEVICE;
+}
+
 static const TypeInfo adb_bus_type_info = {
     .name = TYPE_ADB_BUS,
     .parent = TYPE_BUS,
+    .class_init = adb_bus_class_init,
     .instance_size = sizeof(ADBBusState),
 };
 
diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c
index 6021e6d..f22c504 100644
--- a/hw/ipack/ipack.c
+++ b/hw/ipack/ipack.c
@@ -106,9 +106,16 @@ static const TypeInfo ipack_device_info = {
     .abstract      = true,
 };
 
+static void ipack_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_IPACK_DEVICE;
+}
+
 static const TypeInfo ipack_bus_info = {
     .name = TYPE_IPACK_BUS,
     .parent = TYPE_BUS,
+    .class_init = ipack_bus_class_init,
     .instance_size = sizeof(IPackBus),
 };
 
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index 9d07b11..aad7669 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -36,6 +36,7 @@ static void isa_bus_class_init(ObjectClass *klass, void *data)
 
     k->print_dev = isabus_dev_print;
     k->get_fw_dev_path = isabus_get_fw_dev_path;
+    k->device_type = TYPE_ISA_DEVICE;
 }
 
 static const TypeInfo isa_dma_info = {
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index e4a7ba4..4b0d565 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -57,6 +57,7 @@ static void aux_bus_class_init(ObjectClass *klass, void *data)
      * in monitor.
      */
     k->print_dev = aux_slave_dev_print;
+    k->device_type = TYPE_AUX_SLAVE;
 }
 
 AUXBus *aux_init_bus(DeviceState *parent, const char *name)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 24fae16..74b8fef 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -152,6 +152,7 @@ static void pci_bus_class_init(ObjectClass *klass, void *data)
     k->realize = pci_bus_realize;
     k->unrealize = pci_bus_unrealize;
     k->reset = pcibus_reset;
+    k->device_type = TYPE_PCI_DEVICE;
 
     pbc->is_root = pcibus_is_root;
     pbc->bus_num = pcibus_num;
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index cc1e09c..c70b9b9 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -61,6 +61,7 @@ static void spapr_vio_bus_class_init(ObjectClass *klass, void *data)
 
     k->get_dev_path = spapr_vio_get_dev_name;
     k->get_fw_dev_path = spapr_vio_get_dev_name;
+    k->device_type = TYPE_VIO_SPAPR_DEVICE;
 }
 
 static const TypeInfo spapr_vio_bus_info = {
diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
index 9a7f7ee..8a6c1ae 100644
--- a/hw/s390x/css-bridge.c
+++ b/hw/s390x/css-bridge.c
@@ -17,6 +17,7 @@
 #include "hw/s390x/css.h"
 #include "ccw-device.h"
 #include "hw/s390x/css-bridge.h"
+#include "hw/s390x/virtio-ccw.h"
 
 /*
  * Invoke device-specific unplug handler, disable the subchannel
@@ -81,6 +82,7 @@ static void virtual_css_bus_class_init(ObjectClass *klass, void *data)
 
     k->reset = virtual_css_bus_reset;
     k->get_dev_path = virtual_css_bus_get_dev_path;
+    k->device_type = TYPE_VIRTIO_CCW_DEVICE;
 }
 
 static const TypeInfo virtual_css_bus_info = {
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 34b2faf..f2562ce 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -307,6 +307,7 @@ static void sclp_events_bus_class_init(ObjectClass *klass, void *data)
     BusClass *bc = BUS_CLASS(klass);
 
     bc->realize = sclp_events_bus_realize;
+    bc->device_type = TYPE_SCLP_EVENT;
 }
 
 static const TypeInfo sclp_events_bus_info = {
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 63f6248..7470fdd 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -783,10 +783,17 @@ static const TypeInfo s390_pcihost_info = {
     }
 };
 
+static void s390_pcibus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_S390_PCI_DEVICE;
+}
+
 static const TypeInfo s390_pcibus_info = {
     .name = TYPE_S390_PCI_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(S390PCIBus),
+    .class_init = s390_pcibus_class_init,
 };
 
 static uint16_t s390_pci_generate_uid(void)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 297216d..9faf45f 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -31,6 +31,7 @@ static void scsi_bus_class_init(ObjectClass *klass, void *data)
 
     k->get_dev_path = scsibus_get_dev_path;
     k->get_fw_dev_path = scsibus_get_fw_dev_path;
+    k->device_type = TYPE_SCSI_DEVICE;
     hc->unplug = qdev_simple_device_unplug_cb;
 }
 
diff --git a/hw/sd/core.c b/hw/sd/core.c
index 14c2bdf..49b9f59 100644
--- a/hw/sd/core.c
+++ b/hw/sd/core.c
@@ -131,11 +131,18 @@ void sdbus_set_readonly(SDBus *sdbus, bool readonly)
     }
 }
 
+static void sd_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_SD_CARD;
+}
+
 static const TypeInfo sd_bus_info = {
     .name = TYPE_SD_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(SDBus),
     .class_size = sizeof(SDBusClass),
+    .class_init = sd_bus_class_init,
 };
 
 static void sd_bus_register_types(void)
diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
index 7eaaf56..c48920d 100644
--- a/hw/ssi/ssi.c
+++ b/hw/ssi/ssi.c
@@ -22,10 +22,17 @@ struct SSIBus {
 #define TYPE_SSI_BUS "SSI"
 #define SSI_BUS(obj) OBJECT_CHECK(SSIBus, (obj), TYPE_SSI_BUS)
 
+static void ssi_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_SSI_SLAVE;
+}
+
 static const TypeInfo ssi_bus_info = {
     .name = TYPE_SSI_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(SSIBus),
+    .class_init = ssi_bus_class_init,
 };
 
 static void ssi_cs_default(void *opaque, int n, int level)
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 25913ad..2cb7fa4 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -33,6 +33,7 @@ static void usb_bus_class_init(ObjectClass *klass, void *data)
     k->print_dev = usb_bus_dev_print;
     k->get_dev_path = usb_get_dev_path;
     k->get_fw_dev_path = usb_get_fw_dev_path;
+    k->device_type = TYPE_USB_DEVICE;
     hc->unplug = qdev_simple_device_unplug_cb;
 }
 
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 89e11b6..2721f0c 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1180,10 +1180,17 @@ static Property ccid_props[] = {
 #define TYPE_CCID_BUS "ccid-bus"
 #define CCID_BUS(obj) OBJECT_CHECK(CCIDBus, (obj), TYPE_CCID_BUS)
 
+static void ccid_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    bc->device_type = TYPE_CCID_CARD;
+}
+
 static const TypeInfo ccid_bus_info = {
     .name = TYPE_CCID_BUS,
     .parent = TYPE_BUS,
     .instance_size = sizeof(CCIDBus),
+    .class_init = ccid_bus_class_init,
 };
 
 void ccid_card_send_apdu_to_guest(CCIDCardState *card,
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index d6c0c72..815f3dd 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -293,6 +293,7 @@ static void virtio_bus_class_init(ObjectClass *klass, void *data)
     BusClass *bus_class = BUS_CLASS(klass);
     bus_class->get_dev_path = virtio_bus_get_dev_path;
     bus_class->get_fw_dev_path = virtio_bus_get_fw_dev_path;
+    bus_class->device_type = TYPE_VIRTIO_DEVICE;
 }
 
 static const TypeInfo virtio_bus_info = {
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 2c97347..a7f9ac4 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -207,6 +207,13 @@ struct BusClass {
     int max_dev;
     /* number of automatically allocated bus ids (e.g. ide.0) */
     int automatic_ids;
+
+    /* default device type for 'accepted-device-type' property
+     *
+     * Most buses return only BusClass::device_type on accepted-device-types,
+     * but on some cases bus instances may override it.
+     */
+    const char *device_type;
 };
 
 typedef struct BusChild {
@@ -228,6 +235,7 @@ struct BusState {
     HotplugHandler *hotplug_handler;
     int max_index;
     bool realized;
+    strList *accepted_device_types;
     QTAILQ_HEAD(ChildrenHead, BusChild) children;
     QLIST_ENTRY(BusState) sibling;
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 07/20] qmp: Add 'always-available-buses' field to 'query-machines'
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (5 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 08/20] virtio-pci: Set PCIDeviceClass::is_express=1 Eduardo Habkost
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: libvir-list, Laine Stump

The new field will return a list MachineBusInfo structs,
containing information about the buses that are always created by
the machine (even if -nodefaults is used).

Note that some machine options may enable or disable some bus
types and affect the set of available buses. Introspection of
those options is out of the scope of this patch.

Includes a qtest test case that will validate the returned data
by actually running each machine-type and checking the list of
available buses.

As a TYPE_SYSTEM_BUS bus is always created, add it to the default
list on TYPE_MACHINE.

Cc: libvir-list@redhat.com
Cc: Laine Stump <laine@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* Replacing patches from v1:
  * machine: Add MachineClass::default_buses field
  * qmp: Add 'supported-device-types' field to 'query-machines'
* Replace 'supported-device-types' string list with
  'always-available-buses' MachineBusInfo list
* Make the new field optional, so "strict mode" will
  be always enabled when the field is present
* Don't include sysbus on TYPE_MACHINE, as not
  all machines will return the field
* Test code changes:
  * Update to use the new 'supported-device-types' field
  * Use unittest.main() instead of custom main() function
    * Add QTEST_LOG_LEVEL variable to control logging level
  * Include architecture on test case name
  * Simulate -nodefaults
  * Rewrote machine-type discovery hack
  * Run two test cases for each machine:
    using -nodefaults and without -nodefaults
  * Blacklist known machines that won't work with
    -nodefaults
  * Enable strict mode only when using -nodefaults
---
 hw/core/machine.c         |  33 ++++++++-
 include/hw/boards.h       |   7 ++
 qapi-schema.json          |  37 +++++++++-
 tests/Makefile.include    |   2 +
 tests/qmp-machine-info.py | 173 ++++++++++++++++++++++++++++++++++++++++++++++
 vl.c                      |   6 ++
 6 files changed, 256 insertions(+), 2 deletions(-)
 create mode 100755 tests/qmp-machine-info.py

diff --git a/hw/core/machine.c b/hw/core/machine.c
index b0fd91f..5be1297 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -19,6 +19,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "qemu/cutils.h"
+#include "qapi/clone-visitor.h"
 
 static char *machine_get_accel(Object *obj, Error **errp)
 {
@@ -357,6 +358,32 @@ static void machine_init_notify(Notifier *notifier, void *data)
     foreach_dynamic_sysbus_device(error_on_sysbus_device, NULL);
 }
 
+
+/* Add an item to always_available_bus list
+ *
+ * The accepted_device_types field is automatically filled using
+ * BusClass::device_type.
+ */
+MachineBusInfo *machine_class_add_always_available_bus(MachineClass *mc,
+                                                       const char *bus_id,
+                                                       const char *bus_type)
+{
+    BusClass *bc = BUS_CLASS(object_class_by_name(bus_type));
+    MachineBusInfo *bi = g_new0(MachineBusInfo, 1);
+    MachineBusInfoList *bl = g_new0(MachineBusInfoList, 1);
+
+    bi->bus_id = g_strdup(bus_id);
+    bi->bus_type = g_strdup(bus_type);
+    bi->accepted_device_types = g_new0(strList, 1);
+    bi->accepted_device_types->value = g_strdup(bc->device_type);
+
+    bl->value = bi;
+    bl->next = mc->always_available_buses;
+    mc->always_available_buses = bl;
+
+    return bi;
+}
+
 static void machine_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
@@ -466,13 +493,17 @@ static void machine_class_init(ObjectClass *oc, void *data)
 
 static void machine_class_base_init(ObjectClass *oc, void *data)
 {
+    MachineClass *mc = MACHINE_CLASS(oc);
+
     if (!object_class_is_abstract(oc)) {
-        MachineClass *mc = MACHINE_CLASS(oc);
         const char *cname = object_class_get_name(oc);
         assert(g_str_has_suffix(cname, TYPE_MACHINE_SUFFIX));
         mc->name = g_strndup(cname,
                             strlen(cname) - strlen(TYPE_MACHINE_SUFFIX));
     }
+
+    mc->always_available_buses =
+        QAPI_CLONE(MachineBusInfoList, mc->always_available_buses);
 }
 
 static void machine_initfn(Object *obj)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index a51da9c..915a46d 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -42,6 +42,10 @@ bool machine_dump_guest_core(MachineState *machine);
 bool machine_mem_merge(MachineState *machine);
 void machine_register_compat_props(MachineState *machine);
 
+MachineBusInfo *machine_class_add_always_available_bus(MachineClass *mc,
+                                                       const char *bus_id,
+                                                       const char *bus_type);
+
 /**
  * CPUArchId:
  * @arch_id - architecture-dependent CPU ID of present or possible CPU
@@ -92,6 +96,8 @@ typedef struct {
  *    size than the target architecture's minimum. (Attempting to create
  *    such a CPU will fail.) Note that changing this is a migration
  *    compatibility break for the machine.
+ * @default_buses:
+ *    List of typenames of buses that are created by default by the machine.
  */
 struct MachineClass {
     /*< private >*/
@@ -131,6 +137,7 @@ struct MachineClass {
     bool option_rom_has_mr;
     bool rom_file_has_mr;
     int minimum_page_bits;
+    MachineBusInfoList *always_available_buses;
 
     HotplugHandler *(*get_hotplug_handler)(MachineState *machine,
                                            DeviceState *dev);
diff --git a/qapi-schema.json b/qapi-schema.json
index f3e9bfc..807c5a8 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3163,6 +3163,29 @@
 { 'command': 'closefd', 'data': {'fdname': 'str'} }
 
 ##
+# @MachineBusInfo
+#
+# Information about a bus present on a machine.
+#
+# @bus-id: Path of the bus. Can be a partial path, as long
+#          as it is not ambiguous and can be used as
+#          the @path argument of @qom-get and @bus argument
+#          of @device_add
+#
+# @bus-type: Type name of the bus
+#
+# @accepted-device-types: List of device types accepted by the bus.
+#                         The type names can be used as the @implements
+#                         parameter of @qom-list-types to find the full
+#                         list of device types accepted by the bus.
+#
+# Since: 2.9.0
+##
+{ 'struct': 'MachineBusInfo',
+  'data': { 'bus-id': 'str', 'bus-type': 'str',
+            'accepted-device-types': [ 'str' ] } }
+
+##
 # @MachineInfo:
 #
 # Information describing a machine.
@@ -3178,12 +3201,24 @@
 #
 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
 #
+# @always-available-buses: Information on buses that are always available
+#                          on the machine. The buses present on this list
+#                          will be available on the machine even if the
+#                          "-nodefaults" option is present on the command-line.
+#                          The field is not provided by all machines, but if
+#                          it is present software must make no assumptions
+#                          about the buses on the machine, and their IDs, and
+#                          should use this field to build -device arguments.
+#                          configuration options.
+#                          (since 2.9.0)
+#
 # Since: 1.2.0
 ##
 { 'struct': 'MachineInfo',
   'data': { 'name': 'str', '*alias': 'str',
             '*is-default': 'bool', 'cpu-max': 'int',
-            'hotpluggable-cpus': 'bool'} }
+            'hotpluggable-cpus': 'bool',
+            '*always-available-buses': [ 'MachineBusInfo' ] } }
 
 ##
 # @query-machines:
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 63c4347..feb65ea 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -315,6 +315,8 @@ check-qtest-s390x-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-generic-y += tests/qom-test$(EXESUF)
 
+check-simpleqtest-generic-y += $(SRC_PATH)/tests/qmp-machine-info.py
+
 qapi-schema += alternate-any.json
 qapi-schema += alternate-array.json
 qapi-schema += alternate-base.json
diff --git a/tests/qmp-machine-info.py b/tests/qmp-machine-info.py
new file mode 100755
index 0000000..b113eeb
--- /dev/null
+++ b/tests/qmp-machine-info.py
@@ -0,0 +1,173 @@
+#!/usr/bin/env python
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'scripts'))
+import qtest
+import unittest
+import logging
+import argparse
+
+logger = logging.getLogger('qemu.tests.machineinfo')
+
+# machines that we can't easily test because they can't run on all hosts:
+BLACKLIST = set(['xenpv', 'xenfv'])
+
+# machines known to be broken when using -nodefaults:
+NODEFAULTS_BLACKLIST = set([
+    'cubieboard',      # segfaults
+    'petalogix-ml605', # segfaults
+    'or32-sim',        # segfaults
+    'virtex-ml507',    # segfaults
+    'Niagara',         # segfaults
+    'akita',           # "qemu: missing SecureDigital device"
+    'borzoi',          # "qemu: missing SecureDigital device"
+    'cheetah',         # "qemu: missing SecureDigital device"
+    'connex',          # "qemu: missing SecureDigital device"
+    'mainstone',       # "qemu: missing SecureDigital device"
+    'n800',            # "qemu: missing SecureDigital device"
+    'n810',            # "qemu: missing SecureDigital device"
+    'spitz',           # "qemu: missing SecureDigital device"
+    'sx1',             # "qemu: missing SecureDigital device"
+    'sx1-v1',          # "qemu: missing SecureDigital device"
+    'terrier',         # "qemu: missing SecureDigital device"
+    'tosa',            # "qemu: missing SecureDigital device"
+    'verdex',          # "qemu: missing SecureDigital device"
+    'z2',              # "qemu: missing SecureDigital device"
+])
+
+class QueryMachinesTest(unittest.TestCase):
+    def walkQOMTree(self, vm, path):
+        """Walk QOM tree recusrively, starting at path"""
+        children = vm.qmp('qom-list', path=path)['return']
+        for c in children:
+            logging.debug('walking %s. child: %s', path, c)
+            if not c['type'].startswith('child<'):
+                continue
+
+            cp = '%s/%s' % (path, c['name'])
+            yield cp
+
+            for gc in self.walkQOMTree(vm, cp):
+                yield gc
+
+    def findAllBuses(self, vm):
+        """Find all bus objects in the QOM tree"""
+        r = vm.qmp('qom-list-types', implements='bus')
+        bus_types = set([b['name'] for b in r['return']])
+        for cp in self.walkQOMTree(vm, '/machine'):
+            t = vm.qmp('qom-get', path=cp, property='type')['return']
+            if t in bus_types:
+                dt = vm.qmp('qom-get', path=cp, property='accepted-device-types').get('return')
+                yield dict(path=cp, type=t, accepted_device_types=dt)
+
+    def checkBuses(self, machine, extra_args=[], strict_mode=False):
+        """Validate 'supported-device-types' on 'query-machines'"""
+        if machine['name'] in BLACKLIST:
+            self.skipTest("machine %s on BLACKLIST" % (machine['name']))
+
+        if not machine.has_key('always-available-buses'):
+            self.skipTest('machine %s has no always-available-buses field' %
+                          (machine['name']))
+
+        args = ['-S', '-machine', machine['name']]
+        args.extend(extra_args)
+        logger.debug('QEMU args: %s', ' '.join(args))
+        vm = qtest.QEMUQtestMachine(args=args, logging=False)
+        vm.launch()
+        try:
+            found_buses = set()
+            for b in machine['always-available-buses']:
+                bus_id = b['bus-id']
+                btype = vm.qmp('qom-get', path=bus_id, property='type').get('return')
+                self.assertEquals(btype, b['bus-type'], "bus-type mismatch for %s" % (bus_id))
+                devtypes = vm.qmp('qom-get', path=bus_id, property='accepted-device-types').get('return')
+                self.assertEquals(set(devtypes), set(b['accepted-device-types']), "device-type msimatch for %s" % (bus_id))
+
+                found_buses.add(bus_id)
+
+            all_buses = list(self.findAllBuses(vm))
+            missing_buses = []
+            for b in all_buses:
+                full_path = b['path']
+                short_name = full_path.split('/')[-1]
+                if full_path in found_buses or short_name in found_buses:
+                    found_buses.discard(full_path)
+                    found_buses.discard(short_name)
+                    logger.debug("bus %s was found", full_path)
+                    continue
+                missing_buses.append(full_path)
+
+            if found_buses:
+                self.fail("Unexpected inconsistency: some buses were found using qom-get, but not on the device tree: %r", found_buses)
+
+            if missing_buses:
+                logger.info("missing buses on machine %s: %s",
+                            machine['name'], ' '.join(missing_buses))
+                if strict_mode:
+                    self.fail("missing buses: %s" % (' '.join(missing_buses)))
+        finally:
+            vm.shutdown()
+
+    def machineTestDefaultBuses(self, machine):
+        self.checkBuses(machine, [], False)
+
+    def machineTestNodefaultsBuses(self, machine):
+        if machine['name'] in NODEFAULTS_BLACKLIST:
+            self.skipTest("machine %s on NODEFAULTS_BLACKLIST" % (machine['name']))
+
+        self.checkBuses(machine, ['-nodefaults'], True)
+
+    @classmethod
+    def addMachineTest(klass, method_name, machine):
+        """Dynamically add a testMachine_<arch>_<name>_<machine> method to the class"""
+        method = getattr(klass, method_name)
+        def testMachine(self):
+            return method(self, machine)
+        machine_name = machine['name'].replace('-', '_').replace('.', '_')
+        method_name = 'test_%s_%s_%s' % (method_name, machine['arch'], machine_name)
+        setattr(klass, method_name, testMachine)
+        return method_name
+
+
+    @classmethod
+    def discoverMachines(klass, binary):
+        """Run query-machines
+
+        This method is run before test cases are started, so we
+        can dynamically add test cases for each machine supported
+        by the binary.
+        """
+        vm = qtest.QEMUQtestMachine(binary=binary, args=['-S', '-machine', 'none'], logging=False)
+        vm.launch()
+        try:
+            arch = vm.qmp('query-target')['return']['arch']
+            machines = vm.qmp('query-machines')['return']
+            for m in machines:
+                m['arch'] = arch
+        finally:
+            vm.shutdown()
+        return machines
+
+    @classmethod
+    def addMachineTests(klass, binary):
+        """Dynamically add test methods for each machine found on QEMU binary
+
+        Look for all methods with "machineTest" prefix, and add
+        custom test methods that will test them, for each machine-type
+        found on QEMU binary 'binary'.
+        """
+        method_names = unittest.loader.getTestCaseNames(klass, prefix='machineTest')
+        machines = klass.discoverMachines(binary)
+        for machine in machines:
+            for mname in method_names:
+                klass.addMachineTest(mname, machine)
+
+
+if os.getenv('QTEST_QEMU_BINARY'):
+    QueryMachinesTest.addMachineTests(os.getenv('QTEST_QEMU_BINARY'))
+
+if __name__ == '__main__':
+    if os.getenv('QTEST_LOG_LEVEL'):
+        logging.basicConfig(level=int(os.getenv('QTEST_LOG_LEVEL')))
+    else:
+        logging.basicConfig(level=logging.WARN)
+    unittest.main()
diff --git a/vl.c b/vl.c
index d77dd86..dc4d825 100644
--- a/vl.c
+++ b/vl.c
@@ -123,6 +123,7 @@ int main(int argc, char **argv)
 #include "sysemu/replay.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/iothread.h"
+#include "qapi/clone-visitor.h"
 
 #define MAX_VIRTIO_CONSOLES 1
 #define MAX_SCLP_CONSOLES 1
@@ -1556,6 +1557,11 @@ MachineInfoList *qmp_query_machines(Error **errp)
         info->name = g_strdup(mc->name);
         info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
         info->hotpluggable_cpus = !!mc->query_hotpluggable_cpus;
+        if (mc->always_available_buses) {
+            info->always_available_buses =
+                QAPI_CLONE(MachineBusInfoList, mc->always_available_buses);
+            info->has_always_available_buses = true;
+        }
 
         entry = g_malloc0(sizeof(*entry));
         entry->value = info;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 08/20] virtio-pci: Set PCIDeviceClass::is_express=1
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (6 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 07/20] qmp: Add 'always-available-buses' field to 'query-machines' Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 09/20] vmxnet3: " Eduardo Habkost
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: Shmulik Ladkani

virtio-pci has a custom DeviceClass::realize method to ensure
QEMU_PCI_CAP_EXPRESS is set before pci_qdev_realize() is called.
This is done because setting the QEMU_PCI_CAP_EXPRESS flag too
late can crash QEMU due to the PCI config space allocation logic.

Clearing QEMU_PCI_CAP_EXPRESS later, on the other hand, is
already safe, because the existing virtio-pci and vfio-pci code
already do that inside their PCIDeviceClass::realize methods. But
they are inconsistent: virtio-pci has is_express=0, and vfio-pci
has is_express=1.

To make all devices consistent, we can just set
PCIDeviceClass::is_express=1, and clear QEMU_PCI_CAP_EXPRESS on
virtio_pci_realize() if necessary. This makes the device code
simpler, and make the PCIDeviceClass::is_express field reflect
the fact that virtio-pci can be a PCIe device.

Cc: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/virtio/virtio-pci.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 521ba0b..df2b26a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1723,6 +1723,11 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
     bool pcie_port = pci_bus_is_express(pci_dev->bus) &&
                      !pci_bus_is_root(pci_dev->bus);
 
+    if ((proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) ||
+        !virtio_pci_modern(proxy)) {
+        pci_dev->cap_present &= ~QEMU_PCI_CAP_EXPRESS;
+    }
+
     if (!kvm_has_many_ioeventfds()) {
         proxy->flags &= ~VIRTIO_PCI_FLAG_USE_IOEVENTFD;
     }
@@ -1855,25 +1860,10 @@ static Property virtio_pci_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
-static void virtio_pci_dc_realize(DeviceState *qdev, Error **errp)
-{
-    VirtioPCIClass *vpciklass = VIRTIO_PCI_GET_CLASS(qdev);
-    VirtIOPCIProxy *proxy = VIRTIO_PCI(qdev);
-    PCIDevice *pci_dev = &proxy->pci_dev;
-
-    if (!(proxy->flags & VIRTIO_PCI_FLAG_DISABLE_PCIE) &&
-        virtio_pci_modern(proxy)) {
-        pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
-    }
-
-    vpciklass->parent_dc_realize(qdev, errp);
-}
-
 static void virtio_pci_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-    VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
 
     dc->props = virtio_pci_properties;
     k->realize = virtio_pci_realize;
@@ -1881,8 +1871,7 @@ static void virtio_pci_class_init(ObjectClass *klass, void *data)
     k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     k->revision = VIRTIO_PCI_ABI_VERSION;
     k->class_id = PCI_CLASS_OTHERS;
-    vpciklass->parent_dc_realize = dc->realize;
-    dc->realize = virtio_pci_dc_realize;
+    k->is_express = 1;
     dc->reset = virtio_pci_reset;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 09/20] vmxnet3: Set PCIDeviceClass::is_express=1
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (7 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 08/20] virtio-pci: Set PCIDeviceClass::is_express=1 Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 10/20] pvscsi: " Eduardo Habkost
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: Shmulik Ladkani

vmxnet3 has a custom DeviceClass::realize method to ensure
QEMU_PCI_CAP_EXPRESS is set before pci_qdev_realize() is called.
This is done because setting the QEMU_PCI_CAP_EXPRESS flag too
late can crash QEMU due to the PCI config space allocation logic.

Clearing QEMU_PCI_CAP_EXPRESS later, on the other hand, is
already safe, because the existing virtio-pci and vfio-pci code
already do that inside their PCIDeviceClass::realize methods. But
they are inconsistent: virtio-pci has is_express=0, and vfio-pci
has is_express=1.

To make all devices consistent, we can just set
PCIDeviceClass::is_express=1, and clear QEMU_PCI_CAP_EXPRESS on
vmxnet3_pci_realize() if necessary. This makes the device code
simpler, and make the PCIDeviceClass::is_express field reflect
the fact that vmxnet3 can be a PCIe device.

Cc: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/net/vmxnet3.c | 32 +++++---------------------------
 1 file changed, 5 insertions(+), 27 deletions(-)

diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 92f6af9..5aefb17 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -125,19 +125,9 @@
 
 #define VMXNET_FLAG_IS_SET(field, flag) (((field) & (flag)) == (flag))
 
-typedef struct VMXNET3Class {
-    PCIDeviceClass parent_class;
-    DeviceRealize parent_dc_realize;
-} VMXNET3Class;
-
 #define TYPE_VMXNET3 "vmxnet3"
 #define VMXNET3(obj) OBJECT_CHECK(VMXNET3State, (obj), TYPE_VMXNET3)
 
-#define VMXNET3_DEVICE_CLASS(klass) \
-    OBJECT_CLASS_CHECK(VMXNET3Class, (klass), TYPE_VMXNET3)
-#define VMXNET3_DEVICE_GET_CLASS(obj) \
-    OBJECT_GET_CLASS(VMXNET3Class, (obj), TYPE_VMXNET3)
-
 /* Cyclic ring abstraction */
 typedef struct {
     hwaddr pa;
@@ -2288,6 +2278,10 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp)
     VMXNET3State *s = VMXNET3(pci_dev);
     int ret;
 
+    if (s->compat_flags & VMXNET3_COMPAT_FLAG_DISABLE_PCIE) {
+        pci_dev->cap_present &= ~QEMU_PCI_CAP_EXPRESS;
+    }
+
     VMW_CBPRN("Starting init...");
 
     memory_region_init_io(&s->bar0, OBJECT(s), &b0_ops, s,
@@ -2682,24 +2676,10 @@ static Property vmxnet3_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
-static void vmxnet3_realize(DeviceState *qdev, Error **errp)
-{
-    VMXNET3Class *vc = VMXNET3_DEVICE_GET_CLASS(qdev);
-    PCIDevice *pci_dev = PCI_DEVICE(qdev);
-    VMXNET3State *s = VMXNET3(qdev);
-
-    if (!(s->compat_flags & VMXNET3_COMPAT_FLAG_DISABLE_PCIE)) {
-        pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
-    }
-
-    vc->parent_dc_realize(qdev, errp);
-}
-
 static void vmxnet3_class_init(ObjectClass *class, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(class);
     PCIDeviceClass *c = PCI_DEVICE_CLASS(class);
-    VMXNET3Class *vc = VMXNET3_DEVICE_CLASS(class);
 
     c->realize = vmxnet3_pci_realize;
     c->exit = vmxnet3_pci_uninit;
@@ -2710,8 +2690,7 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)
     c->class_id = PCI_CLASS_NETWORK_ETHERNET;
     c->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE;
     c->subsystem_id = PCI_DEVICE_ID_VMWARE_VMXNET3;
-    vc->parent_dc_realize = dc->realize;
-    dc->realize = vmxnet3_realize;
+    c->is_express = 1;
     dc->desc = "VMWare Paravirtualized Ethernet v3";
     dc->reset = vmxnet3_qdev_reset;
     dc->vmsd = &vmstate_vmxnet3;
@@ -2722,7 +2701,6 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)
 static const TypeInfo vmxnet3_info = {
     .name          = TYPE_VMXNET3,
     .parent        = TYPE_PCI_DEVICE,
-    .class_size    = sizeof(VMXNET3Class),
     .instance_size = sizeof(VMXNET3State),
     .class_init    = vmxnet3_class_init,
     .instance_init = vmxnet3_instance_init,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 10/20] pvscsi: Set PCIDeviceClass::is_express=1
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (8 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 09/20] vmxnet3: " Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 11/20] pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces Eduardo Habkost
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: Shmulik Ladkani

pvscsi has a custom DeviceClass::realize method to ensure
QEMU_PCI_CAP_EXPRESS is set before pci_qdev_realize() is called.
This is done because setting the QEMU_PCI_CAP_EXPRESS flag too
late can crash QEMU due to the PCI config space allocation logic.

Clearing QEMU_PCI_CAP_EXPRESS later, on the other hand, is
already safe, because the existing virtio-pci and vfio-pci code
already do that inside their PCIDeviceClass::realize methods. But
they are inconsistent: virtio-pci has is_express=0, and vfio-pci
has is_express=1.

To make all devices consistent, we can just set
PCIDeviceClass::is_express=1, and clear QEMU_PCI_CAP_EXPRESS on
pvscsi_pci_realize() if necessary. This makes the device code
simpler, and make the PCIDeviceClass::is_express field reflect
the fact that pvscsi can be a PCIe device.

Cc: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/scsi/vmw_pvscsi.c | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index a5ce7de..af94968 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -52,19 +52,9 @@
     (stl_le_pci_dma(&container_of(m, PVSCSIState, rings)->parent_obj, \
                  (m)->rs_pa + offsetof(struct PVSCSIRingsState, field), val))
 
-typedef struct PVSCSIClass {
-    PCIDeviceClass parent_class;
-    DeviceRealize parent_dc_realize;
-} PVSCSIClass;
-
 #define TYPE_PVSCSI "pvscsi"
 #define PVSCSI(obj) OBJECT_CHECK(PVSCSIState, (obj), TYPE_PVSCSI)
 
-#define PVSCSI_DEVICE_CLASS(klass) \
-    OBJECT_CLASS_CHECK(PVSCSIClass, (klass), TYPE_PVSCSI)
-#define PVSCSI_DEVICE_GET_CLASS(obj) \
-    OBJECT_GET_CLASS(PVSCSIClass, (obj), TYPE_PVSCSI)
-
 /* Compatibility flags for migration */
 #define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION_BIT 0
 #define PVSCSI_COMPAT_OLD_PCI_CONFIGURATION \
@@ -1262,24 +1252,19 @@ static Property pvscsi_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
-static void pvscsi_realize(DeviceState *qdev, Error **errp)
+static void pvscsi_pci_realize(PCIDevice *pci_dev, Error **errp)
 {
-    PVSCSIClass *pvs_c = PVSCSI_DEVICE_GET_CLASS(qdev);
-    PCIDevice *pci_dev = PCI_DEVICE(qdev);
-    PVSCSIState *s = PVSCSI(qdev);
+    PVSCSIState *s = PVSCSI(pci_dev);
 
-    if (!(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE)) {
-        pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
+    if (s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE) {
+        pci_dev->cap_present &= ~QEMU_PCI_CAP_EXPRESS;
     }
-
-    pvs_c->parent_dc_realize(qdev, errp);
 }
 
 static void pvscsi_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-    PVSCSIClass *pvs_k = PVSCSI_DEVICE_CLASS(klass);
     HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
 
     k->init = pvscsi_init;
@@ -1288,8 +1273,8 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
     k->device_id = PCI_DEVICE_ID_VMWARE_PVSCSI;
     k->class_id = PCI_CLASS_STORAGE_SCSI;
     k->subsystem_id = 0x1000;
-    pvs_k->parent_dc_realize = dc->realize;
-    dc->realize = pvscsi_realize;
+    k->realize = pvscsi_pci_realize;
+    k->is_express = 1;
     dc->reset = pvscsi_reset;
     dc->vmsd = &vmstate_pvscsi;
     dc->props = pvscsi_properties;
@@ -1301,7 +1286,6 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
 static const TypeInfo pvscsi_info = {
     .name          = TYPE_PVSCSI,
     .parent        = TYPE_PCI_DEVICE,
-    .class_size    = sizeof(PVSCSIClass),
     .instance_size = sizeof(PVSCSIState),
     .class_init    = pvscsi_class_init,
     .interfaces = (InterfaceInfo[]) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 11/20] pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (9 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 10/20] pvscsi: " Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 12/20] pci: Replace is_express with INTERFACE_PCIE_DEVICE Eduardo Habkost
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Those two interfaces will be used to indicate which device types
support legacy PCI or PCI-express buses.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* Replacing v1 patch:
  "pci: Introduce INTERFACE_PCIE_DEVICE interface name"
* (new patch added to series)
---
 hw/pci/pci.c         | 12 ++++++++++++
 include/hw/pci/pci.h |  6 ++++++
 2 files changed, 18 insertions(+)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 74b8fef..e7e2f26 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -167,6 +167,16 @@ static const TypeInfo pci_bus_info = {
     .class_init = pci_bus_class_init,
 };
 
+static const TypeInfo pcie_interface_info = {
+    .name          = INTERFACE_PCIE_DEVICE,
+    .parent        = TYPE_INTERFACE,
+};
+
+static const TypeInfo legacy_pci_interface_info = {
+    .name          = INTERFACE_LEGACY_PCI_DEVICE,
+    .parent        = TYPE_INTERFACE,
+};
+
 static const TypeInfo pcie_bus_info = {
     .name = TYPE_PCIE_BUS,
     .parent = TYPE_PCI_BUS,
@@ -2627,6 +2637,8 @@ static void pci_register_types(void)
 {
     type_register_static(&pci_bus_info);
     type_register_static(&pcie_bus_info);
+    type_register_static(&legacy_pci_interface_info);
+    type_register_static(&pcie_interface_info);
     type_register_static(&pci_device_type_info);
 }
 
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 772692f..685748b 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -191,6 +191,12 @@ enum {
 #define PCI_DEVICE_GET_CLASS(obj) \
      OBJECT_GET_CLASS(PCIDeviceClass, (obj), TYPE_PCI_DEVICE)
 
+/* Interface implemented by devices that can be plugged on PCIe buses */
+#define INTERFACE_PCIE_DEVICE "pci-express-device"
+
+/* Interface implemented by devices that can be plugged on legacy PCI buses */
+#define INTERFACE_LEGACY_PCI_DEVICE "legacy-pci-device"
+
 typedef struct PCIINTxRoute {
     enum {
         PCI_INTX_ENABLED,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 12/20] pci: Replace is_express with INTERFACE_PCIE_DEVICE
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (10 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 11/20] pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function Eduardo Habkost
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: Shmulik Ladkani

This patch changes all devices that set is_express=1 to implement
INTERFACE_PCIE_DEVICE, and remove the is_express field
completely.

Cc: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* Replacing v1 patch:
  "pci: Introduce INTERFACE_PCIE_DEVICE interface name"
* Remove PCIDeviceClass::is_express field completely
---
 hw/block/nvme.c                    | 5 ++++-
 hw/net/e1000e.c                    | 5 ++++-
 hw/net/vmxnet3.c                   | 5 ++++-
 hw/pci-bridge/ioh3420.c            | 5 ++++-
 hw/pci-bridge/xio3130_downstream.c | 5 ++++-
 hw/pci-bridge/xio3130_upstream.c   | 5 ++++-
 hw/pci/pci.c                       | 2 +-
 hw/scsi/megasas.c                  | 8 +++++++-
 hw/scsi/vmw_pvscsi.c               | 2 +-
 hw/usb/hcd-xhci.c                  | 5 ++++-
 hw/vfio/pci.c                      | 5 ++++-
 hw/virtio/virtio-pci.c             | 5 ++++-
 include/hw/pci/pci.h               | 3 ---
 13 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index d479fd2..02cf1eb 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -957,7 +957,6 @@ static void nvme_class_init(ObjectClass *oc, void *data)
     pc->vendor_id = PCI_VENDOR_ID_INTEL;
     pc->device_id = 0x5845;
     pc->revision = 2;
-    pc->is_express = 1;
 
     set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
     dc->desc = "Non-Volatile Memory Express";
@@ -980,6 +979,10 @@ static const TypeInfo nvme_info = {
     .instance_size = sizeof(NvmeCtrl),
     .class_init    = nvme_class_init,
     .instance_init = nvme_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void nvme_register_types(void)
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 4994e1c..e397d3f 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -666,7 +666,6 @@ static void e1000e_class_init(ObjectClass *class, void *data)
     c->revision = 0;
     c->romfile = "efi-e1000e.rom";
     c->class_id = PCI_CLASS_NETWORK_ETHERNET;
-    c->is_express = 1;
 
     dc->desc = "Intel 82574L GbE Controller";
     dc->reset = e1000e_qdev_reset;
@@ -701,6 +700,10 @@ static const TypeInfo e1000e_info = {
     .instance_size = sizeof(E1000EState),
     .class_init = e1000e_class_init,
     .instance_init = e1000e_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void e1000e_register_types(void)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 5aefb17..e85ebb5 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2690,7 +2690,6 @@ static void vmxnet3_class_init(ObjectClass *class, void *data)
     c->class_id = PCI_CLASS_NETWORK_ETHERNET;
     c->subsystem_vendor_id = PCI_VENDOR_ID_VMWARE;
     c->subsystem_id = PCI_DEVICE_ID_VMWARE_VMXNET3;
-    c->is_express = 1;
     dc->desc = "VMWare Paravirtualized Ethernet v3";
     dc->reset = vmxnet3_qdev_reset;
     dc->vmsd = &vmstate_vmxnet3;
@@ -2704,6 +2703,10 @@ static const TypeInfo vmxnet3_info = {
     .instance_size = sizeof(VMXNET3State),
     .class_init    = vmxnet3_class_init,
     .instance_init = vmxnet3_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void vmxnet3_register_types(void)
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index c8b5ac4..3ee2990 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -190,7 +190,6 @@ static void ioh3420_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
-    k->is_express = 1;
     k->is_bridge = 1;
     k->config_write = ioh3420_write_config;
     k->init = ioh3420_initfn;
@@ -209,6 +208,10 @@ static const TypeInfo ioh3420_info = {
     .name          = "ioh3420",
     .parent        = TYPE_PCIE_SLOT,
     .class_init    = ioh3420_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void ioh3420_register_types(void)
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index cef6e13..8320777 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -176,7 +176,6 @@ static void xio3130_downstream_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
-    k->is_express = 1;
     k->is_bridge = 1;
     k->config_write = xio3130_downstream_write_config;
     k->init = xio3130_downstream_initfn;
@@ -195,6 +194,10 @@ static const TypeInfo xio3130_downstream_info = {
     .name          = "xio3130-downstream",
     .parent        = TYPE_PCIE_SLOT,
     .class_init    = xio3130_downstream_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void xio3130_downstream_register_types(void)
diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c
index 4ad0440..b6361c3 100644
--- a/hw/pci-bridge/xio3130_upstream.c
+++ b/hw/pci-bridge/xio3130_upstream.c
@@ -148,7 +148,6 @@ static void xio3130_upstream_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
-    k->is_express = 1;
     k->is_bridge = 1;
     k->config_write = xio3130_upstream_write_config;
     k->init = xio3130_upstream_initfn;
@@ -166,6 +165,10 @@ static const TypeInfo xio3130_upstream_info = {
     .name          = "x3130-upstream",
     .parent        = TYPE_PCIE_PORT,
     .class_init    = xio3130_upstream_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void xio3130_upstream_register_types(void)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e7e2f26..2fc543c 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1962,7 +1962,7 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
     bool is_default_rom;
 
     /* initialize cap_present for pci_is_express() and pci_config_size() */
-    if (pc->is_express) {
+    if (object_class_dynamic_cast(OBJECT_CLASS(pc), INTERFACE_PCIE_DEVICE)) {
         pci_dev->cap_present |= QEMU_PCI_CAP_EXPRESS;
     }
 
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 52a4123..dbccc1b 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2509,7 +2509,6 @@ static void megasas_class_init(ObjectClass *oc, void *data)
     pc->subsystem_vendor_id = PCI_VENDOR_ID_LSI_LOGIC;
     pc->subsystem_id = info->subsystem_id;
     pc->class_id = PCI_CLASS_STORAGE_RAID;
-    pc->is_express = info->is_express;
     e->mmio_bar = info->mmio_bar;
     e->ioport_bar = info->ioport_bar;
     e->osts = info->osts;
@@ -2538,11 +2537,18 @@ static void megasas_register_types(void)
     for (i = 0; i < ARRAY_SIZE(megasas_devices); i++) {
         const MegasasInfo *info = &megasas_devices[i];
         TypeInfo type_info = {};
+        InterfaceInfo pcie_interfaces[] = {
+            { INTERFACE_PCIE_DEVICE },
+            { },
+        };
 
         type_info.name = info->name;
         type_info.parent = TYPE_MEGASAS_BASE;
         type_info.class_data = (void *)info;
         type_info.class_init = megasas_class_init;
+        if (info->is_express) {
+            type_info.interfaces = pcie_interfaces;
+        }
 
         type_register(&type_info);
     }
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index af94968..e75c010 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1274,7 +1274,6 @@ static void pvscsi_class_init(ObjectClass *klass, void *data)
     k->class_id = PCI_CLASS_STORAGE_SCSI;
     k->subsystem_id = 0x1000;
     k->realize = pvscsi_pci_realize;
-    k->is_express = 1;
     dc->reset = pvscsi_reset;
     dc->vmsd = &vmstate_pvscsi;
     dc->props = pvscsi_properties;
@@ -1290,6 +1289,7 @@ static const TypeInfo pvscsi_info = {
     .class_init    = pvscsi_class_init,
     .interfaces = (InterfaceInfo[]) {
         { TYPE_HOTPLUG_HANDLER },
+        { INTERFACE_PCIE_DEVICE },
         { }
     }
 };
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4acf0c6..1a47c9e 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3954,7 +3954,6 @@ static void xhci_class_init(ObjectClass *klass, void *data)
     k->device_id    = PCI_DEVICE_ID_NEC_UPD720200;
     k->class_id     = PCI_CLASS_SERIAL_USB;
     k->revision     = 0x03;
-    k->is_express   = 1;
 }
 
 static const TypeInfo xhci_info = {
@@ -3962,6 +3961,10 @@ static const TypeInfo xhci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(XHCIState),
     .class_init    = xhci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void xhci_register_types(void)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index d7dbe0e..2507fdf 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2973,7 +2973,6 @@ static void vfio_pci_dev_class_init(ObjectClass *klass, void *data)
     pdc->exit = vfio_exitfn;
     pdc->config_read = vfio_pci_read_config;
     pdc->config_write = vfio_pci_write_config;
-    pdc->is_express = 1; /* We might be */
 }
 
 static const TypeInfo vfio_pci_dev_info = {
@@ -2983,6 +2982,10 @@ static const TypeInfo vfio_pci_dev_info = {
     .class_init = vfio_pci_dev_class_init,
     .instance_init = vfio_instance_init,
     .instance_finalize = vfio_instance_finalize,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 static void register_vfio_pci_dev_type(void)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index df2b26a..8ca9ea7 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1871,7 +1871,6 @@ static void virtio_pci_class_init(ObjectClass *klass, void *data)
     k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
     k->revision = VIRTIO_PCI_ABI_VERSION;
     k->class_id = PCI_CLASS_OTHERS;
-    k->is_express = 1;
     dc->reset = virtio_pci_reset;
 }
 
@@ -1882,6 +1881,10 @@ static const TypeInfo virtio_pci_info = {
     .class_init    = virtio_pci_class_init,
     .class_size    = sizeof(VirtioPCIClass),
     .abstract      = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_PCIE_DEVICE },
+        { }
+    },
 };
 
 /* virtio-blk-pci */
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 685748b..dba194e 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -229,9 +229,6 @@ typedef struct PCIDeviceClass {
      */
     int is_bridge;
 
-    /* pcie stuff */
-    int is_express;   /* is this device pci express? */
-
     /* rom bar */
     const char *romfile;
 } PCIDeviceClass;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (11 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 12/20] pci: Replace is_express with INTERFACE_PCIE_DEVICE Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 14/20] [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses Eduardo Habkost
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: Jiri Slaby

Follow the same style as other classes. Declaring the struct
inside the function doesn't allow us to use the same type of
declaration to set the interfaces array.

Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/misc/edu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index 401039c..529721a 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -406,16 +406,16 @@ static void edu_class_init(ObjectClass *class, void *data)
     k->class_id = PCI_CLASS_OTHERS;
 }
 
+static const TypeInfo edu_info = {
+    .name          = "edu",
+    .parent        = TYPE_PCI_DEVICE,
+    .instance_size = sizeof(EduState),
+    .instance_init = edu_instance_init,
+    .class_init    = edu_class_init,
+};
+
 static void pci_edu_register_types(void)
 {
-    static const TypeInfo edu_info = {
-        .name          = "edu",
-        .parent        = TYPE_PCI_DEVICE,
-        .instance_size = sizeof(EduState),
-        .instance_init = edu_instance_init,
-        .class_init    = edu_class_init,
-    };
-
     type_register_static(&edu_info);
 }
 type_init(pci_edu_register_types)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 14/20] [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (12 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 15/20] eepro100: Add INTERFACE_LEGACY_PCI_DEVICE Eduardo Habkost
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Automatically add INTERFACE_LEGACY_PCI_DEVICE to all (direct) 76
TYPE_PCI_DEVICE subclasses that use a static TypeInfo struct.

This was done automatically using a script. The next patches will
fix a few remaining cases.

I will keep it in a separate patch on the RFC phase, but this
will be probably squashed with the next patches on the final
series version.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)

---
Scripts below, for reference:

(I wish Coccinelle supported the struct initialization syntax we
use in QEMU...)

First sed command to add the interface name:
  sed -i -e 's@^\( *\)\(.parent *= *\)\(TYPE_PCI_DEVICE,\)@\1\2TYPE_PCI_DEVICE,\n\1.interfaces = (InterfaceInfo[]) {\n\1    { INTERFACE_LEGACY_PCI_DEVICE },\n\1    { },\n\1},@' $(g grep -l -w TYPE_PCI_DEVICE)

Then the following Python script to clean up the mess: remove the
duplicate definitions of ".interfaces" declarations and move them
to the end of the struct definition.

import sys, re
for f in sys.argv[1:]:
    s = open(f, 'r').read()
    for dec in re.findall(r"TypeInfo *[a-zA-Z_0-9]+ *= *{.*?};", s, flags=re.DOTALL):
        print >>sys.stderr, dec
        # unify double interface decls:
        new = re.sub(r"\n *\.interfaces *= *\(InterfaceInfo\[\]\) *{(.*?)\n *{ *},\n *},*\n(.*)\n( *\.interfaces * = *\(InterfaceInfo\[\]\) *{.*?)(\n *{ *},*\n *},*)\n", r"\n\2\n\3\1\4\n", dec, flags=re.DOTALL)
        s = s.replace(dec, new)
        dec = new

        new = re.sub(r"\n( *\.interfaces *=.*?\n *},*\n)(.*\n)( *};)", r"\n\2\1\3", dec, flags=re.DOTALL)
        s = s.replace(dec, new)
        dec = new

    open(f, 'w').write(s)
---
 hw/acpi/piix4.c                     |  1 +
 hw/audio/ac97.c                     |  4 ++++
 hw/audio/es1370.c                   |  4 ++++
 hw/audio/intel-hda.c                |  4 ++++
 hw/block/nvme.c                     |  1 +
 hw/char/serial-pci.c                | 12 ++++++++++++
 hw/display/cirrus_vga.c             |  4 ++++
 hw/display/qxl.c                    |  4 ++++
 hw/display/vga-pci.c                |  4 ++++
 hw/display/vmware_vga.c             |  4 ++++
 hw/i2c/smbus_ich9.c                 |  4 ++++
 hw/i386/amd_iommu.c                 |  4 ++++
 hw/i386/kvm/pci-assign.c            |  4 ++++
 hw/i386/pc_piix.c                   |  4 ++++
 hw/i386/xen/xen_platform.c          |  4 ++++
 hw/i386/xen/xen_pvdevice.c          |  4 ++++
 hw/ide/ich.c                        |  4 ++++
 hw/ide/pci.c                        |  4 ++++
 hw/ipack/tpci200.c                  |  4 ++++
 hw/isa/i82378.c                     |  4 ++++
 hw/isa/lpc_ich9.c                   |  1 +
 hw/isa/piix4.c                      |  4 ++++
 hw/isa/vt82c686.c                   | 16 ++++++++++++++++
 hw/mips/gt64xxx_pci.c               |  4 ++++
 hw/misc/edu.c                       |  4 ++++
 hw/misc/ivshmem.c                   |  4 ++++
 hw/misc/macio/macio.c               |  4 ++++
 hw/misc/pci-testdev.c               |  4 ++++
 hw/net/e1000.c                      |  4 ++++
 hw/net/e1000e.c                     |  1 +
 hw/net/ne2000.c                     |  4 ++++
 hw/net/pcnet-pci.c                  |  4 ++++
 hw/net/rocker/rocker.c              |  4 ++++
 hw/net/rtl8139.c                    |  4 ++++
 hw/net/vmxnet3.c                    |  1 +
 hw/pci-bridge/dec.c                 |  4 ++++
 hw/pci-bridge/pci_expander_bridge.c |  8 ++++++++
 hw/pci-host/apb.c                   |  4 ++++
 hw/pci-host/bonito.c                |  4 ++++
 hw/pci-host/gpex.c                  |  4 ++++
 hw/pci-host/grackle.c               |  4 ++++
 hw/pci-host/piix.c                  |  8 ++++++++
 hw/pci-host/ppce500.c               |  4 ++++
 hw/pci-host/prep.c                  |  4 ++++
 hw/pci-host/q35.c                   |  4 ++++
 hw/pci-host/uninorth.c              | 16 ++++++++++++++++
 hw/pci-host/versatile.c             |  4 ++++
 hw/pci/pci_bridge.c                 |  4 ++++
 hw/ppc/ppc4xx_pci.c                 |  4 ++++
 hw/scsi/esp-pci.c                   |  4 ++++
 hw/scsi/lsi53c895a.c                |  4 ++++
 hw/scsi/megasas.c                   |  4 ++++
 hw/scsi/mptsas.c                    |  4 ++++
 hw/scsi/vmw_pvscsi.c                |  1 +
 hw/sd/sdhci.c                       |  4 ++++
 hw/sh4/sh_pci.c                     |  4 ++++
 hw/sparc64/sun4u.c                  |  4 ++++
 hw/usb/hcd-ehci-pci.c               |  4 ++++
 hw/usb/hcd-ohci.c                   |  4 ++++
 hw/usb/hcd-uhci.c                   |  4 ++++
 hw/usb/hcd-xhci.c                   |  1 +
 hw/vfio/pci-quirks.c                |  4 ++++
 hw/vfio/pci.c                       |  1 +
 hw/virtio/virtio-pci.c              |  1 +
 hw/watchdog/wdt_i6300esb.c          |  4 ++++
 hw/xen/xen_pt.c                     |  4 ++++
 66 files changed, 277 insertions(+)

diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 17d36bd..737da27 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -715,6 +715,7 @@ static const TypeInfo piix4_pm_info = {
     .interfaces = (InterfaceInfo[]) {
         { TYPE_HOTPLUG_HANDLER },
         { TYPE_ACPI_DEVICE_IF },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     }
 };
diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c
index cbd959e..eea671e 100644
--- a/hw/audio/ac97.c
+++ b/hw/audio/ac97.c
@@ -1420,6 +1420,10 @@ static const TypeInfo ac97_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof (AC97LinkState),
     .class_init    = ac97_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ac97_register_types (void)
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index 8449b5f..ba529dc 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -1068,6 +1068,10 @@ static const TypeInfo es1370_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof (ES1370State),
     .class_init    = es1370_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void es1370_register_types (void)
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index a363993..4a73476 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -1307,6 +1307,10 @@ static const TypeInfo intel_hda_info = {
     .instance_size = sizeof(IntelHDAState),
     .class_init    = intel_hda_class_init,
     .abstract      = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static const TypeInfo intel_hda_info_ich6 = {
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 02cf1eb..eb85c1a 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -981,6 +981,7 @@ static const TypeInfo nvme_info = {
     .instance_init = nvme_instance_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 303104d..c2dbcc0 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -250,6 +250,10 @@ static const TypeInfo serial_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCISerialState),
     .class_init    = serial_pci_class_initfn,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static const TypeInfo multi_2x_serial_pci_info = {
@@ -257,6 +261,10 @@ static const TypeInfo multi_2x_serial_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIMultiSerialState),
     .class_init    = multi_2x_serial_pci_class_initfn,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static const TypeInfo multi_4x_serial_pci_info = {
@@ -264,6 +272,10 @@ static const TypeInfo multi_4x_serial_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIMultiSerialState),
     .class_init    = multi_4x_serial_pci_class_initfn,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void serial_pci_register_types(void)
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 3d712d5..e325ab4 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -3080,6 +3080,10 @@ static const TypeInfo cirrus_vga_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCICirrusVGAState),
     .class_init    = cirrus_vga_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void cirrus_vga_register_types(void)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 0e2682d..c6f3f30 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2348,6 +2348,10 @@ static const TypeInfo qxl_pci_type_info = {
     .instance_size = sizeof(PCIQXLDevice),
     .abstract = true,
     .class_init = qxl_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void qxl_primary_class_init(ObjectClass *klass, void *data)
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index ac9a764..72477e4 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -338,6 +338,10 @@ static const TypeInfo vga_pci_type_info = {
     .instance_size = sizeof(PCIVGAState),
     .abstract = true,
     .class_init = vga_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void vga_class_init(ObjectClass *klass, void *data)
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 6599cf0..19e9ad2 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -1366,6 +1366,10 @@ static const TypeInfo vmsvga_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(struct pci_vmsvga_state_s),
     .class_init    = vmsvga_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void vmsvga_register_types(void)
diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
index 48fab22..0184b85 100644
--- a/hw/i2c/smbus_ich9.c
+++ b/hw/i2c/smbus_ich9.c
@@ -119,6 +119,10 @@ static const TypeInfo ich9_smb_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(ICH9SMBState),
     .class_init = ich9_smb_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ich9_smb_register(void)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 47b79d9..9adb4fc 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1201,6 +1201,10 @@ static const TypeInfo amdviPCI = {
     .name = "AMDVI-PCI",
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(AMDVIPCIState),
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void amdviPCI_register_types(void)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index 8238fbc..ba4b8e5 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -1874,6 +1874,10 @@ static const TypeInfo assign_info = {
     .instance_size      = sizeof(AssignedDevice),
     .class_init         = assign_class_init,
     .instance_init      = assigned_dev_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void assign_register_types(void)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a54a468..a59bbb9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1030,6 +1030,10 @@ static TypeInfo isa_bridge_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = isa_bridge_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pt_graphics_register_types(void)
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 2e1e543..8f87f7b 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -472,6 +472,10 @@ static const TypeInfo xen_platform_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIXenPlatformState),
     .class_init    = xen_platform_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void xen_platform_register_types(void)
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index c093b34..e2ae81b 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -127,6 +127,10 @@ static const TypeInfo xen_pv_type_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(XenPVDevice),
     .class_init    = xen_pv_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void xen_pv_register_types(void)
diff --git a/hw/ide/ich.c b/hw/ide/ich.c
index 4599169..9c0171a 100644
--- a/hw/ide/ich.c
+++ b/hw/ide/ich.c
@@ -184,6 +184,10 @@ static const TypeInfo ich_ahci_info = {
     .instance_size = sizeof(AHCIPCIState),
     .instance_init = pci_ich9_ahci_init,
     .class_init    = ich_ahci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ich_ahci_register_types(void)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 3cfb510..f437298 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -458,6 +458,10 @@ static const TypeInfo pci_ide_type_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIIDEState),
     .abstract = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_ide_register_types(void)
diff --git a/hw/ipack/tpci200.c b/hw/ipack/tpci200.c
index 4dfa6b3..e380378 100644
--- a/hw/ipack/tpci200.c
+++ b/hw/ipack/tpci200.c
@@ -646,6 +646,10 @@ static const TypeInfo tpci200_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(TPCI200State),
     .class_init    = tpci200_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void tpci200_register_types(void)
diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c
index 4d29a99..13702b8 100644
--- a/hw/isa/i82378.c
+++ b/hw/isa/i82378.c
@@ -138,6 +138,10 @@ static const TypeInfo i82378_type_info = {
     .instance_size = sizeof(I82378State),
     .instance_init = i82378_init,
     .class_init = i82378_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void i82378_register_types(void)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 10d1ee8..e7c9d32 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -739,6 +739,7 @@ static const TypeInfo ich9_lpc_info = {
     .interfaces = (InterfaceInfo[]) {
         { TYPE_HOTPLUG_HANDLER },
         { TYPE_ACPI_DEVICE_IF },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     }
 };
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 5500fcc..b7f2c6c 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -132,6 +132,10 @@ static const TypeInfo piix4_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PIIX4State),
     .class_init    = piix4_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void piix4_register_types(void)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 41d5254..db38b76 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -301,6 +301,10 @@ static const TypeInfo via_ac97_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(VT686AC97State),
     .class_init    = via_ac97_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void vt82c686b_mc97_realize(PCIDevice *dev, Error **errp)
@@ -341,6 +345,10 @@ static const TypeInfo via_mc97_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(VT686MC97State),
     .class_init    = via_mc97_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 /* vt82c686 pm init */
@@ -419,6 +427,10 @@ static const TypeInfo via_pm_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(VT686PMState),
     .class_init    = via_pm_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static const VMStateDescription vmstate_via = {
@@ -502,6 +514,10 @@ static const TypeInfo via_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(VT82C686BState),
     .class_init    = via_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void vt82c686b_register_types(void)
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index 4811843..b4bf5c0 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -1232,6 +1232,10 @@ static const TypeInfo gt64120_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = gt64120_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void gt64120_class_init(ObjectClass *klass, void *data)
diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index 529721a..e8871d9 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -412,6 +412,10 @@ static const TypeInfo edu_info = {
     .instance_size = sizeof(EduState),
     .instance_init = edu_instance_init,
     .class_init    = edu_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_edu_register_types(void)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index abeaf3d..b6b3f53 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -1003,6 +1003,10 @@ static const TypeInfo ivshmem_common_info = {
     .instance_size = sizeof(IVShmemState),
     .abstract      = true,
     .class_init    = ivshmem_common_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ivshmem_check_memdev_is_busy(Object *obj, const char *name,
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 5d57f45..fa163e3 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -415,6 +415,10 @@ static const TypeInfo macio_type_info = {
     .instance_init = macio_instance_init,
     .abstract      = true,
     .class_init    = macio_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void macio_register_types(void)
diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
index 7d59902..992157f 100644
--- a/hw/misc/pci-testdev.c
+++ b/hw/misc/pci-testdev.c
@@ -326,6 +326,10 @@ static const TypeInfo pci_testdev_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCITestDevState),
     .class_init    = pci_testdev_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_testdev_register_types(void)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 9324949..3a8e459 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1685,6 +1685,10 @@ static const TypeInfo e1000_base_info = {
     .instance_init = e1000_instance_init,
     .class_size    = sizeof(E1000BaseClass),
     .abstract      = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static const E1000Info e1000_devices[] = {
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index e397d3f..ff905eb 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -702,6 +702,7 @@ static const TypeInfo e1000e_info = {
     .instance_init = e1000e_instance_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 798d681..fce3420 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -786,6 +786,10 @@ static const TypeInfo ne2000_info = {
     .instance_size = sizeof(PCINE2000State),
     .class_init    = ne2000_class_init,
     .instance_init = ne2000_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ne2000_register_types(void)
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index 0acf8a4..cbe6e99 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -365,6 +365,10 @@ static const TypeInfo pcnet_info = {
     .instance_size = sizeof(PCIPCNetState),
     .class_init    = pcnet_class_init,
     .instance_init = pcnet_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_pcnet_register_types(void)
diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c
index e9d215a..c90cf9f 100644
--- a/hw/net/rocker/rocker.c
+++ b/hw/net/rocker/rocker.c
@@ -1574,6 +1574,10 @@ static const TypeInfo rocker_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(Rocker),
     .class_init    = rocker_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void rocker_register_types(void)
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index f05e59c..b24b351 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -3481,6 +3481,10 @@ static const TypeInfo rtl8139_info = {
     .instance_size = sizeof(RTL8139State),
     .class_init    = rtl8139_class_init,
     .instance_init = rtl8139_instance_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void rtl8139_register_types(void)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index e85ebb5..0020c7c 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -2705,6 +2705,7 @@ static const TypeInfo vmxnet3_info = {
     .instance_init = vmxnet3_instance_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/pci-bridge/dec.c b/hw/pci-bridge/dec.c
index 840c961..270344e 100644
--- a/hw/pci-bridge/dec.c
+++ b/hw/pci-bridge/dec.c
@@ -136,6 +136,10 @@ static const TypeInfo dec_21154_pci_host_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = dec_21154_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_dec_21154_device_class_init(ObjectClass *klass, void *data)
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
index 6ac187f..7847479 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -316,6 +316,10 @@ static const TypeInfo pxb_dev_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PXBDev),
     .class_init    = pxb_dev_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pxb_pcie_dev_realize(PCIDevice *dev, Error **errp)
@@ -350,6 +354,10 @@ static const TypeInfo pxb_pcie_dev_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PXBDev),
     .class_init    = pxb_pcie_dev_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pxb_register_types(void)
diff --git a/hw/pci-host/apb.c b/hw/pci-host/apb.c
index 653e711..1a619eb 100644
--- a/hw/pci-host/apb.c
+++ b/hw/pci-host/apb.c
@@ -818,6 +818,10 @@ static const TypeInfo pbm_pci_host_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = pbm_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pbm_host_class_init(ObjectClass *klass, void *data)
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 1999ece..112e47a 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -833,6 +833,10 @@ static const TypeInfo bonito_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIBonitoState),
     .class_init    = bonito_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void bonito_pcihost_class_init(ObjectClass *klass, void *data)
diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c
index 66055ee..6fde7ea 100644
--- a/hw/pci-host/gpex.c
+++ b/hw/pci-host/gpex.c
@@ -144,6 +144,10 @@ static const TypeInfo gpex_root_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(GPEXRootState),
     .class_init = gpex_root_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void gpex_register(void)
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 2c8acda..4728d06 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -142,6 +142,10 @@ static const TypeInfo grackle_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = grackle_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_grackle_class_init(ObjectClass *klass, void *data)
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index f9218aa..47eb320 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -700,6 +700,10 @@ static const TypeInfo piix3_pci_type_info = {
     .instance_size = sizeof(PIIX3State),
     .abstract = true,
     .class_init = pci_piix3_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void piix3_class_init(ObjectClass *klass, void *data)
@@ -754,6 +758,10 @@ static const TypeInfo i440fx_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCII440FXState),
     .class_init    = i440fx_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 /* IGD Passthrough Host Bridge. */
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
index e502bc0..ae184f5 100644
--- a/hw/pci-host/ppce500.c
+++ b/hw/pci-host/ppce500.c
@@ -516,6 +516,10 @@ static const TypeInfo e500_host_bridge_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PPCE500PCIBridgeState),
     .class_init    = e500_host_bridge_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static Property pcihost_properties[] = {
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 5580293..8276086 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -371,6 +371,10 @@ static const TypeInfo raven_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(RavenPCIState),
     .class_init = raven_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static Property raven_pcihost_properties[] = {
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 344f77b..d4e3109 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -557,6 +557,10 @@ static const TypeInfo mch_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(MCHPCIState),
     .class_init = mch_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void q35_register(void)
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 7aac4d6..f363dc4 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -376,6 +376,10 @@ static const TypeInfo unin_main_pci_host_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = unin_main_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void u3_agp_pci_host_class_init(ObjectClass *klass, void *data)
@@ -400,6 +404,10 @@ static const TypeInfo u3_agp_pci_host_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = u3_agp_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void unin_agp_pci_host_class_init(ObjectClass *klass, void *data)
@@ -424,6 +432,10 @@ static const TypeInfo unin_agp_pci_host_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = unin_agp_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void unin_internal_pci_host_class_init(ObjectClass *klass, void *data)
@@ -448,6 +460,10 @@ static const TypeInfo unin_internal_pci_host_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init = unin_internal_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_unin_main_class_init(ObjectClass *klass, void *data)
diff --git a/hw/pci-host/versatile.c b/hw/pci-host/versatile.c
index 467cbb9..8344e6f 100644
--- a/hw/pci-host/versatile.c
+++ b/hw/pci-host/versatile.c
@@ -487,6 +487,10 @@ static const TypeInfo versatile_pci_host_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = versatile_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static Property pci_vpb_properties[] = {
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 5118ef4..a153c72 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -409,6 +409,10 @@ static const TypeInfo pci_bridge_type_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIBridge),
     .abstract = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void pci_bridge_register_types(void)
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index 683218e..1e1b0b1 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -366,6 +366,10 @@ static const TypeInfo ppc4xx_host_bridge_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = ppc4xx_host_bridge_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ppc4xx_pcihost_class_init(ObjectClass *klass, void *data)
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index 595f88b..91a8e60 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -401,6 +401,10 @@ static const TypeInfo esp_pci_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIESPState),
     .class_init = esp_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 typedef struct {
diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index feb1191..bdc3201 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -2249,6 +2249,10 @@ static const TypeInfo lsi_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(LSIState),
     .class_init    = lsi_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void lsi53c810_class_init(ObjectClass *klass, void *data)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index dbccc1b..d5c42b1 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2527,6 +2527,10 @@ static const TypeInfo megasas_info = {
     .instance_size = sizeof(MegasasState),
     .class_size = sizeof(MegasasBaseClass),
     .abstract = true,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void megasas_register_types(void)
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index ad87e78..b890f4a 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -1445,6 +1445,10 @@ static const TypeInfo mptsas_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(MPTSASState),
     .class_init = mptsas1068_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void mptsas_register_types(void)
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index e75c010..72c514d 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -1290,6 +1290,7 @@ static const TypeInfo pvscsi_info = {
     .interfaces = (InterfaceInfo[]) {
         { TYPE_HOTPLUG_HANDLER },
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     }
 };
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 01fbf22..6907a77 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1314,6 +1314,10 @@ static const TypeInfo sdhci_pci_info = {
     .parent = TYPE_PCI_DEVICE,
     .instance_size = sizeof(SDHCIState),
     .class_init = sdhci_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static Property sdhci_sysbus_properties[] = {
diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c
index 1747628..e80a5f2 100644
--- a/hw/sh4/sh_pci.c
+++ b/hw/sh4/sh_pci.c
@@ -179,6 +179,10 @@ static const TypeInfo sh_pci_host_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(PCIDevice),
     .class_init    = sh_pci_host_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void sh_pci_device_class_init(ObjectClass *klass, void *data)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 4663315..2685e07 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -578,6 +578,10 @@ static const TypeInfo ebus_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(EbusState),
     .class_init    = ebus_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 #define TYPE_OPENPROM "openprom"
diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c
index 5657705..8da49b5 100644
--- a/hw/usb/hcd-ehci-pci.c
+++ b/hw/usb/hcd-ehci-pci.c
@@ -161,6 +161,10 @@ static const TypeInfo ehci_pci_type_info = {
     .instance_init = usb_ehci_pci_init,
     .abstract = true,
     .class_init = ehci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void ehci_data_class_init(ObjectClass *klass, void *data)
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index c82a92f..03b0584 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -2135,6 +2135,10 @@ static const TypeInfo ohci_pci_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(OHCIPCIState),
     .class_init    = ohci_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static Property ohci_sysbus_properties[] = {
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index ca72a80..dbdf8cb 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -1323,6 +1323,10 @@ static const TypeInfo uhci_pci_type_info = {
     .class_size    = sizeof(UHCIPCIDeviceClass),
     .abstract = true,
     .class_init = uhci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void uhci_data_class_init(ObjectClass *klass, void *data)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 1a47c9e..afbe889 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3963,6 +3963,7 @@ static const TypeInfo xhci_info = {
     .class_init    = xhci_class_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index 811eecd..29dc85d 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -1195,6 +1195,10 @@ static TypeInfo vfio_pci_igd_lpc_bridge_info = {
     .name = "vfio-pci-igd-lpc-bridge",
     .parent = TYPE_PCI_DEVICE,
     .class_init = vfio_pci_igd_lpc_bridge_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void vfio_pci_igd_register_types(void)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 2507fdf..1a57c0f 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2984,6 +2984,7 @@ static const TypeInfo vfio_pci_dev_info = {
     .instance_finalize = vfio_instance_finalize,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 8ca9ea7..356034a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1883,6 +1883,7 @@ static const TypeInfo virtio_pci_info = {
     .abstract      = true,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
+        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c
index a83d951..ad6d9f1 100644
--- a/hw/watchdog/wdt_i6300esb.c
+++ b/hw/watchdog/wdt_i6300esb.c
@@ -454,6 +454,10 @@ static const TypeInfo i6300esb_info = {
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(I6300State),
     .class_init    = i6300esb_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void i6300esb_register_types(void)
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index b6d71bb..fb5022c 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -964,6 +964,10 @@ static const TypeInfo xen_pci_passthrough_info = {
     .instance_size = sizeof(XenPCIPassthroughState),
     .instance_finalize = xen_pci_passthrough_finalize,
     .class_init = xen_pci_passthrough_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_LEGACY_PCI_DEVICE },
+        { },
+    },
 };
 
 static void xen_pci_passthrough_register_types(void)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 15/20] eepro100: Add INTERFACE_LEGACY_PCI_DEVICE
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (13 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 14/20] [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices Eduardo Habkost
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Dynamic TypeInfo initialization, not handled by the script used
in the previous patch.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/net/eepro100.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index 4bf71f2..5b55e31 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -2101,12 +2101,17 @@ static void eepro100_register_types(void)
     for (i = 0; i < ARRAY_SIZE(e100_devices); i++) {
         TypeInfo type_info = {};
         E100PCIDeviceInfo *info = &e100_devices[i];
+        InterfaceInfo interfaces[] = {
+            { INTERFACE_LEGACY_PCI_DEVICE },
+            { },
+        };
 
         type_info.name = info->name;
         type_info.parent = TYPE_PCI_DEVICE;
         type_info.class_init = eepro100_class_init;
         type_info.instance_size = sizeof(EEPRO100State);
         type_info.instance_init = eepro100_instance_init;
+        type_info.interfaces = interfaces;
 
         type_register(&type_info);
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (14 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 15/20] eepro100: Add INTERFACE_LEGACY_PCI_DEVICE Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 17/20] pci: Set device_type on bus classes Eduardo Habkost
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

With this, only vmxnet3, pvscsi, vfio-pci, virtio-pci kept both
interfaces.

TODO: The pci-bridge classes still need to be redone, see FIXME
comments.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/block/nvme.c                    |  1 -
 hw/net/e1000e.c                    |  1 -
 hw/pci-bridge/ioh3420.c            |  1 +
 hw/pci-bridge/xio3130_downstream.c |  1 +
 hw/pci-bridge/xio3130_upstream.c   |  1 +
 hw/scsi/megasas.c                  | 14 +++++++-------
 hw/usb/hcd-xhci.c                  |  1 -
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index eb85c1a..02cf1eb 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -981,7 +981,6 @@ static const TypeInfo nvme_info = {
     .instance_init = nvme_instance_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
-        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index ff905eb..e397d3f 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -702,7 +702,6 @@ static const TypeInfo e1000e_info = {
     .instance_init = e1000e_instance_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
-        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index 3ee2990..69ba16c 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -209,6 +209,7 @@ static const TypeInfo ioh3420_info = {
     .parent        = TYPE_PCIE_SLOT,
     .class_init    = ioh3420_class_init,
     .interfaces = (InterfaceInfo[]) {
+        /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */
         { INTERFACE_PCIE_DEVICE },
         { }
     },
diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
index 8320777..e9a0974 100644
--- a/hw/pci-bridge/xio3130_downstream.c
+++ b/hw/pci-bridge/xio3130_downstream.c
@@ -195,6 +195,7 @@ static const TypeInfo xio3130_downstream_info = {
     .parent        = TYPE_PCIE_SLOT,
     .class_init    = xio3130_downstream_class_init,
     .interfaces = (InterfaceInfo[]) {
+        /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */
         { INTERFACE_PCIE_DEVICE },
         { }
     },
diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c
index b6361c3..77dfd16 100644
--- a/hw/pci-bridge/xio3130_upstream.c
+++ b/hw/pci-bridge/xio3130_upstream.c
@@ -166,6 +166,7 @@ static const TypeInfo xio3130_upstream_info = {
     .parent        = TYPE_PCIE_PORT,
     .class_init    = xio3130_upstream_class_init,
     .interfaces = (InterfaceInfo[]) {
+        /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */
         { INTERFACE_PCIE_DEVICE },
         { }
     },
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index d5c42b1..c30d3e6 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2527,10 +2527,6 @@ static const TypeInfo megasas_info = {
     .instance_size = sizeof(MegasasState),
     .class_size = sizeof(MegasasBaseClass),
     .abstract = true,
-    .interfaces = (InterfaceInfo[]) {
-        { INTERFACE_LEGACY_PCI_DEVICE },
-        { },
-    },
 };
 
 static void megasas_register_types(void)
@@ -2545,14 +2541,18 @@ static void megasas_register_types(void)
             { INTERFACE_PCIE_DEVICE },
             { },
         };
+        InterfaceInfo legacy_interfaces[] = {
+            { INTERFACE_LEGACY_PCI_DEVICE },
+            { },
+        };
 
         type_info.name = info->name;
         type_info.parent = TYPE_MEGASAS_BASE;
         type_info.class_data = (void *)info;
         type_info.class_init = megasas_class_init;
-        if (info->is_express) {
-            type_info.interfaces = pcie_interfaces;
-        }
+        type_info.interfaces = info->is_express ?
+                               pcie_interfaces :
+                               legacy_interfaces;
 
         type_register(&type_info);
     }
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index afbe889..1a47c9e 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3963,7 +3963,6 @@ static const TypeInfo xhci_info = {
     .class_init    = xhci_class_init,
     .interfaces = (InterfaceInfo[]) {
         { INTERFACE_PCIE_DEVICE },
-        { INTERFACE_LEGACY_PCI_DEVICE },
         { }
     },
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 17/20] pci: Set device_type on bus classes
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (15 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices Eduardo Habkost
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

The default device_type for for TYPE_PCI_BUS will be
INTERFACE_LEGACY_PCI_DEVICE. The device_type for TYPE_PCIE_BUS
will be INTERFACE_PCIE_DEVICE.

Note that specific bus instances may still override
accepted_device_types. See the comments added to the code.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/pci/pci.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 2fc543c..19dc63a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -152,7 +152,10 @@ static void pci_bus_class_init(ObjectClass *klass, void *data)
     k->realize = pci_bus_realize;
     k->unrealize = pci_bus_unrealize;
     k->reset = pcibus_reset;
-    k->device_type = TYPE_PCI_DEVICE;
+    /* note that TYPE_PCIE_BUS is a TYPE_PCI_BUS subclass,
+     * but overrides BusClass::device_type to INTERFACE_PCIE_DEVICE
+     */
+    k->device_type = INTERFACE_LEGACY_PCI_DEVICE;
 
     pbc->is_root = pcibus_is_root;
     pbc->bus_num = pcibus_num;
@@ -177,8 +180,19 @@ static const TypeInfo legacy_pci_interface_info = {
     .parent        = TYPE_INTERFACE,
 };
 
+static void pcie_bus_class_init(ObjectClass *oc, void *opaque)
+{
+    BusClass *bc = BUS_CLASS(oc);
+    /* Note that this is the default value for accepted_device_types,
+     * but specific PCIe bus instances may override it.
+     * (e.g. q35 root bus accepts both legacy and PCIe devices).
+     */
+    bc->device_type = INTERFACE_PCIE_DEVICE;
+}
+
 static const TypeInfo pcie_bus_info = {
     .name = TYPE_PCIE_BUS,
+    .class_init = pcie_bus_class_init,
     .parent = TYPE_PCI_BUS,
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (16 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 17/20] pci: Set device_type on bus classes Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 19/20] pci: validate interfaces on base_class_init Eduardo Habkost
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

I don't know where in the code this information should be
encoded, so suggestions are welcome.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/pci-host/q35.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index d4e3109..29a5e39 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -52,6 +52,16 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
     pci->bus = pci_bus_new(DEVICE(s), "pcie.0",
                            s->mch.pci_address_space, s->mch.address_space_io,
                            0, TYPE_PCIE_BUS);
+
+    {
+    /* The root PCIe bus is different, and also accepts legacy PCI devices */
+    /*FIXME: we need to find a better plance to encode this information */
+    strList *new = g_new0(strList, 1);
+    new->value = g_strdup(INTERFACE_LEGACY_PCI_DEVICE);
+    new->next = BUS(pci->bus)->accepted_device_types;
+    BUS(pci->bus)->accepted_device_types = new;
+    }
+
     PC_MACHINE(qdev_get_machine())->bus = pci->bus;
     qdev_set_parent_bus(DEVICE(&s->mch), BUS(pci->bus));
     qdev_init_nofail(DEVICE(&s->mch));
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 19/20] pci: validate interfaces on base_class_init
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (17 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 20/20] pc: Initialize default bus lists Eduardo Habkost
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Make sure we don't forget to add the legacy-PCI or PCIe interface
names on any PCI device class.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2:
* (new patch added to series)
---
 hw/pci/pci.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 19dc63a..2eac71a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2521,6 +2521,17 @@ static void pci_device_class_init(ObjectClass *klass, void *data)
     pc->realize = pci_default_realize;
 }
 
+static void pci_device_class_base_init(ObjectClass *klass, void *data)
+{
+    if (!object_class_is_abstract(klass)) {
+        ObjectClass *legacy =
+            object_class_dynamic_cast(klass, INTERFACE_LEGACY_PCI_DEVICE);
+        ObjectClass *pcie =
+            object_class_dynamic_cast(klass, INTERFACE_PCIE_DEVICE);
+        assert(legacy || pcie);
+    }
+}
+
 AddressSpace *pci_device_iommu_address_space(PCIDevice *dev)
 {
     PCIBus *bus = PCI_BUS(dev->bus);
@@ -2645,6 +2656,7 @@ static const TypeInfo pci_device_type_info = {
     .abstract = true,
     .class_size = sizeof(PCIDeviceClass),
     .class_init = pci_device_class_init,
+    .class_base_init = pci_device_class_base_init,
 };
 
 static void pci_register_types(void)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [Qemu-devel] [RFC v2 20/20] pc: Initialize default bus lists
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (18 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 19/20] pci: validate interfaces on base_class_init Eduardo Habkost
@ 2016-11-25 22:05 ` Eduardo Habkost
  2016-11-29  5:06 ` [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines' no-reply
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-25 22:05 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

Populate the always_available_buses list for the PC machines.
This will allow qmp-machine-info.py to run in strict mode for
x86.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* Use the new machine_class_add_always_available_bus() function,
  include bus IDs
* Report legacy PCI and PCIe on q35 pcie.0 bus
* Make sure legacy PCI is reported on i440fx
---
 hw/i386/pc.c      |  1 +
 hw/i386/pc_piix.c | 25 +++++++++++++++++++++++++
 hw/i386/pc_q35.c  | 21 +++++++++++++++++++++
 3 files changed, 47 insertions(+)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a9e64a8..67e41c1 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2298,6 +2298,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
     mc->hot_add_cpu = pc_hot_add_cpu;
     mc->max_cpus = 255;
     mc->reset = pc_machine_reset;
+    machine_class_add_always_available_bus(mc, "sysbus", TYPE_SYSTEM_BUS);
     hc->pre_plug = pc_machine_device_pre_plug_cb;
     hc->plug = pc_machine_device_plug_cb;
     hc->unplug_request = pc_machine_device_unplug_request_cb;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index a59bbb9..d0162a9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -430,11 +430,26 @@ static void pc_xen_hvm_init(MachineState *machine)
 
 static void pc_i440fx_machine_options(MachineClass *m)
 {
+    MachineBusInfo *pci0;
+
     m->family = "pc_piix";
     m->desc = "Standard PC (i440FX + PIIX, 1996)";
     m->hot_add_cpu = pc_hot_add_cpu;
     m->default_machine_opts = "firmware=bios-256k.bin";
     m->default_display = "std";
+    pci0 = machine_class_add_always_available_bus(m, "pci.0", TYPE_PCI_BUS);
+
+    /* Sanity check to ensure we are reporting only legacy PCI devices as supported */
+    assert(pci0->accepted_device_types != NULL &&
+           pci0->accepted_device_types->next == NULL &&
+           !strcmp(pci0->accepted_device_types->value,
+                     INTERFACE_LEGACY_PCI_DEVICE));
+
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "isa.0", TYPE_ISA_BUS);
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro
 }
 
 static void pc_i440fx_2_8_machine_options(MachineClass *m)
@@ -1083,6 +1098,10 @@ static void isapc_machine_options(MachineClass *m)
     m->max_cpus = 1;
     m->option_rom_has_mr = true;
     m->rom_file_has_mr = false;
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "isa.0", TYPE_ISA_BUS);
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro
     pcmc->pci_enabled = false;
     pcmc->has_acpi_build = false;
     pcmc->smbios_defaults = false;
@@ -1102,6 +1121,12 @@ static void xenfv_machine_options(MachineClass *m)
     m->max_cpus = HVM_MAX_VCPUS;
     m->default_machine_opts = "accel=xen";
     m->hot_add_cpu = pc_hot_add_cpu;
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "pci.0", TYPE_PCI_BUS);
+    machine_class_add_always_available_bus(m, "isa.0", TYPE_ISA_BUS);
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro
 }
 
 DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index b40d19e..11f918c 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -283,6 +283,9 @@ static void pc_q35_init(MachineState *machine)
 
 static void pc_q35_machine_options(MachineClass *m)
 {
+    MachineBusInfo *pcie;
+    strList *new;
+
     m->family = "pc_q35";
     m->desc = "Standard PC (Q35 + ICH9, 2009)";
     m->hot_add_cpu = pc_hot_add_cpu;
@@ -292,6 +295,24 @@ static void pc_q35_machine_options(MachineClass *m)
     m->no_floppy = 1;
     m->has_dynamic_sysbus = true;
     m->max_cpus = 288;
+
+    pcie = machine_class_add_always_available_bus(m, "pcie.0", TYPE_PCIE_BUS);
+    /* The root bus doesn't use the TYPE_PCIE_BUS default: it also accepts
+     * legacy PCI devices.
+     */
+    new = g_new0(strList, 1);
+    new->value = g_strdup(INTERFACE_LEGACY_PCI_DEVICE);
+    new->next = pcie->accepted_device_types;
+    pcie->accepted_device_types = new;
+
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro
+    machine_class_add_always_available_bus(m, "isa.0", TYPE_ISA_BUS);
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.2", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.3", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.4", "IDE");//FIXME: use macro
+    machine_class_add_always_available_bus(m, "ide.5", "IDE");//FIXME: use macro
 }
 
 static void pc_q35_2_8_machine_options(MachineClass *m)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (19 preceding siblings ...)
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 20/20] pc: Initialize default bus lists Eduardo Habkost
@ 2016-11-29  5:06 ` no-reply
  2016-11-29 13:26 ` no-reply
  2016-11-29 17:57 ` [Qemu-devel] " Eduardo Habkost
  22 siblings, 0 replies; 27+ messages in thread
From: no-reply @ 2016-11-29  5:06 UTC (permalink / raw)
  To: ehabkost
  Cc: famz, qemu-devel, armbru, marcel, mst, david, libvir-list,
	abologna, groug, aik, laine, cornelia.huck, david

Hi,

Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.

Subject: [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
Type: series
Message-id: 1480111556-32586-1-git-send-email-ehabkost@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=16
make docker-test-quick@centos6
make docker-test-mingw@fedora
make docker-test-build@min-glib
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1480324926-24761-1-git-send-email-yuval.shaia@oracle.com -> patchew/1480324926-24761-1-git-send-email-yuval.shaia@oracle.com
 * [new tag]         patchew/1480348337-24271-1-git-send-email-francis.deslauriers@efficios.com -> patchew/1480348337-24271-1-git-send-email-francis.deslauriers@efficios.com
 * [new tag]         patchew/1480372837-109736-1-git-send-email-pbonzini@redhat.com -> patchew/1480372837-109736-1-git-send-email-pbonzini@redhat.com
 - [tag update]      patchew/1480386565-10077-1-git-send-email-liq3ea@gmail.com -> patchew/1480386565-10077-1-git-send-email-liq3ea@gmail.com
Switched to a new branch 'test'
90c47fa pc: Initialize default bus lists
5e7855e pci: validate interfaces on base_class_init
ccf7181 q35: Hack to make root bus accept legacy PCI devices
e19e7f6 pci: Set device_type on bus classes
4c1b8d0 remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices
687122f eepro100: Add INTERFACE_LEGACY_PCI_DEVICE
87a772c Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses
7d11921 edu: Move edu_info outside function
b64206d pci: Replace is_express with INTERFACE_PCIE_DEVICE
4117fca pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces
87f4a44 pvscsi: Set PCIDeviceClass::is_express=1
d77fcbc vmxnet3: Set PCIDeviceClass::is_express=1
be0dded virtio-pci: Set PCIDeviceClass::is_express=1
01c88b9 qmp: Add 'always-available-buses' field to 'query-machines'
3b00160 qdev: Add 'accepted-device-types' property to BusClass
7b98dda tests: Add rules to non-gtester qtest test cases
9dc8f87 qtest.py: Make 'binary' parameter optional
913752f qtest.py: make logging optional
a2621f3 qtest.py: Support QTEST_LOG environment variable
e765e8c qemu.py: Make logging optional

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
  BUILD   centos6
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-_m72g0m_/src'
  ARCHIVE qemu.tgz
  ARCHIVE dtc.tgz
  COPY    RUNNER
    RUN test-quick in qemu:centos6 
Packages installed:
SDL-devel-1.2.14-7.el6_7.1.x86_64
ccache-3.1.6-2.el6.x86_64
epel-release-6-8.noarch
gcc-4.4.7-17.el6.x86_64
git-1.7.1-4.el6_7.1.x86_64
glib2-devel-2.28.8-5.el6.x86_64
libfdt-devel-1.4.0-1.el6.x86_64
make-3.81-23.el6.x86_64
package g++ is not installed
pixman-devel-0.32.8-1.el6.x86_64
tar-1.23-15.el6_8.x86_64
zlib-devel-1.2.3-29.el6.x86_64

Environment variables:
PACKAGES=libfdt-devel ccache     tar git make gcc g++     zlib-devel glib2-devel SDL-devel pixman-devel     epel-release
HOSTNAME=1aee87ba3b6a
TERM=xterm
MAKEFLAGS= -j16
HISTSIZE=1000
J=16
USER=root
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
MAIL=/var/spool/mail/root
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
LANG=en_US.UTF-8
TARGET_LIST=
HISTCONTROL=ignoredups
SHLVL=1
HOME=/root
TEST_DIR=/tmp/qemu-test
LOGNAME=root
LESSOPEN=||/usr/bin/lesspipe.sh %s
FEATURES= dtc
DEBUG=
G_BROKEN_FILENAMES=1
CCACHE_HASHDIR=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/var/tmp/qemu-build/install
No C++ compiler available; disabling C++ specific optional code
Install prefix    /var/tmp/qemu-build/install
BIOS directory    /var/tmp/qemu-build/install/share/qemu
binary directory  /var/tmp/qemu-build/install/bin
library directory /var/tmp/qemu-build/install/lib
module directory  /var/tmp/qemu-build/install/lib/qemu
libexec directory /var/tmp/qemu-build/install/libexec
include directory /var/tmp/qemu-build/install/include
config directory  /var/tmp/qemu-build/install/etc
local state directory   /var/tmp/qemu-build/install/var
Manual directory  /var/tmp/qemu-build/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /tmp/qemu-test/src
C compiler        cc
Host C compiler   cc
C++ compiler      
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1    -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu aarch64-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.14)
GTK support       no 
GTK GL support    no
VTE support       no 
TLS priority      NORMAL
GNUTLS support    no
GNUTLS rnd        no
libgcrypt         no
libgcrypt kdf     no
nettle            no 
nettle kdf        no
libtasn1          no
curses support    no
virgl support     no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    no
VNC support       yes
VNC SASL support  no
VNC JPEG support  no
VNC PNG support   no
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
PIE               yes
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
COLO support      yes
RDMA support      no
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes
Trace backends    log
spice support     no 
rbd support       no
xfsctl support    no
smartcard support no
libusb            no
usb net redir     no
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  no
libnfs support    no
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   no
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
GlusterFS support no
Archipelago support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   no
TPM passthrough   yes
QOM debugging     yes
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support no
tcmalloc support  no
jemalloc support  no
avx2 optimization no
replication support yes
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     config-host.h
  GEN     qemu-options.def
  GEN     qmp-commands.h
  GEN     qapi-types.h
  GEN     qapi-visit.h
  GEN     qapi-event.h
  GEN     qmp-introspect.h
  GEN     x86_64-softmmu/config-devices.mak
  GEN     aarch64-softmmu/config-devices.mak
  GEN     module_block.h
  GEN     tests/test-qapi-types.h
  GEN     tests/test-qapi-visit.h
  GEN     tests/test-qmp-commands.h
  GEN     tests/test-qapi-event.h
  GEN     tests/test-qmp-introspect.h
  GEN     trace/generated-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers.h
  GEN     config-all-devices.mak
  CC      tests/qemu-iotests/socket_scm_helper.o
  GEN     qga/qapi-generated/qga-qapi-types.h
  GEN     qga/qapi-generated/qga-qmp-commands.h
  GEN     qga/qapi-generated/qga-qapi-visit.h
  GEN     qga/qapi-generated/qga-qapi-types.c
  GEN     qga/qapi-generated/qga-qapi-visit.c
  GEN     qga/qapi-generated/qga-qmp-marshal.c
  GEN     qmp-introspect.c
  GEN     qapi-types.c
  GEN     qapi-visit.c
  GEN     qapi-event.c
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qint.o
  CC      qobject/qstring.o
  CC      qobject/qdict.o
  CC      qobject/qlist.o
  CC      qobject/qfloat.o
  CC      qobject/qbool.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  GEN     trace/generated-tracers.c
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/cutils.o
  CC      util/unicode.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/compatfd.o
  CC      util/event_notifier-posix.o
  CC      util/mmap-alloc.o
  CC      util/oslib-posix.o
  CC      util/qemu-openpty.o
  CC      util/qemu-thread-posix.o
  CC      util/memfd.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/fifo8.o
  CC      util/acl.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/uuid.o
  CC      util/throttle.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-ucontext.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/qdist.o
  CC      util/qht.o
  CC      util/range.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blk-commit-all.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/dump.o
  CC      stubs/error-printf.o
  CC      stubs/fdset-add-fd.o
  CC      stubs/fdset-find-fd.o
  CC      stubs/fdset-get-fd.o
  CC      stubs/fdset-remove-fd.o
  CC      stubs/gdbstub.o
  CC      stubs/get-fd.o
  CC      stubs/get-next-serial.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/mon-is-qmp.o
  CC      stubs/monitor-init.o
  CC      stubs/notify-event.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/replay-user.o
  CC      stubs/reset.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/cpus.o
  CC      stubs/kvm.o
  CC      stubs/qmp_pc_dimm_device_list.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/vhost.o
  CC      stubs/iohandler.o
  CC      stubs/smbios_type_38.o
  CC      stubs/ipmi.o
  CC      stubs/pc_madt_cpu_entry.o
  CC      stubs/migration-colo.o
  CC      contrib/ivshmem-client/ivshmem-client.o
  CC      contrib/ivshmem-client/main.o
  CC      contrib/ivshmem-server/ivshmem-server.o
  CC      contrib/ivshmem-server/main.o
  CC      qemu-nbd.o
  CC      async.o
  CC      thread-pool.o
  CC      block.o
  CC      blockjob.o
  CC      main-loop.o
  CC      iohandler.o
  CC      qemu-timer.o
  CC      aio-posix.o
  CC      qemu-io-cmds.o
  CC      replication.o
  CC      block/qcow.o
  CC      block/raw_bsd.o
  CC      block/vdi.o
  CC      block/vmdk.o
  CC      block/cloop.o
  CC      block/bochs.o
  CC      block/vpc.o
  CC      block/vvfat.o
  CC      block/dmg.o
  CC      block/qcow2.o
  CC      block/qcow2-refcount.o
  CC      block/qcow2-cluster.o
  CC      block/qcow2-snapshot.o
  CC      block/qcow2-cache.o
  CC      block/qed.o
  CC      block/qed-gencb.o
  CC      block/qed-l2-cache.o
  CC      block/qed-table.o
  CC      block/qed-cluster.o
  CC      block/qed-check.o
  CC      block/vhdx.o
  CC      block/vhdx-endian.o
  CC      block/vhdx-log.o
  CC      block/quorum.o
  CC      block/parallels.o
  CC      block/blkdebug.o
  CC      block/blkverify.o
  CC      block/blkreplay.o
  CC      block/block-backend.o
  CC      block/snapshot.o
  CC      block/qapi.o
  CC      block/raw-posix.o
  CC      block/null.o
  CC      block/mirror.o
  CC      block/commit.o
  CC      block/io.o
  CC      block/throttle-groups.o
  CC      block/nbd.o
  CC      block/nbd-client.o
  CC      block/sheepdog.o
  CC      block/accounting.o
  CC      block/dirty-bitmap.o
  CC      block/write-threshold.o
  CC      block/backup.o
  CC      block/replication.o
  CC      block/crypto.o
  CC      nbd/server.o
  CC      nbd/client.o
  CC      nbd/common.o
  CC      crypto/init.o
  CC      crypto/hash.o
  CC      crypto/hash-glib.o
  CC      crypto/aes.o
  CC      crypto/desrfb.o
  CC      crypto/cipher.o
  CC      crypto/tlscreds.o
  CC      crypto/tlscredsanon.o
  CC      crypto/tlscredsx509.o
  CC      crypto/tlssession.o
  CC      crypto/secret.o
  CC      crypto/random-platform.o
  CC      crypto/pbkdf.o
  CC      crypto/ivgen.o
  CC      crypto/ivgen-essiv.o
  CC      crypto/ivgen-plain.o
  CC      crypto/ivgen-plain64.o
  CC      crypto/afsplit.o
  CC      crypto/xts.o
  CC      crypto/block.o
  CC      crypto/block-qcow.o
  CC      crypto/block-luks.o
  CC      io/channel.o
  CC      io/channel-buffer.o
  CC      io/channel-command.o
  CC      io/channel-file.o
  CC      io/channel-socket.o
  CC      io/channel-tls.o
  CC      io/channel-watch.o
  CC      io/channel-websock.o
  CC      io/channel-util.o
  CC      io/task.o
  CC      qom/object.o
  CC      qom/container.o
  CC      qom/qom-qobject.o
  CC      qom/object_interfaces.o
  GEN     qemu-img-cmds.h
  CC      qemu-bridge-helper.o
  CC      qemu-io.o
  CC      blockdev.o
  CC      blockdev-nbd.o
  CC      iothread.o
  CC      qdev-monitor.o
  CC      device-hotplug.o
  CC      os-posix.o
  CC      qemu-char.o
  CC      page_cache.o
  CC      accel.o
  CC      bt-host.o
  CC      bt-vhci.o
  CC      dma-helpers.o
  CC      vl.o
  CC      tpm.o
  CC      device_tree.o
  GEN     qmp-marshal.c
  CC      qmp.o
  CC      hmp.o
  CC      cpus-common.o
  CC      audio/audio.o
  CC      audio/noaudio.o
  CC      audio/wavaudio.o
  CC      audio/mixeng.o
  CC      audio/sdlaudio.o
  CC      audio/ossaudio.o
  CC      audio/wavcapture.o
  CC      backends/rng.o
  CC      backends/rng-egd.o
  CC      backends/rng-random.o
  CC      backends/msmouse.o
  CC      backends/testdev.o
  CC      backends/tpm.o
  CC      backends/hostmem-ram.o
  CC      backends/hostmem.o
  CC      backends/hostmem-file.o
  CC      backends/cryptodev-builtin.o
  CC      backends/cryptodev.o
  CC      block/stream.o
  CC      disas/arm.o
  CC      disas/i386.o
  CC      fsdev/qemu-fsdev-dummy.o
  CC      fsdev/qemu-fsdev-opts.o
  CC      hw/acpi/core.o
  CC      hw/acpi/piix4.o
  CC      hw/acpi/pcihp.o
  CC      hw/acpi/ich9.o
  CC      hw/acpi/tco.o
  CC      hw/acpi/cpu_hotplug.o
  CC      hw/acpi/memory_hotplug.o
  CC      hw/acpi/memory_hotplug_acpi_table.o
  CC      hw/acpi/cpu.o
  CC      hw/acpi/nvdimm.o
  CC      hw/acpi/acpi_interface.o
  CC      hw/acpi/bios-linker-loader.o
  CC      hw/acpi/aml-build.o
  CC      hw/acpi/ipmi.o
  CC      hw/audio/sb16.o
  CC      hw/audio/es1370.o
  CC      hw/audio/ac97.o
  CC      hw/audio/fmopl.o
  CC      hw/audio/adlib.o
  CC      hw/audio/gus.o
  CC      hw/audio/gusemu_hal.o
  CC      hw/audio/gusemu_mixer.o
  CC      hw/audio/cs4231a.o
  CC      hw/audio/intel-hda.o
  CC      hw/audio/hda-codec.o
  CC      hw/audio/pcspk.o
  CC      hw/audio/wm8750.o
  CC      hw/audio/pl041.o
  CC      hw/audio/lm4549.o
  CC      hw/audio/marvell_88w8618.o
  CC      hw/block/block.o
  CC      hw/block/cdrom.o
  CC      hw/block/hd-geometry.o
  CC      hw/block/fdc.o
  CC      hw/block/m25p80.o
  CC      hw/block/nand.o
  CC      hw/block/pflash_cfi01.o
  CC      hw/block/pflash_cfi02.o
  CC      hw/block/ecc.o
  CC      hw/block/onenand.o
  CC      hw/block/nvme.o
  CC      hw/bt/core.o
  CC      hw/bt/l2cap.o
  CC      hw/bt/hci.o
  CC      hw/bt/sdp.o
  CC      hw/bt/hid.o
  CC      hw/bt/hci-csr.o
  CC      hw/char/ipoctal232.o
  CC      hw/char/parallel.o
  CC      hw/char/pl011.o
  CC      hw/char/serial.o
  CC      hw/char/serial-isa.o
  CC      hw/char/serial-pci.o
  CC      hw/char/virtio-console.o
  CC      hw/char/cadence_uart.o
  CC      hw/char/debugcon.o
  CC      hw/char/imx_serial.o
  CC      hw/core/qdev.o
  CC      hw/core/qdev-properties.o
  CC      hw/core/bus.o
  CC      hw/core/fw-path-provider.o
  CC      hw/core/irq.o
  CC      hw/core/hotplug.o
  CC      hw/core/ptimer.o
  CC      hw/core/sysbus.o
  CC      hw/core/machine.o
  CC      hw/core/null-machine.o
  CC      hw/core/loader.o
  CC      hw/core/qdev-properties-system.o
  CC      hw/core/register.o
  CC      hw/core/or-irq.o
  CC      hw/core/platform-bus.o
  CC      hw/display/ads7846.o
  CC      hw/display/cirrus_vga.o
  CC      hw/display/pl110.o
  CC      hw/display/ssd0303.o
  CC      hw/display/ssd0323.o
  CC      hw/display/vga-pci.o
  CC      hw/display/vga-isa.o
  CC      hw/display/vmware_vga.o
  CC      hw/display/blizzard.o
  CC      hw/display/exynos4210_fimd.o
  CC      hw/display/framebuffer.o
  CC      hw/display/tc6393xb.o
  CC      hw/dma/pl080.o
  CC      hw/dma/pl330.o
  CC      hw/dma/i8257.o
  CC      hw/dma/xlnx-zynq-devcfg.o
  CC      hw/gpio/max7310.o
  CC      hw/gpio/pl061.o
  CC      hw/gpio/zaurus.o
  CC      hw/gpio/gpio_key.o
  CC      hw/i2c/smbus.o
  CC      hw/i2c/core.o
  CC      hw/i2c/i2c-ddc.o
  CC      hw/i2c/smbus_eeprom.o
  CC      hw/i2c/versatile_i2c.o
  CC      hw/i2c/smbus_ich9.o
  CC      hw/i2c/pm_smbus.o
  CC      hw/i2c/bitbang_i2c.o
  CC      hw/i2c/exynos4210_i2c.o
  CC      hw/i2c/imx_i2c.o
  CC      hw/i2c/aspeed_i2c.o
  CC      hw/ide/core.o
  CC      hw/ide/atapi.o
  CC      hw/ide/qdev.o
  CC      hw/ide/pci.o
  CC      hw/ide/isa.o
  CC      hw/ide/piix.o
  CC      hw/ide/microdrive.o
  CC      hw/ide/ahci.o
  CC      hw/ide/ich.o
  CC      hw/input/hid.o
  CC      hw/input/lm832x.o
  CC      hw/input/pckbd.o
  CC      hw/input/pl050.o
  CC      hw/input/ps2.o
  CC      hw/input/stellaris_input.o
  CC      hw/input/tsc2005.o
  CC      hw/input/vmmouse.o
  CC      hw/input/virtio-input.o
  CC      hw/input/virtio-input-hid.o
  CC      hw/input/virtio-input-host.o
  CC      hw/intc/i8259_common.o
  CC      hw/intc/i8259.o
  CC      hw/intc/pl190.o
  CC      hw/intc/imx_avic.o
  CC      hw/intc/realview_gic.o
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/arm_gic_common.o
  CC      hw/intc/arm_gic.o
  CC      hw/intc/arm_gicv2m.o
  CC      hw/intc/arm_gicv3_common.o
  CC      hw/intc/arm_gicv3.o
  CC      hw/intc/arm_gicv3_dist.o
  CC      hw/intc/arm_gicv3_redist.o
  CC      hw/intc/arm_gicv3_its_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipmi/ipmi_bmc_sim.o
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_kcs.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/apm.o
  CC      hw/mem/pc-dimm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/max111x.o
  CC      hw/misc/tmp105.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/arm_l2x0.o
  CC      hw/misc/arm_integrator_debug.o
  CC      hw/misc/a9scu.o
  CC      hw/misc/arm11scu.o
  CC      hw/net/ne2000.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/pcnet.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_tx_pkt.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/e1000e.o
  CC      hw/net/e1000e_core.o
  CC      hw/net/rtl8139.o
  CC      hw/net/vmxnet3.o
  CC      hw/net/smc91c111.o
  CC      hw/net/lan9118.o
  CC      hw/net/ne2000-isa.o
  CC      hw/net/xgmac.o
  CC      hw/net/allwinner_emac.o
  CC      hw/net/imx_fec.o
  CC      hw/net/cadence_gem.o
  CC      hw/net/stellaris_enet.o
  CC      hw/net/rocker/rocker.o
  CC      hw/net/rocker/rocker_fp.o
  CC      hw/net/rocker/rocker_desc.o
  CC      hw/net/rocker/rocker_world.o
  CC      hw/net/rocker/rocker_of_dpa.o
  CC      hw/nvram/eeprom93xx.o
  CC      hw/nvram/fw_cfg.o
  CC      hw/nvram/chrp_nvram.o
  CC      hw/pci-bridge/pci_bridge_dev.o
  CC      hw/pci-bridge/pci_expander_bridge.o
  CC      hw/pci-bridge/xio3130_upstream.o
  CC      hw/pci-bridge/xio3130_downstream.o
  CC      hw/pci-bridge/ioh3420.o
  CC      hw/pci-bridge/i82801b11.o
  CC      hw/pci-host/pam.o
  CC      hw/pci-host/versatile.o
  CC      hw/pci-host/piix.o
  CC      hw/pci-host/q35.o
  CC      hw/pci-host/gpex.o
  CC      hw/pci/pci.o
  CC      hw/pci/pci_bridge.o
  CC      hw/pci/msix.o
  CC      hw/pci/msi.o
  CC      hw/pci/shpc.o
  CC      hw/pci/slotid_cap.o
  CC      hw/pci/pci_host.o
  CC      hw/pci/pcie_host.o
  CC      hw/pci/pcie.o
  CC      hw/pci/pcie_aer.o
  CC      hw/pci/pcie_port.o
  CC      hw/pci/pci-stub.o
  CC      hw/pcmcia/pcmcia.o
  CC      hw/scsi/scsi-disk.o
  CC      hw/scsi/scsi-generic.o
  CC      hw/scsi/scsi-bus.o
  CC      hw/scsi/lsi53c895a.o
  CC      hw/scsi/mptsas.o
/tmp/qemu-test/src/hw/nvram/fw_cfg.c: In function ‘fw_cfg_dma_transfer’:
/tmp/qemu-test/src/hw/nvram/fw_cfg.c:329: warning: ‘read’ may be used uninitialized in this function
  CC      hw/scsi/mptconfig.o
  CC      hw/scsi/mptendian.o
  CC      hw/scsi/megasas.o
  CC      hw/scsi/vmw_pvscsi.o
  CC      hw/scsi/esp.o
  CC      hw/scsi/esp-pci.o
  CC      hw/sd/pl181.o
  CC      hw/sd/ssi-sd.o
  CC      hw/sd/sd.o
  CC      hw/sd/core.o
  CC      hw/sd/sdhci.o
  CC      hw/smbios/smbios.o
  CC      hw/smbios/smbios_type_38.o
  CC      hw/ssi/pl022.o
  CC      hw/ssi/ssi.o
  CC      hw/ssi/xilinx_spips.o
  CC      hw/ssi/aspeed_smc.o
  CC      hw/ssi/stm32f2xx_spi.o
  CC      hw/timer/arm_timer.o
  CC      hw/timer/arm_mptimer.o
  CC      hw/timer/a9gtimer.o
  CC      hw/timer/cadence_ttc.o
  CC      hw/timer/ds1338.o
  CC      hw/timer/hpet.o
  CC      hw/timer/i8254_common.o
  CC      hw/timer/i8254.o
  CC      hw/timer/pl031.o
  CC      hw/timer/twl92230.o
  CC      hw/timer/imx_epit.o
  CC      hw/timer/stm32f2xx_timer.o
  CC      hw/timer/imx_gpt.o
  CC      hw/timer/aspeed_timer.o
  CC      hw/tpm/tpm_tis.o
  CC      hw/tpm/tpm_passthrough.o
  CC      hw/tpm/tpm_util.o
  CC      hw/usb/core.o
  CC      hw/usb/combined-packet.o
  CC      hw/usb/bus.o
  CC      hw/usb/libhw.o
  CC      hw/usb/desc.o
  CC      hw/usb/desc-msos.o
  CC      hw/usb/hcd-uhci.o
  CC      hw/usb/hcd-ohci.o
  CC      hw/usb/hcd-ehci.o
  CC      hw/usb/hcd-ehci-pci.o
  CC      hw/usb/hcd-ehci-sysbus.o
  CC      hw/usb/hcd-xhci.o
  CC      hw/usb/hcd-musb.o
  CC      hw/usb/dev-hub.o
  CC      hw/usb/dev-hid.o
  CC      hw/usb/dev-wacom.o
  CC      hw/usb/dev-storage.o
  CC      hw/usb/dev-uas.o
  CC      hw/usb/dev-audio.o
  CC      hw/usb/dev-serial.o
  CC      hw/usb/dev-network.o
  CC      hw/usb/dev-bluetooth.o
  CC      hw/usb/dev-smartcard-reader.o
  CC      hw/usb/dev-mtp.o
  CC      hw/usb/host-stub.o
  CC      hw/virtio/virtio-rng.o
  CC      hw/virtio/virtio-pci.o
  CC      hw/virtio/virtio-bus.o
  CC      hw/virtio/virtio-mmio.o
  CC      hw/watchdog/watchdog.o
  CC      hw/watchdog/wdt_i6300esb.o
  CC      hw/watchdog/wdt_ib700.o
  CC      migration/migration.o
  CC      migration/socket.o
  CC      migration/fd.o
  CC      migration/exec.o
  CC      migration/tls.o
  CC      migration/colo-comm.o
  CC      migration/colo.o
  CC      migration/colo-failover.o
  CC      migration/vmstate.o
  CC      migration/qemu-file.o
  CC      migration/qemu-file-channel.o
  CC      migration/xbzrle.o
  CC      migration/postcopy-ram.o
  CC      migration/qjson.o
  CC      migration/block.o
  CC      net/net.o
  CC      net/queue.o
  CC      net/checksum.o
  CC      net/util.o
  CC      net/hub.o
  CC      net/socket.o
  CC      net/dump.o
  CC      net/eth.o
  CC      net/l2tpv3.o
  CC      net/tap.o
  CC      net/vhost-user.o
  CC      net/tap-linux.o
  CC      net/slirp.o
  CC      net/filter.o
  CC      net/filter-buffer.o
  CC      net/filter-mirror.o
  CC      net/colo-compare.o
  CC      net/colo.o
  CC      net/filter-rewriter.o
  CC      qom/cpu.o
  CC      replay/replay.o
  CC      replay/replay-internal.o
/tmp/qemu-test/src/replay/replay-internal.c: In function ‘replay_put_array’:
/tmp/qemu-test/src/replay/replay-internal.c:65: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
  CC      replay/replay-events.o
  CC      replay/replay-time.o
  CC      replay/replay-input.o
  CC      replay/replay-snapshot.o
  CC      replay/replay-char.o
  CC      slirp/if.o
  CC      slirp/cksum.o
  CC      slirp/ip_icmp.o
  CC      slirp/ip6_icmp.o
  CC      slirp/ip6_input.o
  CC      slirp/ip6_output.o
  CC      slirp/ip_input.o
  CC      slirp/ip_output.o
  CC      slirp/dnssearch.o
  CC      slirp/dhcpv6.o
  CC      slirp/slirp.o
  CC      slirp/mbuf.o
  CC      slirp/misc.o
  CC      slirp/sbuf.o
  CC      slirp/socket.o
  CC      slirp/tcp_input.o
  CC      slirp/tcp_output.o
  CC      slirp/tcp_subr.o
  CC      slirp/tcp_timer.o
  CC      slirp/udp.o
  CC      slirp/udp6.o
  CC      slirp/bootp.o
  CC      slirp/tftp.o
  CC      slirp/arp_table.o
  CC      slirp/ndp_table.o
  CC      ui/keymaps.o
  CC      ui/console.o
  CC      ui/cursor.o
  CC      ui/qemu-pixman.o
  CC      ui/input.o
  CC      ui/input-keymap.o
  CC      ui/input-legacy.o
  CC      ui/input-linux.o
  CC      ui/sdl.o
  CC      ui/sdl_zoom.o
  CC      ui/x_keymap.o
  CC      ui/vnc.o
  CC      ui/vnc-enc-zlib.o
  CC      ui/vnc-enc-hextile.o
  CC      ui/vnc-enc-tight.o
  CC      ui/vnc-palette.o
  CC      ui/vnc-enc-zrle.o
/tmp/qemu-test/src/slirp/tcp_input.c: In function ‘tcp_input’:
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_p’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_len’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_tos’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_id’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_off’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_ttl’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_sum’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_src.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_dst.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:220: warning: ‘save_ip6.ip_nh’ may be used uninitialized in this function
  CC      ui/vnc-auth-vencrypt.o
  CC      ui/vnc-ws.o
  CC      ui/vnc-jobs.o
  LINK    tests/qemu-iotests/socket_scm_helper
  CC      qga/commands.o
  AS      optionrom/multiboot.o
  AS      optionrom/linuxboot.o
  CC      qga/guest-agent-command-state.o
  CC      optionrom/linuxboot_dma.o
cc: unrecognized option '-no-integrated-as'
cc: unrecognized option '-no-integrated-as'
  AS      optionrom/kvmvapic.o
  CC      qga/main.o
  BUILD   optionrom/multiboot.img
  BUILD   optionrom/linuxboot.img
  BUILD   optionrom/linuxboot_dma.img
  CC      qga/commands-posix.o
  BUILD   optionrom/kvmvapic.img
  BUILD   optionrom/multiboot.raw
  BUILD   optionrom/linuxboot.raw
  CC      qga/channel-posix.o
  BUILD   optionrom/linuxboot_dma.raw
  BUILD   optionrom/kvmvapic.raw
  SIGN    optionrom/multiboot.bin
  SIGN    optionrom/linuxboot.bin
  SIGN    optionrom/linuxboot_dma.bin
  CC      qga/qapi-generated/qga-qapi-types.o
  CC      qga/qapi-generated/qga-qapi-visit.o
  SIGN    optionrom/kvmvapic.bin
  CC      qga/qapi-generated/qga-qmp-marshal.o
  CC      qmp-introspect.o
  CC      qapi-types.o
  CC      qapi-visit.o
  CC      qapi-event.o
  AR      libqemustub.a
  CC      qmp-marshal.o
  CC      qemu-img.o
  CC      trace/generated-tracers.o
  AR      libqemuutil.a
  LINK    qemu-ga
  LINK    ivshmem-client
  LINK    ivshmem-server
  LINK    qemu-nbd
  LINK    qemu-img
  LINK    qemu-io
  LINK    qemu-bridge-helper
  GEN     x86_64-softmmu/hmp-commands.h
  GEN     x86_64-softmmu/hmp-commands-info.h
  GEN     x86_64-softmmu/config-target.h
  GEN     aarch64-softmmu/hmp-commands.h
  GEN     aarch64-softmmu/hmp-commands-info.h
  GEN     aarch64-softmmu/config-target.h
  CC      x86_64-softmmu/exec.o
  CC      x86_64-softmmu/translate-all.o
  CC      x86_64-softmmu/cpu-exec.o
  CC      x86_64-softmmu/translate-common.o
  CC      x86_64-softmmu/cpu-exec-common.o
  CC      x86_64-softmmu/tcg/tcg.o
  CC      x86_64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/tcg/tcg-common.o
  CC      x86_64-softmmu/fpu/softfloat.o
  CC      x86_64-softmmu/disas.o
  CC      x86_64-softmmu/arch_init.o
  CC      x86_64-softmmu/tcg-runtime.o
  CC      x86_64-softmmu/cpus.o
  CC      x86_64-softmmu/monitor.o
  CC      x86_64-softmmu/gdbstub.o
  CC      aarch64-softmmu/exec.o
  CC      aarch64-softmmu/translate-all.o
  CC      aarch64-softmmu/cpu-exec.o
  CC      x86_64-softmmu/balloon.o
  CC      aarch64-softmmu/translate-common.o
  CC      aarch64-softmmu/cpu-exec-common.o
  CC      aarch64-softmmu/tcg/tcg.o
  CC      aarch64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/numa.o
  CC      x86_64-softmmu/ioport.o
  CC      x86_64-softmmu/qtest.o
  CC      x86_64-softmmu/bootdevice.o
  CC      aarch64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/kvm-all.o
  CC      aarch64-softmmu/tcg/tcg-common.o
  CC      aarch64-softmmu/fpu/softfloat.o
  CC      aarch64-softmmu/disas.o
  CC      aarch64-softmmu/tcg-runtime.o
  GEN     aarch64-softmmu/gdbstub-xml.c
  CC      x86_64-softmmu/memory.o
  CC      aarch64-softmmu/kvm-stub.o
  CC      aarch64-softmmu/arch_init.o
  CC      x86_64-softmmu/cputlb.o
  CC      x86_64-softmmu/memory_mapping.o
  CC      x86_64-softmmu/dump.o
  CC      aarch64-softmmu/cpus.o
  CC      x86_64-softmmu/migration/ram.o
  CC      x86_64-softmmu/migration/savevm.o
  CC      aarch64-softmmu/monitor.o
  CC      x86_64-softmmu/xen-common-stub.o
  CC      x86_64-softmmu/xen-hvm-stub.o
  CC      aarch64-softmmu/gdbstub.o
  CC      x86_64-softmmu/hw/block/virtio-blk.o
  CC      aarch64-softmmu/balloon.o
  CC      aarch64-softmmu/ioport.o
  CC      aarch64-softmmu/numa.o
  CC      aarch64-softmmu/qtest.o
  CC      x86_64-softmmu/hw/block/dataplane/virtio-blk.o
  CC      x86_64-softmmu/hw/char/virtio-serial-bus.o
  CC      x86_64-softmmu/hw/core/nmi.o
  CC      x86_64-softmmu/hw/core/generic-loader.o
  CC      x86_64-softmmu/hw/cpu/core.o
  CC      x86_64-softmmu/hw/display/vga.o
  CC      aarch64-softmmu/bootdevice.o
  CC      aarch64-softmmu/memory.o
  CC      aarch64-softmmu/cputlb.o
  CC      aarch64-softmmu/memory_mapping.o
  CC      x86_64-softmmu/hw/display/virtio-gpu.o
  CC      x86_64-softmmu/hw/display/virtio-gpu-3d.o
  CC      aarch64-softmmu/dump.o
  CC      aarch64-softmmu/migration/ram.o
  CC      aarch64-softmmu/migration/savevm.o
  CC      aarch64-softmmu/xen-common-stub.o
  CC      x86_64-softmmu/hw/display/virtio-gpu-pci.o
  CC      x86_64-softmmu/hw/display/virtio-vga.o
  CC      x86_64-softmmu/hw/intc/apic.o
  CC      x86_64-softmmu/hw/intc/apic_common.o
  CC      aarch64-softmmu/xen-hvm-stub.o
  CC      x86_64-softmmu/hw/intc/ioapic.o
  CC      aarch64-softmmu/hw/adc/stm32f2xx_adc.o
  CC      x86_64-softmmu/hw/isa/lpc_ich9.o
  CC      aarch64-softmmu/hw/block/virtio-blk.o
  CC      x86_64-softmmu/hw/misc/vmport.o
  CC      x86_64-softmmu/hw/misc/ivshmem.o
  CC      aarch64-softmmu/hw/block/dataplane/virtio-blk.o
  CC      aarch64-softmmu/hw/char/exynos4210_uart.o
  CC      aarch64-softmmu/hw/char/omap_uart.o
  CC      x86_64-softmmu/hw/misc/pvpanic.o
  CC      aarch64-softmmu/hw/char/digic-uart.o
  CC      aarch64-softmmu/hw/char/stm32f2xx_usart.o
  CC      x86_64-softmmu/hw/misc/edu.o
  CC      x86_64-softmmu/hw/misc/hyperv_testdev.o
  CC      x86_64-softmmu/hw/net/virtio-net.o
  CC      x86_64-softmmu/hw/net/vhost_net.o
  CC      aarch64-softmmu/hw/char/bcm2835_aux.o
  CC      x86_64-softmmu/hw/scsi/virtio-scsi.o
  CC      aarch64-softmmu/hw/char/virtio-serial-bus.o
  CC      x86_64-softmmu/hw/scsi/virtio-scsi-dataplane.o
  CC      aarch64-softmmu/hw/core/nmi.o
  CC      aarch64-softmmu/hw/core/generic-loader.o
  CC      aarch64-softmmu/hw/cpu/arm11mpcore.o
  CC      x86_64-softmmu/hw/scsi/vhost-scsi.o
  CC      aarch64-softmmu/hw/cpu/realview_mpcore.o
  CC      x86_64-softmmu/hw/timer/mc146818rtc.o
  CC      aarch64-softmmu/hw/cpu/a9mpcore.o
  CC      aarch64-softmmu/hw/cpu/a15mpcore.o
  CC      aarch64-softmmu/hw/cpu/core.o
  CC      aarch64-softmmu/hw/display/omap_dss.o
  CC      aarch64-softmmu/hw/display/omap_lcdc.o
  CC      x86_64-softmmu/hw/vfio/common.o
  CC      x86_64-softmmu/hw/vfio/pci.o
  CC      aarch64-softmmu/hw/display/pxa2xx_lcd.o
  CC      x86_64-softmmu/hw/vfio/pci-quirks.o
  CC      x86_64-softmmu/hw/vfio/platform.o
  CC      x86_64-softmmu/hw/vfio/calxeda-xgmac.o
  CC      x86_64-softmmu/hw/vfio/amd-xgbe.o
  CC      aarch64-softmmu/hw/display/bcm2835_fb.o
  CC      aarch64-softmmu/hw/display/vga.o
  CC      x86_64-softmmu/hw/vfio/spapr.o
  CC      aarch64-softmmu/hw/display/virtio-gpu-3d.o
  CC      aarch64-softmmu/hw/display/virtio-gpu.o
  CC      x86_64-softmmu/hw/virtio/virtio.o
  CC      x86_64-softmmu/hw/virtio/virtio-balloon.o
  CC      x86_64-softmmu/hw/virtio/vhost.o
  CC      aarch64-softmmu/hw/display/virtio-gpu-pci.o
  CC      aarch64-softmmu/hw/display/dpcd.o
  CC      x86_64-softmmu/hw/virtio/vhost-backend.o
  CC      aarch64-softmmu/hw/display/xlnx_dp.o
  CC      x86_64-softmmu/hw/virtio/vhost-user.o
  CC      x86_64-softmmu/hw/virtio/vhost-vsock.o
  CC      aarch64-softmmu/hw/dma/xlnx_dpdma.o
  CC      aarch64-softmmu/hw/dma/omap_dma.o
  CC      x86_64-softmmu/hw/virtio/virtio-crypto.o
  CC      aarch64-softmmu/hw/dma/soc_dma.o
  CC      x86_64-softmmu/hw/virtio/virtio-crypto-pci.o
  CC      aarch64-softmmu/hw/dma/pxa2xx_dma.o
  CC      aarch64-softmmu/hw/dma/bcm2835_dma.o
  CC      x86_64-softmmu/hw/i386/multiboot.o
  CC      aarch64-softmmu/hw/gpio/omap_gpio.o
  CC      x86_64-softmmu/hw/i386/pc.o
  CC      x86_64-softmmu/hw/i386/pc_piix.o
  CC      aarch64-softmmu/hw/gpio/imx_gpio.o
  CC      x86_64-softmmu/hw/i386/pc_q35.o
  CC      aarch64-softmmu/hw/i2c/omap_i2c.o
  CC      aarch64-softmmu/hw/input/pxa2xx_keypad.o
  CC      x86_64-softmmu/hw/i386/pc_sysfw.o
  CC      aarch64-softmmu/hw/input/tsc210x.o
  CC      x86_64-softmmu/hw/i386/x86-iommu.o
  CC      x86_64-softmmu/hw/i386/intel_iommu.o
  CC      x86_64-softmmu/hw/i386/amd_iommu.o
  CC      aarch64-softmmu/hw/intc/armv7m_nvic.o
  CC      x86_64-softmmu/hw/i386/kvmvapic.o
  CC      aarch64-softmmu/hw/intc/exynos4210_gic.o
  CC      x86_64-softmmu/hw/i386/acpi-build.o
  CC      x86_64-softmmu/hw/i386/pci-assign-load-rom.o
  CC      x86_64-softmmu/hw/i386/kvm/clock.o
  CC      x86_64-softmmu/hw/i386/kvm/apic.o
  CC      x86_64-softmmu/hw/i386/kvm/i8259.o
  CC      x86_64-softmmu/hw/i386/kvm/ioapic.o
  CC      aarch64-softmmu/hw/intc/exynos4210_combiner.o
/tmp/qemu-test/src/hw/i386/pc_piix.c: In function ‘igd_passthrough_isa_bridge_create’:
/tmp/qemu-test/src/hw/i386/pc_piix.c:1065: warning: ‘pch_rev_id’ may be used uninitialized in this function
  CC      aarch64-softmmu/hw/intc/omap_intc.o
  CC      x86_64-softmmu/hw/i386/kvm/i8254.o
  CC      x86_64-softmmu/hw/i386/kvm/pci-assign.o
  CC      x86_64-softmmu/target-i386/translate.o
  CC      x86_64-softmmu/target-i386/helper.o
  CC      aarch64-softmmu/hw/intc/bcm2835_ic.o
  CC      aarch64-softmmu/hw/intc/bcm2836_control.o
  CC      x86_64-softmmu/target-i386/cpu.o
  CC      aarch64-softmmu/hw/intc/allwinner-a10-pic.o
  CC      x86_64-softmmu/target-i386/bpt_helper.o
  CC      aarch64-softmmu/hw/intc/aspeed_vic.o
  CC      aarch64-softmmu/hw/intc/arm_gicv3_cpuif.o
  CC      aarch64-softmmu/hw/misc/ivshmem.o
  CC      x86_64-softmmu/target-i386/excp_helper.o
  CC      aarch64-softmmu/hw/misc/arm_sysctl.o
  CC      x86_64-softmmu/target-i386/fpu_helper.o
  CC      x86_64-softmmu/target-i386/cc_helper.o
  CC      aarch64-softmmu/hw/misc/cbus.o
  CC      x86_64-softmmu/target-i386/int_helper.o
  CC      aarch64-softmmu/hw/misc/exynos4210_pmu.o
  CC      x86_64-softmmu/target-i386/svm_helper.o
  CC      aarch64-softmmu/hw/misc/imx_ccm.o
  CC      x86_64-softmmu/target-i386/smm_helper.o
  CC      x86_64-softmmu/target-i386/misc_helper.o
/tmp/qemu-test/src/hw/i386/acpi-build.c: In function ‘build_append_pci_bus_devices’:
/tmp/qemu-test/src/hw/i386/acpi-build.c:501: warning: ‘notify_method’ may be used uninitialized in this function
  CC      aarch64-softmmu/hw/misc/imx31_ccm.o
  CC      aarch64-softmmu/hw/misc/imx25_ccm.o
  CC      aarch64-softmmu/hw/misc/imx6_ccm.o
  CC      x86_64-softmmu/target-i386/mem_helper.o
  CC      aarch64-softmmu/hw/misc/imx6_src.o
  CC      x86_64-softmmu/target-i386/seg_helper.o
  CC      x86_64-softmmu/target-i386/mpx_helper.o
  CC      x86_64-softmmu/target-i386/gdbstub.o
  CC      aarch64-softmmu/hw/misc/mst_fpga.o
  CC      x86_64-softmmu/target-i386/machine.o
  CC      x86_64-softmmu/target-i386/arch_memory_mapping.o
  CC      aarch64-softmmu/hw/misc/omap_clk.o
  CC      x86_64-softmmu/target-i386/arch_dump.o
  CC      x86_64-softmmu/target-i386/monitor.o
  CC      x86_64-softmmu/target-i386/kvm.o
  CC      x86_64-softmmu/target-i386/hyperv.o
  CC      aarch64-softmmu/hw/misc/omap_gpmc.o
  CC      aarch64-softmmu/hw/misc/omap_l4.o
  GEN     trace/generated-helpers.c
  CC      x86_64-softmmu/trace/control-target.o
  CC      aarch64-softmmu/hw/misc/omap_sdrc.o
  CC      aarch64-softmmu/hw/misc/omap_tap.o
  CC      aarch64-softmmu/hw/misc/bcm2835_mbox.o
  CC      aarch64-softmmu/hw/misc/bcm2835_property.o
  CC      aarch64-softmmu/hw/misc/zynq_slcr.o
  CC      aarch64-softmmu/hw/misc/zynq-xadc.o
  CC      aarch64-softmmu/hw/misc/stm32f2xx_syscfg.o
  CC      x86_64-softmmu/trace/generated-helpers.o
  CC      aarch64-softmmu/hw/misc/edu.o
  CC      aarch64-softmmu/hw/misc/auxbus.o
  CC      aarch64-softmmu/hw/misc/aspeed_scu.o
  CC      aarch64-softmmu/hw/misc/aspeed_sdmc.o
  CC      aarch64-softmmu/hw/net/virtio-net.o
  CC      aarch64-softmmu/hw/net/vhost_net.o
  CC      aarch64-softmmu/hw/pcmcia/pxa2xx.o
  CC      aarch64-softmmu/hw/scsi/virtio-scsi.o
  CC      aarch64-softmmu/hw/scsi/virtio-scsi-dataplane.o
  CC      aarch64-softmmu/hw/scsi/vhost-scsi.o
  CC      aarch64-softmmu/hw/sd/omap_mmc.o
  CC      aarch64-softmmu/hw/sd/pxa2xx_mmci.o
  CC      aarch64-softmmu/hw/ssi/omap_spi.o
  CC      aarch64-softmmu/hw/ssi/imx_spi.o
  CC      aarch64-softmmu/hw/timer/exynos4210_mct.o
  CC      aarch64-softmmu/hw/timer/exynos4210_pwm.o
  CC      aarch64-softmmu/hw/timer/exynos4210_rtc.o
  CC      aarch64-softmmu/hw/timer/omap_gptimer.o
  CC      aarch64-softmmu/hw/timer/omap_synctimer.o
  CC      aarch64-softmmu/hw/timer/pxa2xx_timer.o
  CC      aarch64-softmmu/hw/timer/digic-timer.o
  CC      aarch64-softmmu/hw/timer/allwinner-a10-pit.o
  CC      aarch64-softmmu/hw/usb/tusb6010.o
  CC      aarch64-softmmu/hw/vfio/common.o
  CC      aarch64-softmmu/hw/vfio/pci.o
  CC      aarch64-softmmu/hw/vfio/pci-quirks.o
  CC      aarch64-softmmu/hw/vfio/platform.o
  CC      aarch64-softmmu/hw/vfio/calxeda-xgmac.o
  CC      aarch64-softmmu/hw/vfio/amd-xgbe.o
  CC      aarch64-softmmu/hw/vfio/spapr.o
  CC      aarch64-softmmu/hw/virtio/virtio.o
  CC      aarch64-softmmu/hw/virtio/virtio-balloon.o
  CC      aarch64-softmmu/hw/virtio/vhost.o
  CC      aarch64-softmmu/hw/virtio/vhost-backend.o
  CC      aarch64-softmmu/hw/virtio/vhost-user.o
  CC      aarch64-softmmu/hw/virtio/vhost-vsock.o
  CC      aarch64-softmmu/hw/virtio/virtio-crypto.o
  CC      aarch64-softmmu/hw/virtio/virtio-crypto-pci.o
  CC      aarch64-softmmu/hw/arm/boot.o
  CC      aarch64-softmmu/hw/arm/collie.o
  CC      aarch64-softmmu/hw/arm/exynos4_boards.o
  CC      aarch64-softmmu/hw/arm/gumstix.o
  CC      aarch64-softmmu/hw/arm/highbank.o
  CC      aarch64-softmmu/hw/arm/digic_boards.o
  CC      aarch64-softmmu/hw/arm/integratorcp.o
  CC      aarch64-softmmu/hw/arm/mainstone.o
  CC      aarch64-softmmu/hw/arm/musicpal.o
  CC      aarch64-softmmu/hw/arm/nseries.o
  CC      aarch64-softmmu/hw/arm/omap_sx1.o
  CC      aarch64-softmmu/hw/arm/palm.o
  CC      aarch64-softmmu/hw/arm/realview.o
  CC      aarch64-softmmu/hw/arm/spitz.o
  CC      aarch64-softmmu/hw/arm/stellaris.o
  CC      aarch64-softmmu/hw/arm/tosa.o
  CC      aarch64-softmmu/hw/arm/versatilepb.o
  CC      aarch64-softmmu/hw/arm/vexpress.o
  CC      aarch64-softmmu/hw/arm/virt.o
  CC      aarch64-softmmu/hw/arm/xilinx_zynq.o
  CC      aarch64-softmmu/hw/arm/z2.o
  CC      aarch64-softmmu/hw/arm/virt-acpi-build.o
  CC      aarch64-softmmu/hw/arm/netduino2.o
  CC      aarch64-softmmu/hw/arm/sysbus-fdt.o
  CC      aarch64-softmmu/hw/arm/armv7m.o
  CC      aarch64-softmmu/hw/arm/exynos4210.o
  CC      aarch64-softmmu/hw/arm/pxa2xx.o
  CC      aarch64-softmmu/hw/arm/pxa2xx_gpio.o
  CC      aarch64-softmmu/hw/arm/pxa2xx_pic.o
  CC      aarch64-softmmu/hw/arm/digic.o
  CC      aarch64-softmmu/hw/arm/omap1.o
  CC      aarch64-softmmu/hw/arm/omap2.o
  CC      aarch64-softmmu/hw/arm/strongarm.o
  CC      aarch64-softmmu/hw/arm/allwinner-a10.o
  CC      aarch64-softmmu/hw/arm/cubieboard.o
  CC      aarch64-softmmu/hw/arm/bcm2835_peripherals.o
  CC      aarch64-softmmu/hw/arm/bcm2836.o
  CC      aarch64-softmmu/hw/arm/raspi.o
  LINK    x86_64-softmmu/qemu-system-x86_64
  CC      aarch64-softmmu/hw/arm/stm32f205_soc.o
  CC      aarch64-softmmu/hw/arm/xlnx-zynqmp.o
  CC      aarch64-softmmu/hw/arm/xlnx-ep108.o
  CC      aarch64-softmmu/hw/arm/fsl-imx25.o
  CC      aarch64-softmmu/hw/arm/imx25_pdk.o
  CC      aarch64-softmmu/hw/arm/fsl-imx31.o
  CC      aarch64-softmmu/hw/arm/kzm.o
  CC      aarch64-softmmu/hw/arm/fsl-imx6.o
  CC      aarch64-softmmu/hw/arm/sabrelite.o
  CC      aarch64-softmmu/hw/arm/aspeed_soc.o
  CC      aarch64-softmmu/hw/arm/aspeed.o
  CC      aarch64-softmmu/target-arm/arm-semi.o
  CC      aarch64-softmmu/target-arm/machine.o
  CC      aarch64-softmmu/target-arm/psci.o
  CC      aarch64-softmmu/target-arm/arch_dump.o
  CC      aarch64-softmmu/target-arm/monitor.o
  CC      aarch64-softmmu/target-arm/kvm-stub.o
  CC      aarch64-softmmu/target-arm/translate.o
  CC      aarch64-softmmu/target-arm/op_helper.o
  CC      aarch64-softmmu/target-arm/helper.o
  CC      aarch64-softmmu/target-arm/cpu.o
  CC      aarch64-softmmu/target-arm/neon_helper.o
  CC      aarch64-softmmu/target-arm/iwmmxt_helper.o
  CC      aarch64-softmmu/target-arm/gdbstub.o
  CC      aarch64-softmmu/target-arm/cpu64.o
  CC      aarch64-softmmu/target-arm/translate-a64.o
  CC      aarch64-softmmu/target-arm/helper-a64.o
  CC      aarch64-softmmu/target-arm/gdbstub64.o
  CC      aarch64-softmmu/target-arm/crypto_helper.o
  CC      aarch64-softmmu/target-arm/arm-powerctl.o
  GEN     trace/generated-helpers.c
  CC      aarch64-softmmu/trace/control-target.o
  CC      aarch64-softmmu/gdbstub-xml.o
  CC      aarch64-softmmu/trace/generated-helpers.o
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘handle_shri_with_rndacc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:6395: warning: ‘tcg_src_hi’ may be used uninitialized in this function
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘disas_simd_scalar_two_reg_misc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:8122: warning: ‘rmode’ may be used uninitialized in this function
  LINK    aarch64-softmmu/qemu-system-aarch64
  TEST    tests/qapi-schema/alternate-any.out
  TEST    tests/qapi-schema/alternate-array.out
  TEST    tests/qapi-schema/alternate-base.out
  TEST    tests/qapi-schema/alternate-conflict-dict.out
  TEST    tests/qapi-schema/alternate-clash.out
  TEST    tests/qapi-schema/alternate-conflict-string.out
  TEST    tests/qapi-schema/alternate-empty.out
  TEST    tests/qapi-schema/alternate-unknown.out
  TEST    tests/qapi-schema/alternate-nested.out
  TEST    tests/qapi-schema/args-alternate.out
  TEST    tests/qapi-schema/args-any.out
  TEST    tests/qapi-schema/args-array-empty.out
  TEST    tests/qapi-schema/args-array-unknown.out
  TEST    tests/qapi-schema/args-boxed-empty.out
  TEST    tests/qapi-schema/args-bad-boxed.out
  TEST    tests/qapi-schema/args-boxed-anon.out
  TEST    tests/qapi-schema/args-boxed-string.out
  TEST    tests/qapi-schema/args-int.out
  TEST    tests/qapi-schema/args-invalid.out
  TEST    tests/qapi-schema/args-member-array-bad.out
  TEST    tests/qapi-schema/args-member-case.out
  TEST    tests/qapi-schema/args-member-unknown.out
  TEST    tests/qapi-schema/args-name-clash.out
  TEST    tests/qapi-schema/args-union.out
  TEST    tests/qapi-schema/args-unknown.out
  TEST    tests/qapi-schema/bad-base.out
  TEST    tests/qapi-schema/bad-data.out
  TEST    tests/qapi-schema/bad-ident.out
  TEST    tests/qapi-schema/bad-type-bool.out
  TEST    tests/qapi-schema/bad-type-dict.out
  TEST    tests/qapi-schema/bad-type-int.out
  TEST    tests/qapi-schema/base-cycle-direct.out
  TEST    tests/qapi-schema/base-cycle-indirect.out
  TEST    tests/qapi-schema/command-int.out
  TEST    tests/qapi-schema/comments.out
  TEST    tests/qapi-schema/double-data.out
  TEST    tests/qapi-schema/double-type.out
  TEST    tests/qapi-schema/duplicate-key.out
  TEST    tests/qapi-schema/empty.out
  TEST    tests/qapi-schema/enum-bad-name.out
  TEST    tests/qapi-schema/enum-bad-prefix.out
  TEST    tests/qapi-schema/enum-clash-member.out
  TEST    tests/qapi-schema/enum-dict-member.out
  TEST    tests/qapi-schema/enum-int-member.out
  TEST    tests/qapi-schema/enum-member-case.out
  TEST    tests/qapi-schema/enum-missing-data.out
  TEST    tests/qapi-schema/enum-wrong-data.out
  TEST    tests/qapi-schema/escape-outside-string.out
  TEST    tests/qapi-schema/escape-too-big.out
  TEST    tests/qapi-schema/escape-too-short.out
  TEST    tests/qapi-schema/event-boxed-empty.out
  TEST    tests/qapi-schema/event-nest-struct.out
  TEST    tests/qapi-schema/event-case.out
  TEST    tests/qapi-schema/flat-union-array-branch.out
  TEST    tests/qapi-schema/flat-union-bad-base.out
  TEST    tests/qapi-schema/flat-union-bad-discriminator.out
  TEST    tests/qapi-schema/flat-union-base-any.out
  TEST    tests/qapi-schema/flat-union-base-union.out
  TEST    tests/qapi-schema/flat-union-clash-member.out
  TEST    tests/qapi-schema/flat-union-empty.out
  TEST    tests/qapi-schema/flat-union-incomplete-branch.out
  TEST    tests/qapi-schema/flat-union-inline.out
  TEST    tests/qapi-schema/flat-union-int-branch.out
  TEST    tests/qapi-schema/flat-union-invalid-branch-key.out
  TEST    tests/qapi-schema/flat-union-invalid-discriminator.out
  TEST    tests/qapi-schema/flat-union-no-base.out
  TEST    tests/qapi-schema/flat-union-optional-discriminator.out
  TEST    tests/qapi-schema/flat-union-string-discriminator.out
  TEST    tests/qapi-schema/funny-char.out
  TEST    tests/qapi-schema/ident-with-escape.out
  TEST    tests/qapi-schema/include-before-err.out
  TEST    tests/qapi-schema/include-cycle.out
  TEST    tests/qapi-schema/include-format-err.out
  TEST    tests/qapi-schema/include-nested-err.out
  TEST    tests/qapi-schema/include-no-file.out
  TEST    tests/qapi-schema/include-non-file.out
  TEST    tests/qapi-schema/include-repetition.out
  TEST    tests/qapi-schema/include-relpath.out
  TEST    tests/qapi-schema/include-self-cycle.out
  TEST    tests/qapi-schema/include-simple.out
  TEST    tests/qapi-schema/indented-expr.out
  TEST    tests/qapi-schema/leading-comma-list.out
  TEST    tests/qapi-schema/leading-comma-object.out
  TEST    tests/qapi-schema/missing-colon.out
  TEST    tests/qapi-schema/missing-comma-list.out
  TEST    tests/qapi-schema/missing-comma-object.out
  TEST    tests/qapi-schema/missing-type.out
  TEST    tests/qapi-schema/nested-struct-data.out
  TEST    tests/qapi-schema/non-objects.out
  TEST    tests/qapi-schema/qapi-schema-test.out
  TEST    tests/qapi-schema/quoted-structural-chars.out
  TEST    tests/qapi-schema/redefined-builtin.out
  TEST    tests/qapi-schema/redefined-command.out
  TEST    tests/qapi-schema/redefined-event.out
  TEST    tests/qapi-schema/redefined-type.out
  TEST    tests/qapi-schema/reserved-command-q.out
  TEST    tests/qapi-schema/reserved-enum-q.out
  TEST    tests/qapi-schema/reserved-member-q.out
  TEST    tests/qapi-schema/reserved-member-has.out
  TEST    tests/qapi-schema/reserved-member-u.out
  TEST    tests/qapi-schema/reserved-member-underscore.out
  TEST    tests/qapi-schema/reserved-type-kind.out
  TEST    tests/qapi-schema/reserved-type-list.out
  TEST    tests/qapi-schema/returns-alternate.out
  TEST    tests/qapi-schema/returns-array-bad.out
  TEST    tests/qapi-schema/returns-unknown.out
  TEST    tests/qapi-schema/returns-dict.out
  TEST    tests/qapi-schema/returns-whitelist.out
  TEST    tests/qapi-schema/struct-base-clash-deep.out
  TEST    tests/qapi-schema/struct-base-clash.out
  TEST    tests/qapi-schema/struct-data-invalid.out
  TEST    tests/qapi-schema/struct-member-invalid.out
  TEST    tests/qapi-schema/trailing-comma-object.out
  TEST    tests/qapi-schema/trailing-comma-list.out
  TEST    tests/qapi-schema/type-bypass-bad-gen.out
  TEST    tests/qapi-schema/unclosed-list.out
  TEST    tests/qapi-schema/unclosed-object.out
  TEST    tests/qapi-schema/unclosed-string.out
  TEST    tests/qapi-schema/unicode-str.out
  TEST    tests/qapi-schema/union-base-no-discriminator.out
  TEST    tests/qapi-schema/union-branch-case.out
  TEST    tests/qapi-schema/union-clash-branches.out
  TEST    tests/qapi-schema/union-empty.out
  TEST    tests/qapi-schema/union-invalid-base.out
  TEST    tests/qapi-schema/union-optional-branch.out
  TEST    tests/qapi-schema/union-unknown.out
  TEST    tests/qapi-schema/unknown-escape.out
  TEST    tests/qapi-schema/unknown-expr-key.out
  CC      tests/check-qdict.o
  CC      tests/test-char.o
  CC      tests/check-qfloat.o
  CC      tests/check-qint.o
  CC      tests/check-qstring.o
  CC      tests/check-qlist.o
  CC      tests/check-qnull.o
  CC      tests/check-qjson.o
  CC      tests/test-qobject-output-visitor.o
  GEN     tests/test-qapi-visit.c
  GEN     tests/test-qapi-event.c
  GEN     tests/test-qapi-types.c
  GEN     tests/test-qmp-introspect.c
  CC      tests/test-clone-visitor.o
  CC      tests/test-qobject-input-visitor.o
  CC      tests/test-qobject-input-strict.o
  CC      tests/test-qmp-commands.o
  GEN     tests/test-qmp-marshal.c
  CC      tests/test-string-input-visitor.o
  CC      tests/test-string-output-visitor.o
  CC      tests/test-qmp-event.o
  CC      tests/test-opts-visitor.o
  CC      tests/test-coroutine.o
  CC      tests/test-visitor-serialization.o
  CC      tests/test-iov.o
  CC      tests/test-aio.o
  CC      tests/test-throttle.o
  CC      tests/test-thread-pool.o
  CC      tests/test-hbitmap.o
  CC      tests/test-blockjob.o
  CC      tests/test-blockjob-txn.o
  CC      tests/test-x86-cpuid.o
  CC      tests/test-xbzrle.o
  CC      tests/test-vmstate.o
  CC      tests/test-cutils.o
  CC      tests/test-mul64.o
  CC      tests/test-int128.o
  CC      tests/rcutorture.o
  CC      tests/test-rcu-list.o
/tmp/qemu-test/src/tests/test-int128.c:180: warning: ‘__noclone__’ attribute directive ignored
  CC      tests/test-qdist.o
  CC      tests/test-qht.o
  CC      tests/test-qht-par.o
  CC      tests/qht-bench.o
  CC      tests/test-bitops.o
  CC      tests/check-qom-interface.o
  CC      tests/check-qom-proplist.o
  CC      tests/test-qemu-opts.o
  CC      tests/test-write-threshold.o
  CC      tests/test-crypto-hash.o
  CC      tests/test-crypto-cipher.o
  CC      tests/test-crypto-secret.o
  CC      tests/test-qga.o
  CC      tests/libqtest.o
  CC      tests/test-timed-average.o
  CC      tests/test-io-task.o
  CC      tests/test-io-channel-socket.o
  CC      tests/io-channel-helpers.o
  CC      tests/test-io-channel-file.o
  CC      tests/test-io-channel-command.o
  CC      tests/test-io-channel-buffer.o
  CC      tests/test-base64.o
  CC      tests/test-crypto-ivgen.o
  CC      tests/test-crypto-afsplit.o
  CC      tests/test-crypto-xts.o
  CC      tests/test-crypto-block.o
  CC      tests/test-logging.o
  CC      tests/test-replication.o
  CC      tests/test-bufferiszero.o
  CC      tests/test-uuid.o
  CC      tests/ptimer-test.o
  CC      tests/ptimer-test-stubs.o
  CC      tests/vhost-user-test.o
  CC      tests/libqos/pci.o
  CC      tests/libqos/fw_cfg.o
  CC      tests/libqos/malloc.o
  CC      tests/libqos/i2c.o
  CC      tests/libqos/libqos.o
  CC      tests/libqos/malloc-spapr.o
  CC      tests/libqos/libqos-spapr.o
  CC      tests/libqos/rtas.o
  CC      tests/libqos/pci-spapr.o
  CC      tests/libqos/pci-pc.o
  CC      tests/libqos/malloc-pc.o
  CC      tests/libqos/libqos-pc.o
  CC      tests/libqos/ahci.o
  CC      tests/libqos/virtio.o
  CC      tests/libqos/virtio-pci.o
  CC      tests/libqos/virtio-mmio.o
  CC      tests/libqos/malloc-generic.o
  CC      tests/endianness-test.o
  CC      tests/fdc-test.o
  CC      tests/ide-test.o
  CC      tests/ahci-test.o
  CC      tests/hd-geo-test.o
  CC      tests/boot-order-test.o
  CC      tests/bios-tables-test.o
  CC      tests/boot-sector.o
  CC      tests/boot-serial-test.o
  CC      tests/pxe-test.o
  CC      tests/rtc-test.o
  CC      tests/ipmi-kcs-test.o
  CC      tests/ipmi-bt-test.o
  CC      tests/i440fx-test.o
  CC      tests/fw_cfg-test.o
  CC      tests/drive_del-test.o
  CC      tests/wdt_ib700-test.o
  CC      tests/tco-test.o
  CC      tests/e1000-test.o
  CC      tests/e1000e-test.o
  CC      tests/rtl8139-test.o
  CC      tests/pcnet-test.o
  CC      tests/eepro100-test.o
  CC      tests/ne2000-test.o
/tmp/qemu-test/src/tests/ide-test.c: In function ‘cdrom_pio_impl’:
/tmp/qemu-test/src/tests/ide-test.c:791: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
/tmp/qemu-test/src/tests/ide-test.c: In function ‘test_cdrom_dma’:
/tmp/qemu-test/src/tests/ide-test.c:886: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
  CC      tests/nvme-test.o
  CC      tests/ac97-test.o
  CC      tests/es1370-test.o
  CC      tests/virtio-net-test.o
  CC      tests/virtio-balloon-test.o
  CC      tests/virtio-blk-test.o
  CC      tests/virtio-rng-test.o
  CC      tests/virtio-scsi-test.o
  CC      tests/virtio-serial-test.o
  CC      tests/virtio-console-test.o
  CC      tests/tpci200-test.o
  CC      tests/ipoctal232-test.o
  CC      tests/display-vga-test.o
  CC      tests/intel-hda-test.o
  CC      tests/ivshmem-test.o
  CC      tests/vmxnet3-test.o
  CC      tests/pvpanic-test.o
  CC      tests/i82801b11-test.o
  CC      tests/ioh3420-test.o
  CC      tests/usb-hcd-ohci-test.o
  CC      tests/libqos/usb.o
  CC      tests/usb-hcd-uhci-test.o
  CC      tests/usb-hcd-ehci-test.o
  CC      tests/usb-hcd-xhci-test.o
  CC      tests/pc-cpu-test.o
  CC      tests/q35-test.o
  CC      tests/test-netfilter.o
  CC      tests/test-filter-mirror.o
  CC      tests/test-filter-redirector.o
  CC      tests/postcopy-test.o
  CC      tests/test-x86-cpuid-compat.o
  CC      tests/device-introspect-test.o
  CC      tests/qom-test.o
  QTEST-x86_64 /tmp/qemu-test/src/tests/qmp-machine-info.py
  QTEST-aarch64 /tmp/qemu-test/src/tests/qmp-machine-info.py
  LINK    tests/check-qdict
  LINK    tests/test-char
  LINK    tests/check-qfloat
Traceback (most recent call last):
  File "/tmp/qemu-test/src/tests/qmp-machine-info.py", line 7, in <module>
    import argparse
ImportError: No module named argparse
Traceback (most recent call last):
  File "/tmp/qemu-test/src/tests/qmp-machine-info.py", line 7, in <module>
    import argparse
ImportError: No module named argparse
make: *** [check-simpleqtest-/tmp/qemu-test/src/tests/qmp-machine-info.py-x86_64] Error 1
make: *** Waiting for unfinished jobs....
make: *** [check-simpleqtest-/tmp/qemu-test/src/tests/qmp-machine-info.py-aarch64] Error 1
make: *** wait: No child processes.  Stop.
make[1]: *** [docker-run] Error 2
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-_m72g0m_/src'
make: *** [docker-run-test-quick@centos6] Error 2
=== OUTPUT END ===

Test command exited with code: 2


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (20 preceding siblings ...)
  2016-11-29  5:06 ` [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines' no-reply
@ 2016-11-29 13:26 ` no-reply
  2016-11-29 17:57 ` [Qemu-devel] " Eduardo Habkost
  22 siblings, 0 replies; 27+ messages in thread
From: no-reply @ 2016-11-29 13:26 UTC (permalink / raw)
  To: ehabkost
  Cc: famz, qemu-devel, armbru, marcel, mst, david, libvir-list,
	abologna, groug, aik, laine, cornelia.huck, david

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Subject: [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
Type: series
Message-id: 1480111556-32586-1-git-send-email-ehabkost@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
90c47fa pc: Initialize default bus lists
5e7855e pci: validate interfaces on base_class_init
ccf7181 q35: Hack to make root bus accept legacy PCI devices
e19e7f6 pci: Set device_type on bus classes
4c1b8d0 remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices
687122f eepro100: Add INTERFACE_LEGACY_PCI_DEVICE
87a772c Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses
7d11921 edu: Move edu_info outside function
b64206d pci: Replace is_express with INTERFACE_PCIE_DEVICE
4117fca pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces
87f4a44 pvscsi: Set PCIDeviceClass::is_express=1
d77fcbc vmxnet3: Set PCIDeviceClass::is_express=1
be0dded virtio-pci: Set PCIDeviceClass::is_express=1
01c88b9 qmp: Add 'always-available-buses' field to 'query-machines'
3b00160 qdev: Add 'accepted-device-types' property to BusClass
7b98dda tests: Add rules to non-gtester qtest test cases
9dc8f87 qtest.py: Make 'binary' parameter optional
913752f qtest.py: make logging optional
a2621f3 qtest.py: Support QTEST_LOG environment variable
e765e8c qemu.py: Make logging optional

=== OUTPUT BEGIN ===
Checking PATCH 1/20: qemu.py: Make logging optional...
Checking PATCH 2/20: qtest.py: Support QTEST_LOG environment variable...
Checking PATCH 3/20: qtest.py: make logging optional...
WARNING: line over 80 characters
#26: FILE: scripts/qtest.py:87:
+                                               socket_scm_helper=socket_scm_helper,

total: 0 errors, 1 warnings, 14 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 4/20: qtest.py: Make 'binary' parameter optional...
Checking PATCH 5/20: tests: Add rules to non-gtester qtest test cases...
Checking PATCH 6/20: qdev: Add 'accepted-device-types' property to BusClass...
Checking PATCH 7/20: qmp: Add 'always-available-buses' field to 'query-machines'...
ERROR: line over 90 characters
#259: FILE: tests/qmp-machine-info.py:59:
+                dt = vm.qmp('qom-get', path=cp, property='accepted-device-types').get('return')

WARNING: line over 80 characters
#280: FILE: tests/qmp-machine-info.py:80:
+                btype = vm.qmp('qom-get', path=bus_id, property='type').get('return')

ERROR: line over 90 characters
#281: FILE: tests/qmp-machine-info.py:81:
+                self.assertEquals(btype, b['bus-type'], "bus-type mismatch for %s" % (bus_id))

ERROR: line over 90 characters
#282: FILE: tests/qmp-machine-info.py:82:
+                devtypes = vm.qmp('qom-get', path=bus_id, property='accepted-device-types').get('return')

ERROR: line over 90 characters
#283: FILE: tests/qmp-machine-info.py:83:
+                self.assertEquals(set(devtypes), set(b['accepted-device-types']), "device-type msimatch for %s" % (bus_id))

ERROR: line over 90 characters
#300: FILE: tests/qmp-machine-info.py:100:
+                self.fail("Unexpected inconsistency: some buses were found using qom-get, but not on the device tree: %r", found_buses)

WARNING: line over 80 characters
#315: FILE: tests/qmp-machine-info.py:115:
+            self.skipTest("machine %s on NODEFAULTS_BLACKLIST" % (machine['name']))

WARNING: line over 80 characters
#321: FILE: tests/qmp-machine-info.py:121:
+        """Dynamically add a testMachine_<arch>_<name>_<machine> method to the class"""

WARNING: line over 80 characters
#326: FILE: tests/qmp-machine-info.py:126:
+        method_name = 'test_%s_%s_%s' % (method_name, machine['arch'], machine_name)

ERROR: line over 90 characters
#339: FILE: tests/qmp-machine-info.py:139:
+        vm = qtest.QEMUQtestMachine(binary=binary, args=['-S', '-machine', 'none'], logging=False)

WARNING: line over 80 characters
#358: FILE: tests/qmp-machine-info.py:158:
+        method_names = unittest.loader.getTestCaseNames(klass, prefix='machineTest')

total: 6 errors, 5 warnings, 335 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 8/20: virtio-pci: Set PCIDeviceClass::is_express=1...
Checking PATCH 9/20: vmxnet3: Set PCIDeviceClass::is_express=1...
Checking PATCH 10/20: pvscsi: Set PCIDeviceClass::is_express=1...
Checking PATCH 11/20: pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces...
Checking PATCH 12/20: pci: Replace is_express with INTERFACE_PCIE_DEVICE...
Checking PATCH 13/20: edu: Move edu_info outside function...
Checking PATCH 14/20: Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses...
Checking PATCH 15/20: eepro100: Add INTERFACE_LEGACY_PCI_DEVICE...
Checking PATCH 16/20: remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices...
Checking PATCH 17/20: pci: Set device_type on bus classes...
Checking PATCH 18/20: q35: Hack to make root bus accept legacy PCI devices...
Checking PATCH 19/20: pci: validate interfaces on base_class_init...
Checking PATCH 20/20: pc: Initialize default bus lists...
WARNING: line over 80 characters
#42: FILE: hw/i386/pc_piix.c:442:
+    /* Sanity check to ensure we are reporting only legacy PCI devices as supported */

ERROR: line over 90 characters
#48: FILE: hw/i386/pc_piix.c:448:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#48: FILE: hw/i386/pc_piix.c:448:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

WARNING: line over 80 characters
#49: FILE: hw/i386/pc_piix.c:449:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#49: FILE: hw/i386/pc_piix.c:449:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#51: FILE: hw/i386/pc_piix.c:451:
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#52: FILE: hw/i386/pc_piix.c:452:
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro

ERROR: line over 90 characters
#60: FILE: hw/i386/pc_piix.c:1101:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#60: FILE: hw/i386/pc_piix.c:1101:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#62: FILE: hw/i386/pc_piix.c:1103:
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#63: FILE: hw/i386/pc_piix.c:1104:
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro

ERROR: line over 90 characters
#71: FILE: hw/i386/pc_piix.c:1124:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#71: FILE: hw/i386/pc_piix.c:1124:
+    machine_class_add_always_available_bus(m, "floppy-bus.0", "floppy-bus"); //FIXME: use macro

WARNING: line over 80 characters
#72: FILE: hw/i386/pc_piix.c:1125:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#72: FILE: hw/i386/pc_piix.c:1125:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#75: FILE: hw/i386/pc_piix.c:1128:
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#76: FILE: hw/i386/pc_piix.c:1129:
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro

WARNING: line over 80 characters
#108: FILE: hw/i386/pc_q35.c:308:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#108: FILE: hw/i386/pc_q35.c:308:
+    machine_class_add_always_available_bus(m, "i2c", "i2c-bus"); //FIXME: use macro

ERROR: do not use C99 // comments
#110: FILE: hw/i386/pc_q35.c:310:
+    machine_class_add_always_available_bus(m, "ide.0", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#111: FILE: hw/i386/pc_q35.c:311:
+    machine_class_add_always_available_bus(m, "ide.1", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#112: FILE: hw/i386/pc_q35.c:312:
+    machine_class_add_always_available_bus(m, "ide.2", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#113: FILE: hw/i386/pc_q35.c:313:
+    machine_class_add_always_available_bus(m, "ide.3", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#114: FILE: hw/i386/pc_q35.c:314:
+    machine_class_add_always_available_bus(m, "ide.4", "IDE");//FIXME: use macro

ERROR: do not use C99 // comments
#115: FILE: hw/i386/pc_q35.c:315:
+    machine_class_add_always_available_bus(m, "ide.5", "IDE");//FIXME: use macro

total: 21 errors, 4 warnings, 88 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass
  2016-11-25 22:05 ` [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass Eduardo Habkost
@ 2016-11-29 13:57   ` Cornelia Huck
  2016-11-29 14:18     ` Eduardo Habkost
  0 siblings, 1 reply; 27+ messages in thread
From: Cornelia Huck @ 2016-11-29 13:57 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

On Fri, 25 Nov 2016 20:05:42 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> Each bus class will now be aware of the specific device types
> that can be plugged on it. That will be useful for:
> 
> * Runtime check for which devices types can be plugged to the
>   machine;
> * Validation of query-machines output by automated tests.
> 
> By default, a single type name is used on all bus instances (set
> at BusClass::device_type), but bus instances can override it and
> return a different type list.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

I've read (well, more skimmed through) the whole patchset and I think
we have different cases of "multiple device types for one bus":

- the q35 root bus case later in this patchset, where just a certain
instance of the bus can accept multiple types
- the case where every instance of a bus may accept multiple types
(none currently; but this will be the case for e.g. virtual-css once we
have other derivates of CCW_DEVICE than virtio-ccw)

For the second case, a static initializer for multiple types in the
class makes sense; but the first case is a bit hackish. Should there be
a generic way to pass a list of types to the individual bus instance's
initializers (that could fall back to a static list in the class)?

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass
  2016-11-29 13:57   ` Cornelia Huck
@ 2016-11-29 14:18     ` Eduardo Habkost
  2016-12-02 12:03       ` Cornelia Huck
  0 siblings, 1 reply; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-29 14:18 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

On Tue, Nov 29, 2016 at 02:57:07PM +0100, Cornelia Huck wrote:
> On Fri, 25 Nov 2016 20:05:42 -0200
> Eduardo Habkost <ehabkost@redhat.com> wrote:
> 
> > Each bus class will now be aware of the specific device types
> > that can be plugged on it. That will be useful for:
> > 
> > * Runtime check for which devices types can be plugged to the
> >   machine;
> > * Validation of query-machines output by automated tests.
> > 
> > By default, a single type name is used on all bus instances (set
> > at BusClass::device_type), but bus instances can override it and
> > return a different type list.
> > 
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> I've read (well, more skimmed through) the whole patchset and I think
> we have different cases of "multiple device types for one bus":
> 
> - the q35 root bus case later in this patchset, where just a certain
> instance of the bus can accept multiple types
> - the case where every instance of a bus may accept multiple types
> (none currently; but this will be the case for e.g. virtual-css once we
> have other derivates of CCW_DEVICE than virtio-ccw)

Are all going to be subclasses of TYPE_CCW_DEVICE, and are all
TYPE_CCW_DEVICE subclasses going to be accepted by virtual-css?
In this case, you could just set BusClass::device_type to
TYPE_CCW_DEVICE on virtual-css-bus.

> 
> For the second case, a static initializer for multiple types in the
> class makes sense;

If necessary, we can change BusClass::device_type to a
BusClass::device_types list. I didn't do that because it didn't
seem necessary (and I would like to encourage buses to encode
compatiblity using a single type/interface name whenever
possible).


>                    but the first case is a bit hackish. Should there be
> a generic way to pass a list of types to the individual bus instance's
> initializers (that could fall back to a static list in the class)?

Sound good, but I don't know how that generic mechanism could
look like. Would a:
  void bus_add_accepted_device_type(BusState *bus, const char *devtype)
function be enough?

-- 
Eduardo

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines'
  2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
                   ` (21 preceding siblings ...)
  2016-11-29 13:26 ` no-reply
@ 2016-11-29 17:57 ` Eduardo Habkost
  22 siblings, 0 replies; 27+ messages in thread
From: Eduardo Habkost @ 2016-11-29 17:57 UTC (permalink / raw)
  To: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin
  Cc: libvir-list, Laine Stump, Alexey Kardashevskiy, Greg Kurz,
	David Gibson, Andrea Bolognani, Eric Blake, Cornelia Huck,
	David Hildenbrand

On Fri, Nov 25, 2016 at 08:05:36PM -0200, Eduardo Habkost wrote:
[...]
> Example output
> --------------
> 
> TODO: update it.


I've forgot to update it. Here it is:

  {
    "return": [
        {
            "cpu-max": 1, 
            "hotpluggable-cpus": false, 
            "name": "none"
        },
        [...]
        {
            "cpu-max": 1, 
            "hotpluggable-cpus": false, 
            "name": "xenpv"
        },
        [...]
        {
            "name": "pc-i440fx-2.8", 
            "always-available-buses": [
                {
                    "bus-id": "ide.1", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.0", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "isa.0", 
                    "bus-type": "ISA", 
                    "accepted-device-types": [
                        "isa-device"
                    ]
                }, 
                {
                    "bus-id": "i2c", 
                    "bus-type": "i2c-bus", 
                    "accepted-device-types": [
                        "i2c-slave"
                    ]
                }, 
                {
                    "bus-id": "floppy-bus.0", 
                    "bus-type": "floppy-bus", 
                    "accepted-device-types": [
                        "floppy"
                    ]
                }, 
                {
                    "bus-id": "pci.0", 
                    "bus-type": "PCI", 
                    "accepted-device-types": [
                        "legacy-pci-device"
                    ]
                }, 
                {
                    "bus-id": "sysbus", 
                    "bus-type": "System", 
                    "accepted-device-types": [
                        "sys-bus-device"
                    ]
                }
            ], 
            "alias": "pc", 
            "is-default": true, 
            "cpu-max": 255, 
            "hotpluggable-cpus": true
        },
        [...]
        {
            "cpu-max": 1, 
            "hotpluggable-cpus": true, 
            "always-available-buses": [
                {
                    "bus-id": "ide.1", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.0", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "isa.0", 
                    "bus-type": "ISA", 
                    "accepted-device-types": [
                        "isa-device"
                    ]
                }, 
                {
                    "bus-id": "floppy-bus.0", 
                    "bus-type": "floppy-bus", 
                    "accepted-device-types": [
                        "floppy"
                    ]
                }, 
                {
                    "bus-id": "sysbus", 
                    "bus-type": "System", 
                    "accepted-device-types": [
                        "sys-bus-device"
                    ]
                }
            ], 
            "name": "isapc"
        },
        [...]
        {
            "cpu-max": 128, 
            "hotpluggable-cpus": true, 
            "always-available-buses": [
                {
                    "bus-id": "ide.1", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.0", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "isa.0", 
                    "bus-type": "ISA", 
                    "accepted-device-types": [
                        "isa-device"
                    ]
                }, 
                {
                    "bus-id": "pci.0", 
                    "bus-type": "PCI", 
                    "accepted-device-types": [
                        "legacy-pci-device"
                    ]
                }, 
                {
                    "bus-id": "i2c", 
                    "bus-type": "i2c-bus", 
                    "accepted-device-types": [
                        "i2c-slave"
                    ]
                }, 
                {
                    "bus-id": "floppy-bus.0", 
                    "bus-type": "floppy-bus", 
                    "accepted-device-types": [
                        "floppy"
                    ]
                }, 
                {
                    "bus-id": "sysbus", 
                    "bus-type": "System", 
                    "accepted-device-types": [
                        "sys-bus-device"
                    ]
                }
            ], 
            "name": "xenfv"
        },
        [...]
        {
            "alias": "q35", 
            "cpu-max": 288, 
            "hotpluggable-cpus": true, 
            "always-available-buses": [
                {
                    "bus-id": "ide.5", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.4", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.3", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.2", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.1", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "ide.0", 
                    "bus-type": "IDE", 
                    "accepted-device-types": [
                        "ide-device"
                    ]
                }, 
                {
                    "bus-id": "isa.0", 
                    "bus-type": "ISA", 
                    "accepted-device-types": [
                        "isa-device"
                    ]
                }, 
                {
                    "bus-id": "i2c", 
                    "bus-type": "i2c-bus", 
                    "accepted-device-types": [
                        "i2c-slave"
                    ]
                }, 
                {
                    "bus-id": "pcie.0", 
                    "bus-type": "PCIE", 
                    "accepted-device-types": [
                        "legacy-pci-device", 
                        "pci-express-device"
                    ]
                }, 
                {
                    "bus-id": "sysbus", 
                    "bus-type": "System", 
                    "accepted-device-types": [
                        "sys-bus-device"
                    ]
                }
            ], 
            "name": "pc-q35-2.8"
        },
    ]
  }

-- 
Eduardo

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass
  2016-11-29 14:18     ` Eduardo Habkost
@ 2016-12-02 12:03       ` Cornelia Huck
  0 siblings, 0 replies; 27+ messages in thread
From: Cornelia Huck @ 2016-12-02 12:03 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-devel, Markus Armbruster, Marcel Apfelbaum,
	Michael S. Tsirkin

On Tue, 29 Nov 2016 12:18:19 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Tue, Nov 29, 2016 at 02:57:07PM +0100, Cornelia Huck wrote:
> > On Fri, 25 Nov 2016 20:05:42 -0200
> > Eduardo Habkost <ehabkost@redhat.com> wrote:
> > 
> > > Each bus class will now be aware of the specific device types
> > > that can be plugged on it. That will be useful for:
> > > 
> > > * Runtime check for which devices types can be plugged to the
> > >   machine;
> > > * Validation of query-machines output by automated tests.
> > > 
> > > By default, a single type name is used on all bus instances (set
> > > at BusClass::device_type), but bus instances can override it and
> > > return a different type list.
> > > 
> > > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > 
> > I've read (well, more skimmed through) the whole patchset and I think
> > we have different cases of "multiple device types for one bus":
> > 
> > - the q35 root bus case later in this patchset, where just a certain
> > instance of the bus can accept multiple types
> > - the case where every instance of a bus may accept multiple types
> > (none currently; but this will be the case for e.g. virtual-css once we
> > have other derivates of CCW_DEVICE than virtio-ccw)
> 
> Are all going to be subclasses of TYPE_CCW_DEVICE, and are all
> TYPE_CCW_DEVICE subclasses going to be accepted by virtual-css?

That's what we plan to do, yes.

> In this case, you could just set BusClass::device_type to
> TYPE_CCW_DEVICE on virtual-css-bus.

Sounds reasonable.

> 
> > 
> > For the second case, a static initializer for multiple types in the
> > class makes sense;
> 
> If necessary, we can change BusClass::device_type to a
> BusClass::device_types list. I didn't do that because it didn't
> seem necessary (and I would like to encourage buses to encode
> compatiblity using a single type/interface name whenever
> possible).

Most busses will probably allow a single (parent) device type anyway,
so that's fine, I guess.

> 
> 
> >                    but the first case is a bit hackish. Should there be
> > a generic way to pass a list of types to the individual bus instance's
> > initializers (that could fall back to a static list in the class)?
> 
> Sound good, but I don't know how that generic mechanism could
> look like. Would a:
>   void bus_add_accepted_device_type(BusState *bus, const char *devtype)
> function be enough?

Would we need a remove helper as well (i.e. "this bus normally supports
types a and b, but this instance accepts only a")? It is probably
enough to add it should the need arise some day.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2016-12-02 12:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-25 22:05 [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines' Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 01/20] qemu.py: Make logging optional Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 02/20] qtest.py: Support QTEST_LOG environment variable Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 03/20] qtest.py: make logging optional Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 04/20] qtest.py: Make 'binary' parameter optional Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 05/20] tests: Add rules to non-gtester qtest test cases Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass Eduardo Habkost
2016-11-29 13:57   ` Cornelia Huck
2016-11-29 14:18     ` Eduardo Habkost
2016-12-02 12:03       ` Cornelia Huck
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 07/20] qmp: Add 'always-available-buses' field to 'query-machines' Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 08/20] virtio-pci: Set PCIDeviceClass::is_express=1 Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 09/20] vmxnet3: " Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 10/20] pvscsi: " Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 11/20] pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 12/20] pci: Replace is_express with INTERFACE_PCIE_DEVICE Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 14/20] [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 15/20] eepro100: Add INTERFACE_LEGACY_PCI_DEVICE Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 17/20] pci: Set device_type on bus classes Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 19/20] pci: validate interfaces on base_class_init Eduardo Habkost
2016-11-25 22:05 ` [Qemu-devel] [RFC v2 20/20] pc: Initialize default bus lists Eduardo Habkost
2016-11-29  5:06 ` [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines' no-reply
2016-11-29 13:26 ` no-reply
2016-11-29 17:57 ` [Qemu-devel] " Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).