All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff
@ 2018-08-08 11:48 Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 01/22] configure: We don't want to clean configuration files Juan Quintela
                   ` (22 more replies)
  0 siblings, 23 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Hi

First the things I didn'~t touch:
- CONFIG_FOO in source files (scsi mainly)
  Paolo said that there are people working on that
- usb: it is a mess how things are entangled there
- acpi options (like hotplug etc); another entanglement

So, what is there?
- the bits that didn't got reviewed on previous iteration
- virtio-pci: As Thomas did something for s390, I did the bits for virtio-pci.

I am able now to disable all virtio-pci devices, and run make tests.
This is my current virtio bits:


CONFIG_VIRTIO=y
CONFIG_VIRTIO_CRYPTO=y
CONFIG_VIRTIO_GPU=y
CONFIG_SCSI=y
CONFIG_VIRTIO_SCSI=y

VIRTIO_SCSI is used in cdrom-test.c.  The only way to be able to
disable it is to test for its existence insed that test.  Notice that
this are the same bits that make it impssible to disable megasas, lsi
and esp.

Please, comment.

Juan.



[v1]
Notice that this is an RFC because they don't work.  As said on my
previous submmision, we need <foo>-softmmu/config-devices.h to make
this work.  This series just allow us to disable the devices, but not
to enable it back O:-)

Notice:

- scsi stuff: we are testing they in cdrom-test.c, so we need to be
  able to config them out.  Notice also that #ifdefs only go in tests/<...>

- virtio stuff: see how we need to also change hw/virtio/virtio-pci.c
  to disable it.  The problem appears in the device-instropect-test.c.
  As they are defined in the binary, but not complied in.  We can
  change for a registration appreach, but that is more work that what
  I intended for this series.

What do you think?

Later, Juan.

Based-on: 


Juan Quintela (22):
  configure: We don't want to clean configuration files
  config:  CONFIG_SERIAL* is already in pci.mak
  check: Use land/lor when possible
  check: Only test isa-testdev when it is compiled in
  check: Only test usb-xhci-nec when it is compiled in
  i386-softmmu: Configuration is identical to x86_64-softmmu
  check: Only test ivshm when it is compiled in
  check: Only test tpm devices when they are compiled in
  virtio: Remove unneeded includes
  virtio: split vsock bits from virtio-pci
  virtio: split host bits from virtio-pci
  virtio: split input bits from virtio-pci
  virtio: split rng bits from virtio-pci
  virtio: split balloon bits from virtio-pci
  virtio: split 9p bits from virtio-pci
  virtio: split vhost-user-blk bits from virtio-pci
  virtio: split vhost-user-scsi bits from virtio-pci
  virtio: split vhost-scsi bits from virtio-pci
  virtio: split virtio-scsi bits from virtio-pci
  virtio: split virtio-blk bits rom virtio-pci
  virtio: split virtio-net bits rom virtio-pci
  virtio: split virtio-serial bits rom virtio-pci

 Makefile                                |   3 +-
 default-configs/alpha-softmmu.mak       |   2 -
 default-configs/arm-softmmu.mak         |   2 -
 default-configs/hppa-softmmu.mak        |   3 -
 default-configs/i386-softmmu.mak        |  67 +-
 default-configs/mips-softmmu-common.mak |   2 -
 default-configs/ppc-softmmu.mak         |   1 -
 default-configs/ppcemb-softmmu.mak      |   2 -
 default-configs/sh4-softmmu.mak         |   2 -
 default-configs/sh4eb-softmmu.mak       |   2 -
 default-configs/sparc64-softmmu.mak     |   2 -
 default-configs/virtio.mak              |   3 +
 default-configs/x86_64-softmmu.mak      |   2 -
 hw/virtio/Makefile.objs                 |  14 +-
 hw/virtio/vhost-scsi-pci.c              |  94 +++
 hw/virtio/vhost-user-blk-pci.c          |  88 +++
 hw/virtio/vhost-user-scsi-pci.c         |  89 +++
 hw/virtio/vhost-vsock-pci.c             |  71 +++
 hw/virtio/virtio-9p-pci.c               |  74 +++
 hw/virtio/virtio-balloon-pci.c          |  82 +++
 hw/virtio/virtio-blk-pci.c              |  82 +++
 hw/virtio/virtio-input-host-pci.c       |  42 ++
 hw/virtio/virtio-input-pci.c            | 136 ++++
 hw/virtio/virtio-net-pci.c              |  81 +++
 hw/virtio/virtio-pci.c                  | 792 +-----------------------
 hw/virtio/virtio-rng-pci.c              |  77 +++
 hw/virtio/virtio-scsi-pci.c             |  93 +++
 hw/virtio/virtio-serial-pci.c           |  97 +++
 tests/Makefile.include                  |  89 ++-
 29 files changed, 1169 insertions(+), 925 deletions(-)
 create mode 100644 hw/virtio/vhost-scsi-pci.c
 create mode 100644 hw/virtio/vhost-user-blk-pci.c
 create mode 100644 hw/virtio/vhost-user-scsi-pci.c
 create mode 100644 hw/virtio/vhost-vsock-pci.c
 create mode 100644 hw/virtio/virtio-9p-pci.c
 create mode 100644 hw/virtio/virtio-balloon-pci.c
 create mode 100644 hw/virtio/virtio-blk-pci.c
 create mode 100644 hw/virtio/virtio-input-host-pci.c
 create mode 100644 hw/virtio/virtio-input-pci.c
 create mode 100644 hw/virtio/virtio-net-pci.c
 create mode 100644 hw/virtio/virtio-rng-pci.c
 create mode 100644 hw/virtio/virtio-scsi-pci.c
 create mode 100644 hw/virtio/virtio-serial-pci.c

-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 01/22] configure: We don't want to clean configuration files
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak Juan Quintela
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

If you don't want to compile everything, you configure
config-devices.mak.  And then make clean remove it, and make will
create a default one without your configuration.  Fix it by not
removing it on clean target.  Remove it instead on distclean.

Signed-off-by: Juan Quintela <quintela@redhat.com>

--

Remove it instead on distclean.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2da686be33..5059e53eb3 100644
--- a/Makefile
+++ b/Makefile
@@ -751,7 +751,7 @@ clean:
 	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
 	rm -f $$d/qemu-options.def; \
         done
-	rm -f $(SUBDIR_DEVICES_MAK) config-all-devices.mak
+	rm -f config-all-devices.mak
 
 VERSION ?= $(shell cat VERSION)
 
@@ -763,6 +763,7 @@ qemu-%.tar.bz2:
 distclean: clean
 	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
 	rm -f config-all-devices.mak config-all-disas.mak config.status
+	rm -f $(SUBDIR_DEVICES_MAK)
 	rm -f po/*.mo tests/qemu-iotests/common.env
 	rm -f roms/seabios/config.mak roms/vgabios/config.mak
 	rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 01/22] configure: We don't want to clean configuration files Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:00   ` Thomas Huth
  2018-08-10 10:19   ` Paolo Bonzini
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 03/22] check: Use land/lor when possible Juan Quintela
                   ` (20 subsequent siblings)
  22 siblings, 2 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 default-configs/alpha-softmmu.mak       | 2 --
 default-configs/arm-softmmu.mak         | 2 --
 default-configs/hppa-softmmu.mak        | 3 ---
 default-configs/i386-softmmu.mak        | 2 --
 default-configs/mips-softmmu-common.mak | 2 --
 default-configs/ppc-softmmu.mak         | 1 -
 default-configs/ppcemb-softmmu.mak      | 2 --
 default-configs/sh4-softmmu.mak         | 2 --
 default-configs/sh4eb-softmmu.mak       | 2 --
 default-configs/sparc64-softmmu.mak     | 2 --
 default-configs/x86_64-softmmu.mak      | 2 --
 11 files changed, 22 deletions(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index bbe361f01a..2d81a98441 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -2,8 +2,6 @@
 
 include pci.mak
 include usb.mak
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_I82374=y
 CONFIG_I8254=y
 CONFIG_I8257=y
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 834d45cfaf..4d33e9983d 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -5,8 +5,6 @@ include usb.mak
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
diff --git a/default-configs/hppa-softmmu.mak b/default-configs/hppa-softmmu.mak
index 4badc0521e..f3712afc27 100644
--- a/default-configs/hppa-softmmu.mak
+++ b/default-configs/hppa-softmmu.mak
@@ -1,8 +1,5 @@
 include pci.mak
 include usb.mak
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
-CONFIG_ISA_BUS=y
 CONFIG_I8259=y
 CONFIG_E1000_PCI=y
 CONFIG_IDE_ISA=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 8c7d4a0fa0..8827166ba1 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -15,8 +15,6 @@ CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index fae2347ee7..9bae997ca0 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -9,8 +9,6 @@ CONFIG_VGA_ISA=y
 CONFIG_VGA_ISA_MM=y
 CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 3181bbf163..d8dd969499 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -53,7 +53,6 @@ CONFIG_IDE_MACIO=y
 # For PReP
 CONFIG_PREP=y
 CONFIG_PREP_PCI=y
-CONFIG_SERIAL_ISA=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_RS6000_MC=y
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index ac44f150c6..f7a0d577d8 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -5,8 +5,6 @@ include sound.mak
 include usb.mak
 CONFIG_PPC4XX=y
 CONFIG_M48T59=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_I8257=y
 CONFIG_OPENPIC=y
 CONFIG_PFLASH_CFI01=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index caeccd55be..2b46d57ab4 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -2,8 +2,6 @@
 
 include pci.mak
 include usb.mak
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index 53b9cd7b5a..279896a43d 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -2,8 +2,6 @@
 
 include pci.mak
 include usb.mak
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index 52edafe547..e039ae3057 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -4,8 +4,6 @@ include pci.mak
 include usb.mak
 CONFIG_M48T59=y
 CONFIG_PTIMER=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_PCKBD=y
 CONFIG_FDC=y
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
index 0390b4303c..85528ac9af 100644
--- a/default-configs/x86_64-softmmu.mak
+++ b/default-configs/x86_64-softmmu.mak
@@ -15,8 +15,6 @@ CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
 CONFIG_I8254=y
 CONFIG_PCSPK=y
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 03/22] check: Use land/lor when possible
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 01/22] configure: We don't want to clean configuration files Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in Juan Quintela
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

So everythig is (a bit) more consistent

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index d6f5cc9ccc..2016c353e3 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -98,11 +98,9 @@ check-unit-y += tests/test-block-backend$(EXESUF)
 check-unit-y += tests/test-x86-cpuid$(EXESUF)
 # all code tested by test-x86-cpuid is inside topology.h
 gcov-files-test-x86-cpuid-y =
-ifeq ($(CONFIG_SOFTMMU),y)
-check-unit-y += tests/test-xbzrle$(EXESUF)
-gcov-files-test-xbzrle-y = migration/xbzrle.c
-check-unit-$(CONFIG_POSIX) += tests/test-vmstate$(EXESUF)
-endif
+check-unit-$(CONFIG_SOFTMMU) += tests/test-xbzrle$(EXESUF)
+gcov-files-test-xbzrle-$(CONFIG_SOFTMMU) = migration/xbzrle.c
+check-unit-$(call land, $(CONFIG_SOFTMMU), $(CONFIG_POSIX)) += tests/test-vmstate$(EXESUF)
 check-unit-y += tests/test-cutils$(EXESUF)
 gcov-files-test-cutils-y += util/cutils.c
 check-unit-y += tests/test-shift128$(EXESUF)
@@ -299,9 +297,7 @@ check-qtest-i386-y += tests/q35-test$(EXESUF)
 check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
 gcov-files-i386-y += hw/pci-host/q35.c
 check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
-ifeq ($(CONFIG_VHOST_USER_NET_TEST_i386),)
-check-qtest-x86_64-$(CONFIG_VHOST_USER_NET_TEST_x86_64) += tests/vhost-user-test$(EXESUF)
-endif
+check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386), $(CONFIG_VHOST_USER_NET_TEST_x86_64)) += tests/vhost-user-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-swtpm-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-test$(EXESUF)
 check-qtest-i386-$(CONFIG_TPM) += tests/tpm-tis-swtpm-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (2 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 03/22] check: Use land/lor when possible Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:03   ` Thomas Huth
  2018-08-10 10:20   ` Paolo Bonzini
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec " Juan Quintela
                   ` (18 subsequent siblings)
  22 siblings, 2 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Once there, untangle endianness-test and boot-serial-test.

Signed-off-by: Juan Quintela <quintela@redhat.com>

--

boot-serial-test don't depend on isa-testdev.  Thanks Thomas.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 2016c353e3..4e5f47aac0 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -248,7 +248,7 @@ gcov-files-pci-y += hw/misc/ivshmem.c
 check-qtest-pci-y += tests/megasas-test$(EXESUF)
 gcov-files-pci-y += hw/scsi/megasas.c
 
-check-qtest-i386-y = tests/endianness-test$(EXESUF)
+check-qtest-i386-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
 gcov-files-i386-y = hw/block/fdc.c
 check-qtest-i386-y += tests/ide-test$(EXESUF)
@@ -321,15 +321,15 @@ check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)
 
-check-qtest-mips-y = tests/endianness-test$(EXESUF)
-
-check-qtest-mips64-y = tests/endianness-test$(EXESUF)
-
-check-qtest-mips64el-y = tests/endianness-test$(EXESUF)
-
 check-qtest-moxie-y = tests/boot-serial-test$(EXESUF)
 
-check-qtest-ppc-y = tests/endianness-test$(EXESUF)
+check-qtest-mips-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
+
+check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
+
+check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
+
+check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
 check-qtest-ppc-y += tests/prom-env-test$(EXESUF)
 check-qtest-ppc-y += tests/drive_del-test$(EXESUF)
@@ -360,16 +360,16 @@ check-qtest-ppc64-y += tests/numa-test$(EXESUF)
 check-qtest-ppc64-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
 check-qtest-ppc64-y += tests/cpu-plug-test$(EXESUF)
 
-check-qtest-sh4-y = tests/endianness-test$(EXESUF)
+check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 
-check-qtest-sh4eb-y = tests/endianness-test$(EXESUF)
+check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 
 check-qtest-sparc-y = tests/prom-env-test$(EXESUF)
 check-qtest-sparc-y += tests/m48t59-test$(EXESUF)
 gcov-files-sparc-y = hw/timer/m48t59.c
 check-qtest-sparc-y += tests/boot-serial-test$(EXESUF)
 
-check-qtest-sparc64-y = tests/endianness-test$(EXESUF)
+check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 check-qtest-sparc64-y += tests/prom-env-test$(EXESUF)
 check-qtest-sparc64-y += tests/boot-serial-test$(EXESUF)
 
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (3 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:06   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu Juan Quintela
                   ` (17 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4e5f47aac0..1105469daa 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -290,8 +290,9 @@ endif
 gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
 gcov-files-i386-y += hw/usb/dev-hid.c
 gcov-files-i386-y += hw/usb/dev-storage.c
-check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
-gcov-files-i386-y += hw/usb/hcd-xhci.c
+check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
+gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
+gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c
 check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
 check-qtest-i386-y += tests/q35-test$(EXESUF)
 check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
@@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) += tests/usb-hcd-ohci-test$(EXESUF)
 gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
 check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
 gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
-check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
-gcov-files-ppc64-y += hw/usb/hcd-xhci.c
+check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
+gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
 check-qtest-ppc64-y += $(check-qtest-virtio-y)
 check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
 check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (4 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:10   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 07/22] check: Only test ivshm when it is compiled in Juan Quintela
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

If we ever changed that, just make the things that are different
explicit.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 default-configs/i386-softmmu.mak | 65 +-------------------------------
 1 file changed, 1 insertion(+), 64 deletions(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 8827166ba1..6ec7a3b0ae 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,66 +1,3 @@
 # Default configuration for i386-softmmu
 
-include pci.mak
-include sound.mak
-include usb.mak
-CONFIG_QXL=$(CONFIG_SPICE)
-CONFIG_VGA_ISA=y
-CONFIG_VGA_CIRRUS=y
-CONFIG_VMWARE_VGA=y
-CONFIG_VMXNET3_PCI=y
-CONFIG_VIRTIO_VGA=y
-CONFIG_VMMOUSE=y
-CONFIG_IPMI=y
-CONFIG_IPMI_LOCAL=y
-CONFIG_IPMI_EXTERN=y
-CONFIG_ISA_IPMI_KCS=y
-CONFIG_ISA_IPMI_BT=y
-CONFIG_PARALLEL=y
-CONFIG_I8254=y
-CONFIG_PCSPK=y
-CONFIG_PCKBD=y
-CONFIG_FDC=y
-CONFIG_ACPI=y
-CONFIG_ACPI_X86=y
-CONFIG_ACPI_X86_ICH=y
-CONFIG_ACPI_MEMORY_HOTPLUG=y
-CONFIG_ACPI_CPU_HOTPLUG=y
-CONFIG_APM=y
-CONFIG_I8257=y
-CONFIG_IDE_ISA=y
-CONFIG_IDE_PIIX=y
-CONFIG_NE2000_ISA=y
-CONFIG_HPET=y
-CONFIG_APPLESMC=y
-CONFIG_I8259=y
-CONFIG_PFLASH_CFI01=y
-CONFIG_TPM_TIS=$(CONFIG_TPM)
-CONFIG_TPM_CRB=$(CONFIG_TPM)
-CONFIG_MC146818RTC=y
-CONFIG_PCI_PIIX=y
-CONFIG_WDT_IB700=y
-CONFIG_ISA_DEBUG=y
-CONFIG_ISA_TESTDEV=y
-CONFIG_VMPORT=y
-CONFIG_SGA=y
-CONFIG_LPC_ICH9=y
-CONFIG_PCI_Q35=y
-CONFIG_APIC=y
-CONFIG_IOAPIC=y
-CONFIG_PVPANIC=y
-CONFIG_MEM_HOTPLUG=y
-CONFIG_NVDIMM=y
-CONFIG_ACPI_NVDIMM=y
-CONFIG_PCIE_PORT=y
-CONFIG_XIO3130=y
-CONFIG_IOH3420=y
-CONFIG_I82801B11=y
-CONFIG_SMBIOS=y
-CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
-CONFIG_PXB=y
-CONFIG_ACPI_VMGENID=y
-CONFIG_FW_CFG_DMA=y
-CONFIG_I2C=y
-CONFIG_SEV=$(CONFIG_KVM)
-CONFIG_VTD=y
-CONFIG_AMD_IOMMU=y
+include x86_64-softmmu.mak
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 07/22] check: Only test ivshm when it is compiled in
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (5 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are " Juan Quintela
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 1105469daa..eae89b0fc0 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -243,8 +243,8 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c
 gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virtio-vga.c
 check-qtest-pci-$(CONFIG_HDA) += tests/intel-hda-test$(EXESUF)
 gcov-files-pci-$(CONFIG_HDA) += hw/audio/intel-hda.c hw/audio/hda-codec.c
-check-qtest-pci-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
-gcov-files-pci-y += hw/misc/ivshmem.c
+check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += tests/ivshmem-test$(EXESUF)
+gcov-files-pci-$(CONFIG_IVSHMEM_DEVICE) += hw/misc/ivshmem.c
 check-qtest-pci-y += tests/megasas-test$(EXESUF)
 gcov-files-pci-y += hw/scsi/megasas.c
 
@@ -358,7 +358,7 @@ check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
 check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF)
 check-qtest-ppc64-y += tests/display-vga-test$(EXESUF)
 check-qtest-ppc64-y += tests/numa-test$(EXESUF)
-check-qtest-ppc64-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
+check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) += tests/ivshmem-test$(EXESUF)
 check-qtest-ppc64-y += tests/cpu-plug-test$(EXESUF)
 
 check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are compiled in
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (6 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 07/22] check: Only test ivshm when it is compiled in Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:11   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes Juan Quintela
                   ` (14 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index eae89b0fc0..47a5b66cde 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -299,10 +299,10 @@ check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
 gcov-files-i386-y += hw/pci-host/q35.c
 check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
 check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386), $(CONFIG_VHOST_USER_NET_TEST_x86_64)) += tests/vhost-user-test$(EXESUF)
-check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-swtpm-test$(EXESUF)
-check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-test$(EXESUF)
-check-qtest-i386-$(CONFIG_TPM) += tests/tpm-tis-swtpm-test$(EXESUF)
-check-qtest-i386-$(CONFIG_TPM) += tests/tpm-tis-test$(EXESUF)
+check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-swtpm-test$(EXESUF)
+check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-test$(EXESUF)
+check-qtest-i386-$(CONFIG_TPM_TIS) += tests/tpm-tis-swtpm-test$(EXESUF)
+check-qtest-i386-$(CONFIG_TPM_TIS) += tests/tpm-tis-test$(EXESUF)
 check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
 check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
 check-qtest-i386-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (7 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 13:11   ` Thomas Huth
  2018-08-09 19:03   ` Dr. David Alan Gilbert
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci Juan Quintela
                   ` (13 subsequent siblings)
  22 siblings, 2 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

They are all already included in virtio_pci.h.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/virtio-pci.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 3a01fe90f0..cb2ddd3f41 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -18,24 +18,11 @@
 #include "qemu/osdep.h"
 
 #include "standard-headers/linux/virtio_pci.h"
-#include "hw/virtio/virtio.h"
-#include "hw/virtio/virtio-blk.h"
-#include "hw/virtio/virtio-net.h"
-#include "hw/virtio/virtio-serial.h"
-#include "hw/virtio/virtio-scsi.h"
-#include "hw/virtio/virtio-balloon.h"
-#include "hw/virtio/virtio-input.h"
-#include "hw/pci/pci.h"
+#include "virtio-pci.h"
 #include "qapi/error.h"
-#include "qemu/error-report.h"
-#include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-#include "hw/loader.h"
 #include "sysemu/kvm.h"
-#include "virtio-pci.h"
 #include "qemu/range.h"
-#include "hw/virtio/virtio-bus.h"
-#include "qapi/visitor.h"
 
 #define VIRTIO_PCI_REGION_SIZE(dev)     VIRTIO_PCI_CONFIG_OFF(msix_present(dev))
 
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (8 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-08 12:18   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 11/22] virtio: split host " Juan Quintela
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs     |  2 +-
 hw/virtio/vhost-vsock-pci.c | 71 +++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c      | 51 --------------------------
 3 files changed, 72 insertions(+), 52 deletions(-)
 create mode 100644 hw/virtio/vhost-vsock-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 1b2799cfd8..4fbf7de84b 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -10,7 +10,7 @@ obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-crypto.o
 obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
 
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
-obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
+obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c
new file mode 100644
index 0000000000..5805667dc0
--- /dev/null
+++ b/hw/virtio/vhost-vsock-pci.c
@@ -0,0 +1,71 @@
+/*
+ * Virtio vsock PCI vhost Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static Property vhost_vsock_pci_properties[] = {
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void vhost_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VHostVSockPCI *dev = VHOST_VSOCK_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void vhost_vsock_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->realize = vhost_vsock_pci_realize;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    dc->props = vhost_vsock_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_VSOCK;
+    pcidev_k->revision = 0x00;
+    pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
+}
+
+static void vhost_vsock_pci_instance_init(Object *obj)
+{
+    VHostVSockPCI *dev = VHOST_VSOCK_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VHOST_VSOCK);
+}
+
+static const TypeInfo vhost_vsock_pci_info = {
+    .name          = TYPE_VHOST_VSOCK_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VHostVSockPCI),
+    .instance_init = vhost_vsock_pci_instance_init,
+    .class_init    = vhost_vsock_pci_class_init,
+};
+
+static void virtio_pci_vhost_register(void)
+{
+    type_register_static(&vhost_vsock_pci_info);
+}
+
+type_init(virtio_pci_vhost_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index cb2ddd3f41..1590b34dc9 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2225,54 +2225,6 @@ static const TypeInfo vhost_user_scsi_pci_info = {
 };
 #endif
 
-/* vhost-vsock-pci */
-
-#ifdef CONFIG_VHOST_VSOCK
-static Property vhost_vsock_pci_properties[] = {
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void vhost_vsock_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VHostVSockPCI *dev = VHOST_VSOCK_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void vhost_vsock_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    k->realize = vhost_vsock_pci_realize;
-    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    dc->props = vhost_vsock_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_VSOCK;
-    pcidev_k->revision = 0x00;
-    pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
-}
-
-static void vhost_vsock_pci_instance_init(Object *obj)
-{
-    VHostVSockPCI *dev = VHOST_VSOCK_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VHOST_VSOCK);
-}
-
-static const TypeInfo vhost_vsock_pci_info = {
-    .name          = TYPE_VHOST_VSOCK_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VHostVSockPCI),
-    .instance_init = vhost_vsock_pci_instance_init,
-    .class_init    = vhost_vsock_pci_class_init,
-};
-#endif
-
 /* virtio-balloon-pci */
 
 static Property virtio_balloon_pci_properties[] = {
@@ -2707,9 +2659,6 @@ static void virtio_pci_register_types(void)
 #if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
     type_register_static(&vhost_user_scsi_pci_info);
 #endif
-#ifdef CONFIG_VHOST_VSOCK
-    type_register_static(&vhost_vsock_pci_info);
-#endif
 }
 
 type_init(virtio_pci_register_types)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 11/22] virtio: split host bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (9 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-09  6:10   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 12/22] virtio: split input " Juan Quintela
                   ` (11 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 default-configs/virtio.mak        |  3 +++
 hw/virtio/Makefile.objs           |  1 +
 hw/virtio/virtio-input-host-pci.c | 42 +++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c            | 20 ---------------
 4 files changed, 46 insertions(+), 20 deletions(-)
 create mode 100644 hw/virtio/virtio-input-host-pci.c

diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
index 1304849018..6309dbf938 100644
--- a/default-configs/virtio.mak
+++ b/default-configs/virtio.mak
@@ -12,3 +12,6 @@ CONFIG_VIRTIO_RNG=y
 CONFIG_SCSI=y
 CONFIG_VIRTIO_SCSI=y
 CONFIG_VIRTIO_SERIAL=y
+CONFIG_VIRTIO_VSOCK=y
+CONFIG_VIRTIO_INPUT_HOST=$(CONFIG_LINUX)
+
diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 4fbf7de84b..685ae1d866 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -11,6 +11,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
 
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
+obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-input-host-pci.c b/hw/virtio/virtio-input-host-pci.c
new file mode 100644
index 0000000000..3159693dd9
--- /dev/null
+++ b/hw/virtio/virtio-input-host-pci.c
@@ -0,0 +1,42 @@
+/*
+ * Virtio input host PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static void virtio_input_host_initfn(Object *obj)
+{
+    VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_INPUT_HOST);
+}
+
+static const TypeInfo virtio_input_host_pci_info = {
+    .name          = TYPE_VIRTIO_INPUT_HOST_PCI,
+    .parent        = TYPE_VIRTIO_INPUT_PCI,
+    .instance_size = sizeof(VirtIOInputHostPCI),
+    .instance_init = virtio_input_host_initfn,
+};
+
+static void virtio_input_host_pci_register(void)
+{
+    type_register_static(&virtio_input_host_pci_info);
+}
+
+type_init(virtio_input_host_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 1590b34dc9..f6094bed80 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2567,23 +2567,6 @@ static const TypeInfo virtio_tablet_pci_info = {
     .instance_init = virtio_tablet_initfn,
 };
 
-#ifdef CONFIG_LINUX
-static void virtio_host_initfn(Object *obj)
-{
-    VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_INPUT_HOST);
-}
-
-static const TypeInfo virtio_host_pci_info = {
-    .name          = TYPE_VIRTIO_INPUT_HOST_PCI,
-    .parent        = TYPE_VIRTIO_INPUT_PCI,
-    .instance_size = sizeof(VirtIOInputHostPCI),
-    .instance_init = virtio_host_initfn,
-};
-#endif
-
 /* virtio-pci-bus */
 
 static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
@@ -2637,9 +2620,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_keyboard_pci_info);
     type_register_static(&virtio_mouse_pci_info);
     type_register_static(&virtio_tablet_pci_info);
-#ifdef CONFIG_LINUX
-    type_register_static(&virtio_host_pci_info);
-#endif
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
 #ifdef CONFIG_VIRTFS
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 12/22] virtio: split input bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (10 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 11/22] virtio: split host " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-09  6:17   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 13/22] virtio: split rng " Juan Quintela
                   ` (10 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs      |   1 +
 hw/virtio/virtio-input-pci.c | 136 +++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c       | 112 -----------------------------
 3 files changed, 137 insertions(+), 112 deletions(-)
 create mode 100644 hw/virtio/virtio-input-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 685ae1d866..6819ed4e14 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -12,6 +12,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
+obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c
new file mode 100644
index 0000000000..3198a505e9
--- /dev/null
+++ b/hw/virtio/virtio-input-pci.c
@@ -0,0 +1,136 @@
+/*
+ * Virtio input PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static Property virtio_input_pci_properties[] = {
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_input_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIOInputPCI *vinput = VIRTIO_INPUT_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&vinput->vdev);
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    virtio_pci_force_virtio_1(vpci_dev);
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void virtio_input_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    dc->props = virtio_input_pci_properties;
+    k->realize = virtio_input_pci_realize;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
+
+    pcidev_k->class_id = PCI_CLASS_INPUT_OTHER;
+}
+
+static void virtio_input_hid_kbd_pci_class_init(ObjectClass *klass, void *data)
+{
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    pcidev_k->class_id = PCI_CLASS_INPUT_KEYBOARD;
+}
+
+static void virtio_input_hid_mouse_pci_class_init(ObjectClass *klass,
+                                                  void *data)
+{
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    pcidev_k->class_id = PCI_CLASS_INPUT_MOUSE;
+}
+
+static void virtio_keyboard_initfn(Object *obj)
+{
+    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_KEYBOARD);
+}
+
+static void virtio_mouse_initfn(Object *obj)
+{
+    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_MOUSE);
+}
+
+static void virtio_tablet_initfn(Object *obj)
+{
+    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_TABLET);
+}
+
+static const TypeInfo virtio_input_pci_info = {
+    .name          = TYPE_VIRTIO_INPUT_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOInputPCI),
+    .class_init    = virtio_input_pci_class_init,
+    .abstract      = true,
+};
+
+static const TypeInfo virtio_input_hid_pci_info = {
+    .name          = TYPE_VIRTIO_INPUT_HID_PCI,
+    .parent        = TYPE_VIRTIO_INPUT_PCI,
+    .instance_size = sizeof(VirtIOInputHIDPCI),
+    .abstract      = true,
+};
+
+static const TypeInfo virtio_keyboard_pci_info = {
+    .name          = TYPE_VIRTIO_KEYBOARD_PCI,
+    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
+    .class_init    = virtio_input_hid_kbd_pci_class_init,
+    .instance_size = sizeof(VirtIOInputHIDPCI),
+    .instance_init = virtio_keyboard_initfn,
+};
+
+static const TypeInfo virtio_mouse_pci_info = {
+    .name          = TYPE_VIRTIO_MOUSE_PCI,
+    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
+    .class_init    = virtio_input_hid_mouse_pci_class_init,
+    .instance_size = sizeof(VirtIOInputHIDPCI),
+    .instance_init = virtio_mouse_initfn,
+};
+
+static const TypeInfo virtio_tablet_pci_info = {
+    .name          = TYPE_VIRTIO_TABLET_PCI,
+    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
+    .instance_size = sizeof(VirtIOInputHIDPCI),
+    .instance_init = virtio_tablet_initfn,
+};
+
+static void virtio_pci_input_register(void)
+{
+    type_register_static(&virtio_input_pci_info);
+    type_register_static(&virtio_input_hid_pci_info);
+    type_register_static(&virtio_keyboard_pci_info);
+    type_register_static(&virtio_mouse_pci_info);
+    type_register_static(&virtio_tablet_pci_info);
+}
+
+type_init(virtio_pci_input_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index f6094bed80..992d3bc3b4 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2460,113 +2460,6 @@ static const TypeInfo virtio_rng_pci_info = {
     .class_init    = virtio_rng_pci_class_init,
 };
 
-/* virtio-input-pci */
-
-static Property virtio_input_pci_properties[] = {
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_input_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIOInputPCI *vinput = VIRTIO_INPUT_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&vinput->vdev);
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    virtio_pci_force_virtio_1(vpci_dev);
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void virtio_input_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    dc->props = virtio_input_pci_properties;
-    k->realize = virtio_input_pci_realize;
-    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
-
-    pcidev_k->class_id = PCI_CLASS_INPUT_OTHER;
-}
-
-static void virtio_input_hid_kbd_pci_class_init(ObjectClass *klass, void *data)
-{
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    pcidev_k->class_id = PCI_CLASS_INPUT_KEYBOARD;
-}
-
-static void virtio_input_hid_mouse_pci_class_init(ObjectClass *klass,
-                                                  void *data)
-{
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    pcidev_k->class_id = PCI_CLASS_INPUT_MOUSE;
-}
-
-static void virtio_keyboard_initfn(Object *obj)
-{
-    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_KEYBOARD);
-}
-
-static void virtio_mouse_initfn(Object *obj)
-{
-    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_MOUSE);
-}
-
-static void virtio_tablet_initfn(Object *obj)
-{
-    VirtIOInputHIDPCI *dev = VIRTIO_INPUT_HID_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_TABLET);
-}
-
-static const TypeInfo virtio_input_pci_info = {
-    .name          = TYPE_VIRTIO_INPUT_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIOInputPCI),
-    .class_init    = virtio_input_pci_class_init,
-    .abstract      = true,
-};
-
-static const TypeInfo virtio_input_hid_pci_info = {
-    .name          = TYPE_VIRTIO_INPUT_HID_PCI,
-    .parent        = TYPE_VIRTIO_INPUT_PCI,
-    .instance_size = sizeof(VirtIOInputHIDPCI),
-    .abstract      = true,
-};
-
-static const TypeInfo virtio_keyboard_pci_info = {
-    .name          = TYPE_VIRTIO_KEYBOARD_PCI,
-    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
-    .class_init    = virtio_input_hid_kbd_pci_class_init,
-    .instance_size = sizeof(VirtIOInputHIDPCI),
-    .instance_init = virtio_keyboard_initfn,
-};
-
-static const TypeInfo virtio_mouse_pci_info = {
-    .name          = TYPE_VIRTIO_MOUSE_PCI,
-    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
-    .class_init    = virtio_input_hid_mouse_pci_class_init,
-    .instance_size = sizeof(VirtIOInputHIDPCI),
-    .instance_init = virtio_mouse_initfn,
-};
-
-static const TypeInfo virtio_tablet_pci_info = {
-    .name          = TYPE_VIRTIO_TABLET_PCI,
-    .parent        = TYPE_VIRTIO_INPUT_HID_PCI,
-    .instance_size = sizeof(VirtIOInputHIDPCI),
-    .instance_init = virtio_tablet_initfn,
-};
-
 /* virtio-pci-bus */
 
 static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
@@ -2615,11 +2508,6 @@ static const TypeInfo virtio_pci_bus_info = {
 static void virtio_pci_register_types(void)
 {
     type_register_static(&virtio_rng_pci_info);
-    type_register_static(&virtio_input_pci_info);
-    type_register_static(&virtio_input_hid_pci_info);
-    type_register_static(&virtio_keyboard_pci_info);
-    type_register_static(&virtio_mouse_pci_info);
-    type_register_static(&virtio_tablet_pci_info);
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
 #ifdef CONFIG_VIRTFS
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 13/22] virtio: split rng bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (11 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 12/22] virtio: split input " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-09  6:22   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 14/22] virtio: split balloon " Juan Quintela
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs    |  1 +
 hw/virtio/virtio-pci.c     | 52 -------------------------
 hw/virtio/virtio-rng-pci.c | 77 ++++++++++++++++++++++++++++++++++++++
 tests/Makefile.include     |  4 +-
 4 files changed, 80 insertions(+), 54 deletions(-)
 create mode 100644 hw/virtio/virtio-rng-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 6819ed4e14..2efa544a2d 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -13,6 +13,7 @@ obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
+obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 992d3bc3b4..309fb20fef 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2409,57 +2409,6 @@ static const TypeInfo virtio_net_pci_info = {
     .class_init    = virtio_net_pci_class_init,
 };
 
-/* virtio-rng-pci */
-
-static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&vrng->vdev);
-    Error *err = NULL;
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", &err);
-    if (err) {
-        error_propagate(errp, err);
-        return;
-    }
-
-    object_property_set_link(OBJECT(vrng),
-                             OBJECT(vrng->vdev.conf.rng), "rng",
-                             NULL);
-}
-
-static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    k->realize = virtio_rng_pci_realize;
-    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_RNG;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = PCI_CLASS_OTHERS;
-}
-
-static void virtio_rng_initfn(Object *obj)
-{
-    VirtIORngPCI *dev = VIRTIO_RNG_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_RNG);
-}
-
-static const TypeInfo virtio_rng_pci_info = {
-    .name          = TYPE_VIRTIO_RNG_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIORngPCI),
-    .instance_init = virtio_rng_initfn,
-    .class_init    = virtio_rng_pci_class_init,
-};
-
 /* virtio-pci-bus */
 
 static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
@@ -2507,7 +2456,6 @@ static const TypeInfo virtio_pci_bus_info = {
 
 static void virtio_pci_register_types(void)
 {
-    type_register_static(&virtio_rng_pci_info);
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
 #ifdef CONFIG_VIRTFS
diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c
new file mode 100644
index 0000000000..b7651c8b66
--- /dev/null
+++ b/hw/virtio/virtio-rng-pci.c
@@ -0,0 +1,77 @@
+/*
+ * Virtio rng PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+#include "qapi/error.h"
+
+static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&vrng->vdev);
+    Error *err = NULL;
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", &err);
+    if (err) {
+        error_propagate(errp, err);
+        return;
+    }
+
+    object_property_set_link(OBJECT(vrng),
+                             OBJECT(vrng->vdev.conf.rng), "rng",
+                             NULL);
+}
+
+static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    k->realize = virtio_rng_pci_realize;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_RNG;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_OTHERS;
+}
+
+static void virtio_rng_initfn(Object *obj)
+{
+    VirtIORngPCI *dev = VIRTIO_RNG_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_RNG);
+}
+
+static const TypeInfo virtio_rng_pci_info = {
+    .name          = TYPE_VIRTIO_RNG_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIORngPCI),
+    .instance_init = virtio_rng_initfn,
+    .class_init    = virtio_rng_pci_class_init,
+};
+
+static void virtio_rng_pci_register(void)
+{
+    type_register_static(&virtio_rng_pci_info);
+}
+
+type_init(virtio_rng_pci_register)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 47a5b66cde..6f46f9e812 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -195,8 +195,8 @@ check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio-balloon.c
 check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/block/virtio-blk.c
-check-qtest-virtio-y += tests/virtio-rng-test$(EXESUF)
-gcov-files-virtio-y += hw/virtio/virtio-rng.c
+check-qtest-virtio-$(CONFIG_VIRTIO_RNG) += tests/virtio-rng-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_RNG) += hw/virtio/virtio-rng.c
 check-qtest-virtio-y += tests/virtio-scsi-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/scsi/virtio-scsi.c
 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 14/22] virtio: split balloon bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (12 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 13/22] virtio: split rng " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 15:32   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 15/22] virtio: split 9p " Juan Quintela
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs        |  1 +
 hw/virtio/virtio-balloon-pci.c | 82 ++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c         | 57 -----------------------
 tests/Makefile.include         |  4 +-
 4 files changed, 85 insertions(+), 59 deletions(-)
 create mode 100644 hw/virtio/virtio-balloon-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 2efa544a2d..0f0b846a45 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -14,6 +14,7 @@ obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
+obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-balloon-pci.c b/hw/virtio/virtio-balloon-pci.c
new file mode 100644
index 0000000000..629083759c
--- /dev/null
+++ b/hw/virtio/virtio-balloon-pci.c
@@ -0,0 +1,82 @@
+/*
+ * Virtio balloon PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+#include "qapi/error.h"
+
+static Property virtio_balloon_pci_properties[] = {
+    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_balloon_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    if (vpci_dev->class_code != PCI_CLASS_OTHERS &&
+        vpci_dev->class_code != PCI_CLASS_MEMORY_RAM) { /* qemu < 1.1 */
+        vpci_dev->class_code = PCI_CLASS_OTHERS;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void virtio_balloon_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->realize = virtio_balloon_pci_realize;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+    dc->props = virtio_balloon_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_OTHERS;
+}
+
+static void virtio_balloon_pci_instance_init(Object *obj)
+{
+    VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_BALLOON);
+    object_property_add_alias(obj, "guest-stats", OBJECT(&dev->vdev),
+                                  "guest-stats", &error_abort);
+    object_property_add_alias(obj, "guest-stats-polling-interval",
+                              OBJECT(&dev->vdev),
+                              "guest-stats-polling-interval", &error_abort);
+}
+
+static const TypeInfo virtio_balloon_pci_info = {
+    .name          = TYPE_VIRTIO_BALLOON_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOBalloonPCI),
+    .instance_init = virtio_balloon_pci_instance_init,
+    .class_init    = virtio_balloon_pci_class_init,
+};
+
+static void virtio_balloon_pci_register(void)
+{
+    type_register_static(&virtio_balloon_pci_info);
+}
+
+type_init(virtio_balloon_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 309fb20fef..f34817d040 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2225,62 +2225,6 @@ static const TypeInfo vhost_user_scsi_pci_info = {
 };
 #endif
 
-/* virtio-balloon-pci */
-
-static Property virtio_balloon_pci_properties[] = {
-    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_balloon_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    if (vpci_dev->class_code != PCI_CLASS_OTHERS &&
-        vpci_dev->class_code != PCI_CLASS_MEMORY_RAM) { /* qemu < 1.1 */
-        vpci_dev->class_code = PCI_CLASS_OTHERS;
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void virtio_balloon_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    k->realize = virtio_balloon_pci_realize;
-    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
-    dc->props = virtio_balloon_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = PCI_CLASS_OTHERS;
-}
-
-static void virtio_balloon_pci_instance_init(Object *obj)
-{
-    VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_BALLOON);
-    object_property_add_alias(obj, "guest-stats", OBJECT(&dev->vdev),
-                                  "guest-stats", &error_abort);
-    object_property_add_alias(obj, "guest-stats-polling-interval",
-                              OBJECT(&dev->vdev),
-                              "guest-stats-polling-interval", &error_abort);
-}
-
-static const TypeInfo virtio_balloon_pci_info = {
-    .name          = TYPE_VIRTIO_BALLOON_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIOBalloonPCI),
-    .instance_init = virtio_balloon_pci_instance_init,
-    .class_init    = virtio_balloon_pci_class_init,
-};
-
 /* virtio-serial-pci */
 
 static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
@@ -2466,7 +2410,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&vhost_user_blk_pci_info);
 #endif
     type_register_static(&virtio_scsi_pci_info);
-    type_register_static(&virtio_balloon_pci_info);
     type_register_static(&virtio_serial_pci_info);
     type_register_static(&virtio_net_pci_info);
 #ifdef CONFIG_VHOST_SCSI
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6f46f9e812..d0432e4132 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -191,8 +191,8 @@ gcov-files-virtioserial-y += hw/char/virtio-console.c
 gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio.c
 check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/net/virtio-net.c
-check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF)
-gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio-balloon.c
+check-qtest-virtio-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_BALLOON) += i386-softmmu/hw/virtio/virtio-balloon.c
 check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/block/virtio-blk.c
 check-qtest-virtio-$(CONFIG_VIRTIO_RNG) += tests/virtio-rng-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 15/22] virtio: split 9p bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (13 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 14/22] virtio: split balloon " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 15:37   ` Thomas Huth
  2018-08-15 15:40   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk " Juan Quintela
                   ` (7 subsequent siblings)
  22 siblings, 2 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs   |  1 +
 hw/virtio/virtio-9p-pci.c | 74 +++++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c    | 52 ---------------------------
 3 files changed, 75 insertions(+), 52 deletions(-)
 create mode 100644 hw/virtio/virtio-9p-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 0f0b846a45..bc802db4e8 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -15,6 +15,7 @@ obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
 obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
+obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-9p-pci.c b/hw/virtio/virtio-9p-pci.c
new file mode 100644
index 0000000000..c3ae943a5a
--- /dev/null
+++ b/hw/virtio/virtio-9p-pci.c
@@ -0,0 +1,74 @@
+/*
+ * Virtio 9p PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static void virtio_9p_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    V9fsPCIState *dev = VIRTIO_9P_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static Property virtio_9p_pci_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_9p_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+
+    k->realize = virtio_9p_pci_realize;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_9P;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = 0x2;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = virtio_9p_pci_properties;
+}
+
+static void virtio_9p_pci_instance_init(Object *obj)
+{
+    V9fsPCIState *dev = VIRTIO_9P_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_9P);
+}
+
+static const TypeInfo virtio_9p_pci_info = {
+    .name          = TYPE_VIRTIO_9P_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(V9fsPCIState),
+    .instance_init = virtio_9p_pci_instance_init,
+    .class_init    = virtio_9p_pci_class_init,
+};
+
+static void virtio_9p_pci_register(void)
+{
+    type_register_static(&virtio_9p_pci_info);
+}
+
+type_init(virtio_9p_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index f34817d040..d81821c5a8 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1066,55 +1066,6 @@ static void virtio_pci_vmstate_change(DeviceState *d, bool running)
     }
 }
 
-#ifdef CONFIG_VIRTFS
-static void virtio_9p_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    V9fsPCIState *dev = VIRTIO_9P_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static Property virtio_9p_pci_properties[] = {
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_9p_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-
-    k->realize = virtio_9p_pci_realize;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_9P;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = 0x2;
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_9p_pci_properties;
-}
-
-static void virtio_9p_pci_instance_init(Object *obj)
-{
-    V9fsPCIState *dev = VIRTIO_9P_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_9P);
-}
-
-static const TypeInfo virtio_9p_pci_info = {
-    .name          = TYPE_VIRTIO_9P_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(V9fsPCIState),
-    .instance_init = virtio_9p_pci_instance_init,
-    .class_init    = virtio_9p_pci_class_init,
-};
-#endif /* CONFIG_VIRTFS */
-
 /*
  * virtio-pci: This is the PCIDevice which has a virtio-pci-bus.
  */
@@ -2402,9 +2353,6 @@ static void virtio_pci_register_types(void)
 {
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
-#ifdef CONFIG_VIRTFS
-    type_register_static(&virtio_9p_pci_info);
-#endif
     type_register_static(&virtio_blk_pci_info);
 #if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
     type_register_static(&vhost_user_blk_pci_info);
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (14 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 15/22] virtio: split 9p " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 15:40   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi " Juan Quintela
                   ` (6 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs        |  1 +
 hw/virtio/vhost-user-blk-pci.c | 88 ++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c         | 60 -----------------------
 3 files changed, 89 insertions(+), 60 deletions(-)
 create mode 100644 hw/virtio/vhost-user-blk-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index bc802db4e8..2c95c55bd0 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -11,6 +11,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
 
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
+obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
diff --git a/hw/virtio/vhost-user-blk-pci.c b/hw/virtio/vhost-user-blk-pci.c
new file mode 100644
index 0000000000..a344b533c1
--- /dev/null
+++ b/hw/virtio/vhost-user-blk-pci.c
@@ -0,0 +1,88 @@
+/*
+ * Virtio PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "standard-headers/linux/virtio_pci.h"
+#include "hw/virtio/virtio.h"
+#include "hw/virtio/virtio-blk.h"
+#include "hw/pci/pci.h"
+#include "qapi/error.h"
+#include "qemu/error-report.h"
+#include "virtio-pci.h"
+
+/* vhost-user-blk */
+
+static Property vhost_user_blk_pci_properties[] = {
+    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void vhost_user_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VHostUserBlkPCI *dev = VHOST_USER_BLK_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = dev->vdev.num_queues + 1;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void vhost_user_blk_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = vhost_user_blk_pci_properties;
+    k->realize = vhost_user_blk_pci_realize;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
+}
+
+static void vhost_user_blk_pci_instance_init(Object *obj)
+{
+    VHostUserBlkPCI *dev = VHOST_USER_BLK_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VHOST_USER_BLK);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
+}
+
+static const TypeInfo vhost_user_blk_pci_info = {
+    .name           = TYPE_VHOST_USER_BLK_PCI,
+    .parent         = TYPE_VIRTIO_PCI,
+    .instance_size  = sizeof(VHostUserBlkPCI),
+    .instance_init  = vhost_user_blk_pci_instance_init,
+    .class_init     = vhost_user_blk_pci_class_init,
+};
+
+static void vhost_user_blk_pci_register(void)
+{
+    type_register_static(&vhost_user_blk_pci_info);
+}
+
+type_init(vhost_user_blk_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index d81821c5a8..b4acbebbab 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1941,63 +1941,6 @@ static const TypeInfo virtio_blk_pci_info = {
     .class_init    = virtio_blk_pci_class_init,
 };
 
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
-/* vhost-user-blk */
-
-static Property vhost_user_blk_pci_properties[] = {
-    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                       DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void vhost_user_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VHostUserBlkPCI *dev = VHOST_USER_BLK_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = dev->vdev.num_queues + 1;
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void vhost_user_blk_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = vhost_user_blk_pci_properties;
-    k->realize = vhost_user_blk_pci_realize;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
-}
-
-static void vhost_user_blk_pci_instance_init(Object *obj)
-{
-    VHostUserBlkPCI *dev = VHOST_USER_BLK_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VHOST_USER_BLK);
-    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
-                              "bootindex", &error_abort);
-}
-
-static const TypeInfo vhost_user_blk_pci_info = {
-    .name           = TYPE_VHOST_USER_BLK_PCI,
-    .parent         = TYPE_VIRTIO_PCI,
-    .instance_size  = sizeof(VHostUserBlkPCI),
-    .instance_init  = vhost_user_blk_pci_instance_init,
-    .class_init     = vhost_user_blk_pci_class_init,
-};
-#endif
-
 /* virtio-scsi-pci */
 
 static Property virtio_scsi_pci_properties[] = {
@@ -2354,9 +2297,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
     type_register_static(&virtio_blk_pci_info);
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
-    type_register_static(&vhost_user_blk_pci_info);
-#endif
     type_register_static(&virtio_scsi_pci_info);
     type_register_static(&virtio_serial_pci_info);
     type_register_static(&virtio_net_pci_info);
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (15 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 16:18   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi " Juan Quintela
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs         |  1 +
 hw/virtio/vhost-user-scsi-pci.c | 89 +++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c          | 58 ---------------------
 3 files changed, 90 insertions(+), 58 deletions(-)
 create mode 100644 hw/virtio/vhost-user-scsi-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 2c95c55bd0..a5d2e38d3a 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -12,6 +12,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
+obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
diff --git a/hw/virtio/vhost-user-scsi-pci.c b/hw/virtio/vhost-user-scsi-pci.c
new file mode 100644
index 0000000000..6f3a73c2a8
--- /dev/null
+++ b/hw/virtio/vhost-user-scsi-pci.c
@@ -0,0 +1,89 @@
+/*
+ * Virtio PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "standard-headers/linux/virtio_pci.h"
+#include "hw/virtio/virtio.h"
+#include "hw/virtio/virtio-scsi.h"
+#include "hw/pci/pci.h"
+#include "qapi/error.h"
+#include "qemu/error-report.h"
+#include "hw/pci/msi.h"
+#include "hw/pci/msix.h"
+#include "hw/loader.h"
+#include "sysemu/kvm.h"
+#include "virtio-pci.h"
+
+static Property vhost_user_scsi_pci_properties[] = {
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void vhost_user_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VHostUserSCSIPCI *dev = VHOST_USER_SCSI_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
+
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = vs->conf.num_queues + 3;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void vhost_user_scsi_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->realize = vhost_user_scsi_pci_realize;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = vhost_user_scsi_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
+    pcidev_k->revision = 0x00;
+    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
+}
+
+static void vhost_user_scsi_pci_instance_init(Object *obj)
+{
+    VHostUserSCSIPCI *dev = VHOST_USER_SCSI_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VHOST_USER_SCSI);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
+}
+
+static const TypeInfo vhost_user_scsi_pci_info = {
+    .name          = TYPE_VHOST_USER_SCSI_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VHostUserSCSIPCI),
+    .instance_init = vhost_user_scsi_pci_instance_init,
+    .class_init    = vhost_user_scsi_pci_class_init,
+};
+
+static void vhost_user_scsi_pci_register(void)
+{
+    type_register_static(&vhost_user_scsi_pci_info);
+}
+
+type_init(vhost_user_scsi_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index b4acbebbab..fe3e17288a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2064,61 +2064,6 @@ static const TypeInfo vhost_scsi_pci_info = {
 };
 #endif
 
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
-/* vhost-user-scsi-pci */
-static Property vhost_user_scsi_pci_properties[] = {
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                       DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void vhost_user_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VHostUserSCSIPCI *dev = VHOST_USER_SCSI_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
-
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = vs->conf.num_queues + 3;
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void vhost_user_scsi_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    k->realize = vhost_user_scsi_pci_realize;
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = vhost_user_scsi_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
-    pcidev_k->revision = 0x00;
-    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
-}
-
-static void vhost_user_scsi_pci_instance_init(Object *obj)
-{
-    VHostUserSCSIPCI *dev = VHOST_USER_SCSI_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VHOST_USER_SCSI);
-    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
-                              "bootindex", &error_abort);
-}
-
-static const TypeInfo vhost_user_scsi_pci_info = {
-    .name          = TYPE_VHOST_USER_SCSI_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VHostUserSCSIPCI),
-    .instance_init = vhost_user_scsi_pci_instance_init,
-    .class_init    = vhost_user_scsi_pci_class_init,
-};
-#endif
-
 /* virtio-serial-pci */
 
 static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
@@ -2303,9 +2248,6 @@ static void virtio_pci_register_types(void)
 #ifdef CONFIG_VHOST_SCSI
     type_register_static(&vhost_scsi_pci_info);
 #endif
-#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
-    type_register_static(&vhost_user_scsi_pci_info);
-#endif
 }
 
 type_init(virtio_pci_register_types)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (16 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 16:21   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi " Juan Quintela
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs    |  1 +
 hw/virtio/vhost-scsi-pci.c | 94 ++++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c     | 59 ------------------------
 3 files changed, 95 insertions(+), 59 deletions(-)
 create mode 100644 hw/virtio/vhost-scsi-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index a5d2e38d3a..6e6e001449 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -13,6 +13,7 @@ obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
 obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
 obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
+obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-pci.o
 obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
 obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
diff --git a/hw/virtio/vhost-scsi-pci.c b/hw/virtio/vhost-scsi-pci.c
new file mode 100644
index 0000000000..0ff9f10516
--- /dev/null
+++ b/hw/virtio/vhost-scsi-pci.c
@@ -0,0 +1,94 @@
+/*
+ * Virtio PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "standard-headers/linux/virtio_pci.h"
+#include "hw/virtio/virtio.h"
+#include "hw/virtio/virtio-blk.h"
+#include "hw/virtio/virtio-net.h"
+#include "hw/virtio/virtio-serial.h"
+#include "hw/pci/pci.h"
+#include "qapi/error.h"
+#include "qemu/error-report.h"
+#include "hw/pci/msi.h"
+#include "hw/pci/msix.h"
+#include "hw/loader.h"
+#include "sysemu/kvm.h"
+#include "virtio-pci.h"
+#include "qemu/range.h"
+#include "hw/virtio/virtio-bus.h"
+#include "qapi/visitor.h"
+
+static Property vhost_scsi_pci_properties[] = {
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void vhost_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VHostSCSIPCI *dev = VHOST_SCSI_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
+
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = vs->conf.num_queues + 3;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void vhost_scsi_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->realize = vhost_scsi_pci_realize;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = vhost_scsi_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
+    pcidev_k->revision = 0x00;
+    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
+}
+
+static void vhost_scsi_pci_instance_init(Object *obj)
+{
+    VHostSCSIPCI *dev = VHOST_SCSI_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VHOST_SCSI);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
+}
+
+static const TypeInfo vhost_scsi_pci_info = {
+    .name          = TYPE_VHOST_SCSI_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VHostSCSIPCI),
+    .instance_init = vhost_scsi_pci_instance_init,
+    .class_init    = vhost_scsi_pci_class_init,
+};
+
+static void vhost_scsi_pci_register(void)
+{
+    type_register_static(&vhost_scsi_pci_info);
+}
+
+type_init(vhost_scsi_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index fe3e17288a..6dbcf87371 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2008,62 +2008,6 @@ static const TypeInfo virtio_scsi_pci_info = {
     .class_init    = virtio_scsi_pci_class_init,
 };
 
-/* vhost-scsi-pci */
-
-#ifdef CONFIG_VHOST_SCSI
-static Property vhost_scsi_pci_properties[] = {
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                       DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void vhost_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VHostSCSIPCI *dev = VHOST_SCSI_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
-
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = vs->conf.num_queues + 3;
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void vhost_scsi_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    k->realize = vhost_scsi_pci_realize;
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = vhost_scsi_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
-    pcidev_k->revision = 0x00;
-    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
-}
-
-static void vhost_scsi_pci_instance_init(Object *obj)
-{
-    VHostSCSIPCI *dev = VHOST_SCSI_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VHOST_SCSI);
-    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
-                              "bootindex", &error_abort);
-}
-
-static const TypeInfo vhost_scsi_pci_info = {
-    .name          = TYPE_VHOST_SCSI_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VHostSCSIPCI),
-    .instance_init = vhost_scsi_pci_instance_init,
-    .class_init    = vhost_scsi_pci_class_init,
-};
-#endif
-
 /* virtio-serial-pci */
 
 static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
@@ -2245,9 +2189,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_scsi_pci_info);
     type_register_static(&virtio_serial_pci_info);
     type_register_static(&virtio_net_pci_info);
-#ifdef CONFIG_VHOST_SCSI
-    type_register_static(&vhost_scsi_pci_info);
-#endif
 }
 
 type_init(virtio_pci_register_types)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi bits from virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (17 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-15 16:30   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci Juan Quintela
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Notice that we can't still run tests with it disabled.  Both cdrom-test and
drive_del-test use virtio-scsi without checking if it is enabled.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs     |  1 +
 hw/virtio/virtio-pci.c      | 68 ---------------------------
 hw/virtio/virtio-scsi-pci.c | 93 +++++++++++++++++++++++++++++++++++++
 tests/Makefile.include      |  4 +-
 4 files changed, 96 insertions(+), 70 deletions(-)
 create mode 100644 hw/virtio/virtio-scsi-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 6e6e001449..5d59302f89 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -19,6 +19,7 @@ obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
 obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
 obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
 obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
+obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 6dbcf87371..2777e4b764 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1941,73 +1941,6 @@ static const TypeInfo virtio_blk_pci_info = {
     .class_init    = virtio_blk_pci_class_init,
 };
 
-/* virtio-scsi-pci */
-
-static Property virtio_scsi_pci_properties[] = {
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                       DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIOSCSIPCI *dev = VIRTIO_SCSI_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
-    DeviceState *proxy = DEVICE(vpci_dev);
-    char *bus_name;
-
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = vs->conf.num_queues + 3;
-    }
-
-    /*
-     * For command line compatibility, this sets the virtio-scsi-device bus
-     * name as before.
-     */
-    if (proxy->id) {
-        bus_name = g_strdup_printf("%s.0", proxy->id);
-        virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name);
-        g_free(bus_name);
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void virtio_scsi_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    k->realize = virtio_scsi_pci_realize;
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_scsi_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
-    pcidev_k->revision = 0x00;
-    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
-}
-
-static void virtio_scsi_pci_instance_init(Object *obj)
-{
-    VirtIOSCSIPCI *dev = VIRTIO_SCSI_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_SCSI);
-}
-
-static const TypeInfo virtio_scsi_pci_info = {
-    .name          = TYPE_VIRTIO_SCSI_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIOSCSIPCI),
-    .instance_init = virtio_scsi_pci_instance_init,
-    .class_init    = virtio_scsi_pci_class_init,
-};
-
 /* virtio-serial-pci */
 
 static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
@@ -2186,7 +2119,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
     type_register_static(&virtio_blk_pci_info);
-    type_register_static(&virtio_scsi_pci_info);
     type_register_static(&virtio_serial_pci_info);
     type_register_static(&virtio_net_pci_info);
 }
diff --git a/hw/virtio/virtio-scsi-pci.c b/hw/virtio/virtio-scsi-pci.c
new file mode 100644
index 0000000000..4acceef1d5
--- /dev/null
+++ b/hw/virtio/virtio-scsi-pci.c
@@ -0,0 +1,93 @@
+/*
+ * Virtio scsi PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static Property virtio_scsi_pci_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_scsi_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIOSCSIPCI *dev = VIRTIO_SCSI_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+    VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
+    DeviceState *proxy = DEVICE(vpci_dev);
+    char *bus_name;
+
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = vs->conf.num_queues + 3;
+    }
+
+    /*
+     * For command line compatibility, this sets the virtio-scsi-device bus
+     * name as before.
+     */
+    if (proxy->id) {
+        bus_name = g_strdup_printf("%s.0", proxy->id);
+        virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name);
+        g_free(bus_name);
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void virtio_scsi_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    k->realize = virtio_scsi_pci_realize;
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = virtio_scsi_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_SCSI;
+    pcidev_k->revision = 0x00;
+    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
+}
+
+static void virtio_scsi_pci_instance_init(Object *obj)
+{
+    VirtIOSCSIPCI *dev = VIRTIO_SCSI_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_SCSI);
+}
+
+static const TypeInfo virtio_scsi_pci_info = {
+    .name          = TYPE_VIRTIO_SCSI_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOSCSIPCI),
+    .instance_init = virtio_scsi_pci_instance_init,
+    .class_init    = virtio_scsi_pci_class_init,
+};
+
+
+static void virtio_scsi_pci_register(void)
+{
+    type_register_static(&virtio_scsi_pci_info);
+}
+
+type_init(virtio_scsi_pci_register)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index d0432e4132..32dc111300 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -197,8 +197,8 @@ check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/block/virtio-blk.c
 check-qtest-virtio-$(CONFIG_VIRTIO_RNG) += tests/virtio-rng-test$(EXESUF)
 gcov-files-virtio-$(CONFIG_VIRTIO_RNG) += hw/virtio/virtio-rng.c
-check-qtest-virtio-y += tests/virtio-scsi-test$(EXESUF)
-gcov-files-virtio-y += i386-softmmu/hw/scsi/virtio-scsi.c
+check-qtest-virtio-$(CONFIG_VIRTIO_SCSI) += tests/virtio-scsi-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_SCSI) += i386-softmmu/hw/scsi/virtio-scsi.c
 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
 check-qtest-virtio-y += tests/virtio-9p-test$(EXESUF)
 gcov-files-virtio-y += hw/9pfs/virtio-9p.c
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (18 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-16  7:12   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net " Juan Quintela
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs    |  1 +
 hw/virtio/virtio-blk-pci.c | 82 ++++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c     | 58 ---------------------------
 tests/Makefile.include     |  4 +-
 4 files changed, 85 insertions(+), 60 deletions(-)
 create mode 100644 hw/virtio/virtio-blk-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 5d59302f89..c28b740dca 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -20,6 +20,7 @@ obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
 obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
 obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
 obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
+obj-$(CONFIG_VIRTIO_BLK) += virtio-blk-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-blk-pci.c b/hw/virtio/virtio-blk-pci.c
new file mode 100644
index 0000000000..d0ded0d1c6
--- /dev/null
+++ b/hw/virtio/virtio-blk-pci.c
@@ -0,0 +1,82 @@
+/*
+ * Virtio blk PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+#include "qapi/error.h"
+
+static Property virtio_blk_pci_properties[] = {
+    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+                       DEV_NVECTORS_UNSPECIFIED),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = dev->vdev.conf.num_queues + 1;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void virtio_blk_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
+    dc->props = virtio_blk_pci_properties;
+    k->realize = virtio_blk_pci_realize;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
+}
+
+static void virtio_blk_pci_instance_init(Object *obj)
+{
+    VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_BLK);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
+}
+
+static const TypeInfo virtio_blk_pci_info = {
+    .name          = TYPE_VIRTIO_BLK_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOBlkPCI),
+    .instance_init = virtio_blk_pci_instance_init,
+    .class_init    = virtio_blk_pci_class_init,
+};
+static void virtio_blk_pci_register(void)
+{
+    type_register_static(&virtio_blk_pci_info);
+}
+
+type_init(virtio_blk_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 2777e4b764..e1c6088019 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1884,63 +1884,6 @@ static const TypeInfo virtio_pci_info = {
     },
 };
 
-/* virtio-blk-pci */
-
-static Property virtio_blk_pci_properties[] = {
-    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
-                       DEV_NVECTORS_UNSPECIFIED),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_blk_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = dev->vdev.conf.num_queues + 1;
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void virtio_blk_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-
-    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
-    dc->props = virtio_blk_pci_properties;
-    k->realize = virtio_blk_pci_realize;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
-}
-
-static void virtio_blk_pci_instance_init(Object *obj)
-{
-    VirtIOBlkPCI *dev = VIRTIO_BLK_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_BLK);
-    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
-                              "bootindex", &error_abort);
-}
-
-static const TypeInfo virtio_blk_pci_info = {
-    .name          = TYPE_VIRTIO_BLK_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIOBlkPCI),
-    .instance_init = virtio_blk_pci_instance_init,
-    .class_init    = virtio_blk_pci_class_init,
-};
-
 /* virtio-serial-pci */
 
 static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
@@ -2118,7 +2061,6 @@ static void virtio_pci_register_types(void)
 {
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
-    type_register_static(&virtio_blk_pci_info);
     type_register_static(&virtio_serial_pci_info);
     type_register_static(&virtio_net_pci_info);
 }
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 32dc111300..296e04f704 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -193,8 +193,8 @@ check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
 gcov-files-virtio-y += i386-softmmu/hw/net/virtio-net.c
 check-qtest-virtio-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)
 gcov-files-virtio-$(CONFIG_VIRTIO_BALLOON) += i386-softmmu/hw/virtio/virtio-balloon.c
-check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
-gcov-files-virtio-y += i386-softmmu/hw/block/virtio-blk.c
+check-qtest-virtio-$(CONFIG_VIRTIO_BLK) += tests/virtio-blk-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_BLK) += i386-softmmu/hw/block/virtio-blk.c
 check-qtest-virtio-$(CONFIG_VIRTIO_RNG) += tests/virtio-rng-test$(EXESUF)
 gcov-files-virtio-$(CONFIG_VIRTIO_RNG) += hw/virtio/virtio-rng.c
 check-qtest-virtio-$(CONFIG_VIRTIO_SCSI) += tests/virtio-scsi-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net bits rom virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (19 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-16  7:14   ` Thomas Huth
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial " Juan Quintela
  2018-08-10 10:22 ` [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Paolo Bonzini
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs    |  1 +
 hw/virtio/virtio-net-pci.c | 81 ++++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c     | 56 --------------------------
 tests/Makefile.include     |  4 +-
 4 files changed, 84 insertions(+), 58 deletions(-)
 create mode 100644 hw/virtio/virtio-net-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index c28b740dca..0810553ab8 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -21,6 +21,7 @@ obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
 obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
 obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
 obj-$(CONFIG_VIRTIO_BLK) += virtio-blk-pci.o
+obj-$(CONFIG_VIRTIO_NET) += virtio-net-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
new file mode 100644
index 0000000000..cf8cf7535c
--- /dev/null
+++ b/hw/virtio/virtio-net-pci.c
@@ -0,0 +1,81 @@
+/*
+ * Virtio net PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+#include "qapi/error.h"
+
+static Property virtio_net_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_net_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    DeviceState *qdev = DEVICE(vpci_dev);
+    VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    virtio_net_set_netclient_name(&dev->vdev, qdev->id,
+                                  object_get_typename(OBJECT(qdev)));
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+    VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
+
+    k->romfile = "efi-virtio.rom";
+    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
+    k->revision = VIRTIO_PCI_ABI_VERSION;
+    k->class_id = PCI_CLASS_NETWORK_ETHERNET;
+    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
+    dc->props = virtio_net_properties;
+    vpciklass->realize = virtio_net_pci_realize;
+}
+
+static void virtio_net_pci_instance_init(Object *obj)
+{
+    VirtIONetPCI *dev = VIRTIO_NET_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_NET);
+    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
+                              "bootindex", &error_abort);
+}
+
+static const TypeInfo virtio_net_pci_info = {
+    .name          = TYPE_VIRTIO_NET_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIONetPCI),
+    .instance_init = virtio_net_pci_instance_init,
+    .class_init    = virtio_net_pci_class_init,
+};
+
+static void virtio_net_pci_register(void)
+{
+    type_register_static(&virtio_net_pci_info);
+}
+
+type_init(virtio_net_pci_register)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index e1c6088019..589e565746 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1957,61 +1957,6 @@ static const TypeInfo virtio_serial_pci_info = {
     .class_init    = virtio_serial_pci_class_init,
 };
 
-/* virtio-net-pci */
-
-static Property virtio_net_properties[] = {
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_net_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    DeviceState *qdev = DEVICE(vpci_dev);
-    VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-
-    virtio_net_set_netclient_name(&dev->vdev, qdev->id,
-                                  object_get_typename(OBJECT(qdev)));
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-    VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
-
-    k->romfile = "efi-virtio.rom";
-    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
-    k->revision = VIRTIO_PCI_ABI_VERSION;
-    k->class_id = PCI_CLASS_NETWORK_ETHERNET;
-    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
-    dc->props = virtio_net_properties;
-    vpciklass->realize = virtio_net_pci_realize;
-}
-
-static void virtio_net_pci_instance_init(Object *obj)
-{
-    VirtIONetPCI *dev = VIRTIO_NET_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_NET);
-    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
-                              "bootindex", &error_abort);
-}
-
-static const TypeInfo virtio_net_pci_info = {
-    .name          = TYPE_VIRTIO_NET_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIONetPCI),
-    .instance_init = virtio_net_pci_instance_init,
-    .class_init    = virtio_net_pci_class_init,
-};
-
 /* virtio-pci-bus */
 
 static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
@@ -2062,7 +2007,6 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
     type_register_static(&virtio_serial_pci_info);
-    type_register_static(&virtio_net_pci_info);
 }
 
 type_init(virtio_pci_register_types)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 296e04f704..a1352ccefb 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -189,8 +189,8 @@ check-qtest-virtioserial-y += tests/virtio-console-test$(EXESUF)
 gcov-files-virtioserial-y += hw/char/virtio-console.c
 
 gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio.c
-check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
-gcov-files-virtio-y += i386-softmmu/hw/net/virtio-net.c
+check-qtest-virtio-$(CONFIG_VIRTIO_NET) += tests/virtio-net-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_NET) += i386-softmmu/hw/net/virtio-net.c
 check-qtest-virtio-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)
 gcov-files-virtio-$(CONFIG_VIRTIO_BALLOON) += i386-softmmu/hw/virtio/virtio-balloon.c
 check-qtest-virtio-$(CONFIG_VIRTIO_BLK) += tests/virtio-blk-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial bits rom virtio-pci
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (20 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net " Juan Quintela
@ 2018-08-08 11:48 ` Juan Quintela
  2018-08-16  7:24   ` Thomas Huth
  2018-08-10 10:22 ` [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Paolo Bonzini
  22 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 11:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/Makefile.objs       |  1 +
 hw/virtio/virtio-pci.c        | 74 --------------------------
 hw/virtio/virtio-serial-pci.c | 97 +++++++++++++++++++++++++++++++++++
 tests/Makefile.include        | 12 ++---
 4 files changed, 104 insertions(+), 80 deletions(-)
 create mode 100644 hw/virtio/virtio-serial-pci.c

diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 0810553ab8..3d88b60d27 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -22,6 +22,7 @@ obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
 obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
 obj-$(CONFIG_VIRTIO_BLK) += virtio-blk-pci.o
 obj-$(CONFIG_VIRTIO_NET) += virtio-net-pci.o
+obj-$(CONFIG_VIRTIO_SERIAL) += virtio-serial-pci.o
 endif
 
 common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 589e565746..da5161a9a1 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1884,79 +1884,6 @@ static const TypeInfo virtio_pci_info = {
     },
 };
 
-/* virtio-serial-pci */
-
-static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
-{
-    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(vpci_dev);
-    DeviceState *vdev = DEVICE(&dev->vdev);
-    DeviceState *proxy = DEVICE(vpci_dev);
-    char *bus_name;
-
-    if (vpci_dev->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
-        vpci_dev->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
-        vpci_dev->class_code != PCI_CLASS_OTHERS) {        /* qemu-kvm  */
-            vpci_dev->class_code = PCI_CLASS_COMMUNICATION_OTHER;
-    }
-
-    /* backwards-compatibility with machines that were created with
-       DEV_NVECTORS_UNSPECIFIED */
-    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
-        vpci_dev->nvectors = dev->vdev.serial.max_virtserial_ports + 1;
-    }
-
-    /*
-     * For command line compatibility, this sets the virtio-serial-device bus
-     * name as before.
-     */
-    if (proxy->id) {
-        bus_name = g_strdup_printf("%s.0", proxy->id);
-        virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name);
-        g_free(bus_name);
-    }
-
-    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
-    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
-}
-
-static Property virtio_serial_pci_properties[] = {
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
-                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
-    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_serial_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
-    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
-    k->realize = virtio_serial_pci_realize;
-    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
-    dc->props = virtio_serial_pci_properties;
-    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
-    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
-    pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
-}
-
-static void virtio_serial_pci_instance_init(Object *obj)
-{
-    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(obj);
-
-    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
-                                TYPE_VIRTIO_SERIAL);
-}
-
-static const TypeInfo virtio_serial_pci_info = {
-    .name          = TYPE_VIRTIO_SERIAL_PCI,
-    .parent        = TYPE_VIRTIO_PCI,
-    .instance_size = sizeof(VirtIOSerialPCI),
-    .instance_init = virtio_serial_pci_instance_init,
-    .class_init    = virtio_serial_pci_class_init,
-};
-
 /* virtio-pci-bus */
 
 static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
@@ -2006,7 +1933,6 @@ static void virtio_pci_register_types(void)
 {
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
-    type_register_static(&virtio_serial_pci_info);
 }
 
 type_init(virtio_pci_register_types)
diff --git a/hw/virtio/virtio-serial-pci.c b/hw/virtio/virtio-serial-pci.c
new file mode 100644
index 0000000000..453c6690fb
--- /dev/null
+++ b/hw/virtio/virtio-serial-pci.c
@@ -0,0 +1,97 @@
+/*
+ * Virtio serial PCI Bindings
+ *
+ * Copyright IBM, Corp. 2007
+ * Copyright (c) 2009 CodeSourcery
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *  Paul Brook        <paul@codesourcery.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+
+#include "qemu/osdep.h"
+
+#include "virtio-pci.h"
+
+static void virtio_serial_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
+{
+    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+    DeviceState *proxy = DEVICE(vpci_dev);
+    char *bus_name;
+
+    if (vpci_dev->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
+        vpci_dev->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
+        vpci_dev->class_code != PCI_CLASS_OTHERS) {        /* qemu-kvm  */
+            vpci_dev->class_code = PCI_CLASS_COMMUNICATION_OTHER;
+    }
+
+    /* backwards-compatibility with machines that were created with
+       DEV_NVECTORS_UNSPECIFIED */
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = dev->vdev.serial.max_virtserial_ports + 1;
+    }
+
+    /*
+     * For command line compatibility, this sets the virtio-serial-device bus
+     * name as before.
+     */
+    if (proxy->id) {
+        bus_name = g_strdup_printf("%s.0", proxy->id);
+        virtio_device_set_child_bus_name(VIRTIO_DEVICE(vdev), bus_name);
+        g_free(bus_name);
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
+}
+
+static Property virtio_serial_pci_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
+    DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_serial_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->realize = virtio_serial_pci_realize;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
+    dc->props = virtio_serial_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
+}
+
+static void virtio_serial_pci_instance_init(Object *obj)
+{
+    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(obj);
+
+    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
+                                TYPE_VIRTIO_SERIAL);
+}
+
+static const TypeInfo virtio_serial_pci_info = {
+    .name          = TYPE_VIRTIO_SERIAL_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOSerialPCI),
+    .instance_init = virtio_serial_pci_instance_init,
+    .class_init    = virtio_serial_pci_class_init,
+};
+static void virtio_serial_pci_register(void)
+{
+    type_register_static(&virtio_serial_pci_info);
+}
+
+type_init(virtio_serial_pci_register)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index a1352ccefb..8666206ea4 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -143,7 +143,7 @@ check-unit-y += tests/test-crypto-secret$(EXESUF)
 check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
 check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
 ifneq (,$(findstring qemu-ga,$(TOOLS)))
-check-unit-$(CONFIG_LINUX) += tests/test-qga$(EXESUF)
+check-unit-$(land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)
 endif
 check-unit-y += tests/test-timed-average$(EXESUF)
 check-unit-y += tests/test-util-sockets$(EXESUF)
@@ -185,8 +185,8 @@ gcov-files-ipack-y += hw/ipack/ipack.c
 check-qtest-ipack-y += tests/ipoctal232-test$(EXESUF)
 gcov-files-ipack-y += hw/char/ipoctal232.c
 
-check-qtest-virtioserial-y += tests/virtio-console-test$(EXESUF)
-gcov-files-virtioserial-y += hw/char/virtio-console.c
+check-qtest-virtioserial-$(CONFIG_VIRTIO_SERIAL) += tests/virtio-console-test$(EXESUF)
+gcov-files-virtioserial-$(CONFIG_VIRTIO_SERIAL) += hw/char/virtio-console.c
 
 gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio.c
 check-qtest-virtio-$(CONFIG_VIRTIO_NET) += tests/virtio-net-test$(EXESUF)
@@ -204,8 +204,8 @@ check-qtest-virtio-y += tests/virtio-9p-test$(EXESUF)
 gcov-files-virtio-y += hw/9pfs/virtio-9p.c
 gcov-files-virtio-y += i386-softmmu/hw/9pfs/virtio-9p-device.c
 endif
-check-qtest-virtio-y += tests/virtio-serial-test$(EXESUF)
-gcov-files-virtio-y += i386-softmmu/hw/char/virtio-serial-bus.c
+check-qtest-virtio-$(CONFIG_VIRTIO_SERIAL) += tests/virtio-serial-test$(EXESUF)
+gcov-files-virtio-$(CONFIG_VIRTIO_SERIAL) += i386-softmmu/hw/char/virtio-serial-bus.c
 check-qtest-virtio-y += $(check-qtest-virtioserial-y)
 gcov-files-virtio-y += $(gcov-files-virtioserial-y)
 
@@ -402,7 +402,7 @@ check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-redirector$(EXESUF)
 check-qtest-s390x-y += tests/drive_del-test$(EXESUF)
 check-qtest-s390x-y += tests/virtio-balloon-test$(EXESUF)
 check-qtest-s390x-y += tests/virtio-console-test$(EXESUF)
-check-qtest-s390x-y += tests/virtio-serial-test$(EXESUF)
+check-qtest-s390x-$(CONFIG_VIRTIO_SERIAL) += tests/virtio-serial-test$(EXESUF)
 check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF)
 
 check-qtest-generic-y += tests/machine-none-test$(EXESUF)
-- 
2.17.1

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak Juan Quintela
@ 2018-08-08 12:00   ` Thomas Huth
  2018-08-10 10:19   ` Paolo Bonzini
  1 sibling, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:00 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  default-configs/alpha-softmmu.mak       | 2 --
>  default-configs/arm-softmmu.mak         | 2 --
>  default-configs/hppa-softmmu.mak        | 3 ---
>  default-configs/i386-softmmu.mak        | 2 --
>  default-configs/mips-softmmu-common.mak | 2 --
>  default-configs/ppc-softmmu.mak         | 1 -
>  default-configs/ppcemb-softmmu.mak      | 2 --
>  default-configs/sh4-softmmu.mak         | 2 --
>  default-configs/sh4eb-softmmu.mak       | 2 --
>  default-configs/sparc64-softmmu.mak     | 2 --
>  default-configs/x86_64-softmmu.mak      | 2 --
>  11 files changed, 22 deletions(-)
> 
> diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
> index bbe361f01a..2d81a98441 100644
> --- a/default-configs/alpha-softmmu.mak
> +++ b/default-configs/alpha-softmmu.mak
> @@ -2,8 +2,6 @@
>  
>  include pci.mak
>  include usb.mak
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_I82374=y
>  CONFIG_I8254=y
>  CONFIG_I8257=y
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 834d45cfaf..4d33e9983d 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -5,8 +5,6 @@ include usb.mak
>  CONFIG_VGA=y
>  CONFIG_NAND=y
>  CONFIG_ECC=y
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_PTIMER=y
>  CONFIG_SD=y
>  CONFIG_MAX7310=y
> diff --git a/default-configs/hppa-softmmu.mak b/default-configs/hppa-softmmu.mak
> index 4badc0521e..f3712afc27 100644
> --- a/default-configs/hppa-softmmu.mak
> +++ b/default-configs/hppa-softmmu.mak
> @@ -1,8 +1,5 @@
>  include pci.mak
>  include usb.mak
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
> -CONFIG_ISA_BUS=y

You should maybe mention CONFIG_ISA_BUS in the patch description, too.

Apart from that nit:

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in Juan Quintela
@ 2018-08-08 12:03   ` Thomas Huth
  2018-08-10 10:20   ` Paolo Bonzini
  1 sibling, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:03 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Once there, untangle endianness-test and boot-serial-test.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> 
> --
> 
> boot-serial-test don't depend on isa-testdev.  Thanks Thomas.

So remove it from the patch description, too?

> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 2016c353e3..4e5f47aac0 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -248,7 +248,7 @@ gcov-files-pci-y += hw/misc/ivshmem.c
>  check-qtest-pci-y += tests/megasas-test$(EXESUF)
>  gcov-files-pci-y += hw/scsi/megasas.c
>  
> -check-qtest-i386-y = tests/endianness-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  check-qtest-i386-y += tests/fdc-test$(EXESUF)
>  gcov-files-i386-y = hw/block/fdc.c
>  check-qtest-i386-y += tests/ide-test$(EXESUF)
> @@ -321,15 +321,15 @@ check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
>  
>  check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)
>  
> -check-qtest-mips-y = tests/endianness-test$(EXESUF)
> -
> -check-qtest-mips64-y = tests/endianness-test$(EXESUF)
> -
> -check-qtest-mips64el-y = tests/endianness-test$(EXESUF)
> -
>  check-qtest-moxie-y = tests/boot-serial-test$(EXESUF)
>  
> -check-qtest-ppc-y = tests/endianness-test$(EXESUF)
> +check-qtest-mips-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
> +
> +check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
> +
> +check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)

I think it would be good to try to keep the alphabetical order of the
entries, i.e. keep mips before moxie?

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec " Juan Quintela
@ 2018-08-08 12:06   ` Thomas Huth
  2018-08-08 17:02     ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:06 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 4e5f47aac0..1105469daa 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -290,8 +290,9 @@ endif
>  gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
>  gcov-files-i386-y += hw/usb/dev-hid.c
>  gcov-files-i386-y += hw/usb/dev-storage.c
> -check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
> -gcov-files-i386-y += hw/usb/hcd-xhci.c
> +check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c

Maybe use CONFIG_USB_XHCI_NEC for the hcd-xhci-nec.c entry instead?

>  check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
>  check-qtest-i386-y += tests/q35-test$(EXESUF)
>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
> @@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) += tests/usb-hcd-ohci-test$(EXESUF)
>  gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
>  check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
>  gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
> -check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
> -gcov-files-ppc64-y += hw/usb/hcd-xhci.c
> +check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> +gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c

Also add hcd-xhci-nec.c gcov entry here?

>  check-qtest-ppc64-y += $(check-qtest-virtio-y)
>  check-qtest-ppc64-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
>  check-qtest-ppc64-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu Juan Quintela
@ 2018-08-08 12:10   ` Thomas Huth
  2018-08-08 16:59     ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:10 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Paolo Bonzini

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> If we ever changed that, just make the things that are different
> explicit.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  default-configs/i386-softmmu.mak | 65 +-------------------------------
>  1 file changed, 1 insertion(+), 64 deletions(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 8827166ba1..6ec7a3b0ae 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -1,66 +1,3 @@
>  # Default configuration for i386-softmmu
>  
> -include pci.mak
> -include sound.mak
> -include usb.mak
> -CONFIG_QXL=$(CONFIG_SPICE)
> -CONFIG_VGA_ISA=y
> -CONFIG_VGA_CIRRUS=y
> -CONFIG_VMWARE_VGA=y
> -CONFIG_VMXNET3_PCI=y
> -CONFIG_VIRTIO_VGA=y
> -CONFIG_VMMOUSE=y
> -CONFIG_IPMI=y
> -CONFIG_IPMI_LOCAL=y
> -CONFIG_IPMI_EXTERN=y
> -CONFIG_ISA_IPMI_KCS=y
> -CONFIG_ISA_IPMI_BT=y
> -CONFIG_PARALLEL=y
> -CONFIG_I8254=y
> -CONFIG_PCSPK=y
> -CONFIG_PCKBD=y
> -CONFIG_FDC=y
> -CONFIG_ACPI=y
> -CONFIG_ACPI_X86=y
> -CONFIG_ACPI_X86_ICH=y
> -CONFIG_ACPI_MEMORY_HOTPLUG=y
> -CONFIG_ACPI_CPU_HOTPLUG=y
> -CONFIG_APM=y
> -CONFIG_I8257=y
> -CONFIG_IDE_ISA=y
> -CONFIG_IDE_PIIX=y
> -CONFIG_NE2000_ISA=y
> -CONFIG_HPET=y
> -CONFIG_APPLESMC=y
> -CONFIG_I8259=y
> -CONFIG_PFLASH_CFI01=y
> -CONFIG_TPM_TIS=$(CONFIG_TPM)
> -CONFIG_TPM_CRB=$(CONFIG_TPM)
> -CONFIG_MC146818RTC=y
> -CONFIG_PCI_PIIX=y
> -CONFIG_WDT_IB700=y
> -CONFIG_ISA_DEBUG=y
> -CONFIG_ISA_TESTDEV=y
> -CONFIG_VMPORT=y
> -CONFIG_SGA=y
> -CONFIG_LPC_ICH9=y
> -CONFIG_PCI_Q35=y
> -CONFIG_APIC=y
> -CONFIG_IOAPIC=y
> -CONFIG_PVPANIC=y
> -CONFIG_MEM_HOTPLUG=y
> -CONFIG_NVDIMM=y
> -CONFIG_ACPI_NVDIMM=y
> -CONFIG_PCIE_PORT=y
> -CONFIG_XIO3130=y
> -CONFIG_IOH3420=y
> -CONFIG_I82801B11=y
> -CONFIG_SMBIOS=y
> -CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
> -CONFIG_PXB=y
> -CONFIG_ACPI_VMGENID=y
> -CONFIG_FW_CFG_DMA=y
> -CONFIG_I2C=y
> -CONFIG_SEV=$(CONFIG_KVM)
> -CONFIG_VTD=y
> -CONFIG_AMD_IOMMU=y
> +include x86_64-softmmu.mak

That's theoretically a good idea, but I think I'd rather do it the other
way round: include i386-softmmu.mak in the x86_64 config file.
Rationale: x86_64 is supposed to be a superset of i386, not the other
way round, so when we will ever get a CONFIG_SWITCH_FOR_X86_64_ONLY,
it's easier to handle if the includes are done the other way round.

And that's also how we do it in aarch64-softmmu.mak an ppc64-softmmu.mak.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are compiled in
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are " Juan Quintela
@ 2018-08-08 12:11   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:11 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Stefan Berger

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index eae89b0fc0..47a5b66cde 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -299,10 +299,10 @@ check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
>  gcov-files-i386-y += hw/pci-host/q35.c
>  check-qtest-i386-$(CONFIG_VHOST_USER_NET_TEST_i386) += tests/vhost-user-test$(EXESUF)
>  check-qtest-x86_64-$(call lor, $(CONFIG_VHOST_USER_NET_TEST_i386), $(CONFIG_VHOST_USER_NET_TEST_x86_64)) += tests/vhost-user-test$(EXESUF)
> -check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-swtpm-test$(EXESUF)
> -check-qtest-i386-$(CONFIG_TPM) += tests/tpm-crb-test$(EXESUF)
> -check-qtest-i386-$(CONFIG_TPM) += tests/tpm-tis-swtpm-test$(EXESUF)
> -check-qtest-i386-$(CONFIG_TPM) += tests/tpm-tis-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-swtpm-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_TPM_CRB) += tests/tpm-crb-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_TPM_TIS) += tests/tpm-tis-swtpm-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_TPM_TIS) += tests/tpm-tis-test$(EXESUF)
>  check-qtest-i386-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
>  check-qtest-i386-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
>  check-qtest-i386-$(CONFIG_RTL8139_PCI) += tests/test-filter-redirector$(EXESUF)

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci Juan Quintela
@ 2018-08-08 12:18   ` Thomas Huth
  2018-08-09 19:10     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 12:18 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Stefan Hajnoczi

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs     |  2 +-
>  hw/virtio/vhost-vsock-pci.c | 71 +++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c      | 51 --------------------------
>  3 files changed, 72 insertions(+), 52 deletions(-)
>  create mode 100644 hw/virtio/vhost-vsock-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 1b2799cfd8..4fbf7de84b 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -10,7 +10,7 @@ obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-crypto.o
>  obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
>  
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
> -obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
> +obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>  endif
>  
>  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c
> new file mode 100644
> index 0000000000..5805667dc0
> --- /dev/null
> +++ b/hw/virtio/vhost-vsock-pci.c
> @@ -0,0 +1,71 @@
> +/*
> + * Virtio vsock PCI vhost Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>

The vhost-vsock code has been added by Stefan in 2016, so these
Copyright and Author informations looks somehow weird in this new file
now. Not sure how to deal best with this situation, ... I'd maybe simply
drop the above lines in the new file?

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes Juan Quintela
@ 2018-08-08 13:11   ` Thomas Huth
  2018-08-09 19:03   ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-08 13:11 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> They are all already included in virtio_pci.h.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/virtio-pci.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 3a01fe90f0..cb2ddd3f41 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -18,24 +18,11 @@
>  #include "qemu/osdep.h"
>  
>  #include "standard-headers/linux/virtio_pci.h"
> -#include "hw/virtio/virtio.h"
> -#include "hw/virtio/virtio-blk.h"
> -#include "hw/virtio/virtio-net.h"
> -#include "hw/virtio/virtio-serial.h"
> -#include "hw/virtio/virtio-scsi.h"
> -#include "hw/virtio/virtio-balloon.h"
> -#include "hw/virtio/virtio-input.h"
> -#include "hw/pci/pci.h"
> +#include "virtio-pci.h"
>  #include "qapi/error.h"
> -#include "qemu/error-report.h"
> -#include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
> -#include "hw/loader.h"
>  #include "sysemu/kvm.h"
> -#include "virtio-pci.h"
>  #include "qemu/range.h"
> -#include "hw/virtio/virtio-bus.h"
> -#include "qapi/visitor.h"
>  
>  #define VIRTIO_PCI_REGION_SIZE(dev)     VIRTIO_PCI_CONFIG_OFF(msix_present(dev))

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu
  2018-08-08 12:10   ` Thomas Huth
@ 2018-08-08 16:59     ` Juan Quintela
  0 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 16:59 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, lvivier, dgilbert, peterx, Paolo Bonzini

Thomas Huth <thuth@redhat.com> wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
>> If we ever changed that, just make the things that are different
>> explicit.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  default-configs/i386-softmmu.mak | 65 +-------------------------------
>>  1 file changed, 1 insertion(+), 64 deletions(-)
>> 
>> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
>> index 8827166ba1..6ec7a3b0ae 100644
>> --- a/default-configs/i386-softmmu.mak
>> +++ b/default-configs/i386-softmmu.mak
>> @@ -1,66 +1,3 @@
>>  # Default configuration for i386-softmmu
>>  
>> -include pci.mak
>> -include sound.mak
>> -include usb.mak
>> -CONFIG_QXL=$(CONFIG_SPICE)
>> -CONFIG_VGA_ISA=y
>> -CONFIG_VGA_CIRRUS=y
>> -CONFIG_VMWARE_VGA=y
>> -CONFIG_VMXNET3_PCI=y
>> -CONFIG_VIRTIO_VGA=y
>> -CONFIG_VMMOUSE=y
>> -CONFIG_IPMI=y
>> -CONFIG_IPMI_LOCAL=y
>> -CONFIG_IPMI_EXTERN=y
>> -CONFIG_ISA_IPMI_KCS=y
>> -CONFIG_ISA_IPMI_BT=y
>> -CONFIG_PARALLEL=y
>> -CONFIG_I8254=y
>> -CONFIG_PCSPK=y
>> -CONFIG_PCKBD=y
>> -CONFIG_FDC=y
>> -CONFIG_ACPI=y
>> -CONFIG_ACPI_X86=y
>> -CONFIG_ACPI_X86_ICH=y
>> -CONFIG_ACPI_MEMORY_HOTPLUG=y
>> -CONFIG_ACPI_CPU_HOTPLUG=y
>> -CONFIG_APM=y
>> -CONFIG_I8257=y
>> -CONFIG_IDE_ISA=y
>> -CONFIG_IDE_PIIX=y
>> -CONFIG_NE2000_ISA=y
>> -CONFIG_HPET=y
>> -CONFIG_APPLESMC=y
>> -CONFIG_I8259=y
>> -CONFIG_PFLASH_CFI01=y
>> -CONFIG_TPM_TIS=$(CONFIG_TPM)
>> -CONFIG_TPM_CRB=$(CONFIG_TPM)
>> -CONFIG_MC146818RTC=y
>> -CONFIG_PCI_PIIX=y
>> -CONFIG_WDT_IB700=y
>> -CONFIG_ISA_DEBUG=y
>> -CONFIG_ISA_TESTDEV=y
>> -CONFIG_VMPORT=y
>> -CONFIG_SGA=y
>> -CONFIG_LPC_ICH9=y
>> -CONFIG_PCI_Q35=y
>> -CONFIG_APIC=y
>> -CONFIG_IOAPIC=y
>> -CONFIG_PVPANIC=y
>> -CONFIG_MEM_HOTPLUG=y
>> -CONFIG_NVDIMM=y
>> -CONFIG_ACPI_NVDIMM=y
>> -CONFIG_PCIE_PORT=y
>> -CONFIG_XIO3130=y
>> -CONFIG_IOH3420=y
>> -CONFIG_I82801B11=y
>> -CONFIG_SMBIOS=y
>> -CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
>> -CONFIG_PXB=y
>> -CONFIG_ACPI_VMGENID=y
>> -CONFIG_FW_CFG_DMA=y
>> -CONFIG_I2C=y
>> -CONFIG_SEV=$(CONFIG_KVM)
>> -CONFIG_VTD=y
>> -CONFIG_AMD_IOMMU=y
>> +include x86_64-softmmu.mak
>
> That's theoretically a good idea, but I think I'd rather do it the other
> way round: include i386-softmmu.mak in the x86_64 config file.
> Rationale: x86_64 is supposed to be a superset of i386, not the other
> way round, so when we will ever get a CONFIG_SWITCH_FOR_X86_64_ONLY,
> it's easier to handle if the includes are done the other way round.

[1]

> And that's also how we do it in aarch64-softmmu.mak an ppc64-softmmu.mak.

This is a good point.

But for (1), I really think that we should make i386 only for old stuff,
and remove things like ISA devices from x86_64 (ok, I know that there is
some ISA on all chipsets, but ne2000-isa is not one of them).

Anyways, I don't really care enough, so I will change that.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
  2018-08-08 12:06   ` Thomas Huth
@ 2018-08-08 17:02     ` Juan Quintela
  2018-08-09  5:28       ` Thomas Huth
  0 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-08 17:02 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, lvivier, dgilbert, peterx

Thomas Huth <thuth@redhat.com> wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  tests/Makefile.include | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>> 
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index 4e5f47aac0..1105469daa 100644
>> --- a/tests/Makefile.include
>> +++ b/tests/Makefile.include
>> @@ -290,8 +290,9 @@ endif
>>  gcov-files-i386-$(CONFIG_USB_EHCI) += hw/usb/hcd-ehci.c
>>  gcov-files-i386-y += hw/usb/dev-hid.c
>>  gcov-files-i386-y += hw/usb/dev-storage.c
>> -check-qtest-i386-y += tests/usb-hcd-xhci-test$(EXESUF)
>> -gcov-files-i386-y += hw/usb/hcd-xhci.c
>> +check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
>> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
>> +gcov-files-i386-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci-nec.c
>
> Maybe use CONFIG_USB_XHCI_NEC for the hcd-xhci-nec.c entry instead?

Not sure, this split looks artifitial. My read of this:


commit 0bbb2f3df1ffd9ccf7135a69a450c6929bc0b915
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Wed May 17 12:33:12 2017 +0200

    xhci: split into multiple files
    

Is that it got split so we could add more controllers that never
happened.  I am not sure what we need to do.

>>  check-qtest-i386-y += tests/cpu-plug-test$(EXESUF)
>>  check-qtest-i386-y += tests/q35-test$(EXESUF)
>>  check-qtest-i386-y += tests/vmgenid-test$(EXESUF)
>> @@ -349,8 +350,8 @@ check-qtest-ppc64-$(CONFIG_USB_OHCI) +=
>> tests/usb-hcd-ohci-test$(EXESUF)
>>  gcov-files-ppc64-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
>>  check-qtest-ppc64-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
>>  gcov-files-ppc64-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
>> -check-qtest-ppc64-y += tests/usb-hcd-xhci-test$(EXESUF)
>> -gcov-files-ppc64-y += hw/usb/hcd-xhci.c
>> +check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
>> +gcov-files-ppc64-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
>
> Also add hcd-xhci-nec.c gcov entry here?

I didn't want to go "further", but I think that we should have here is
something like:


check-qtest-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
gcov-files-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c

and remove the arch specific bits.  If one arch don't support it, we
know have CONFIG_USB_XHCI bits to not _enable_ it there.

What do you think?

Thanks, Juan.

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

* Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in
  2018-08-08 17:02     ` Juan Quintela
@ 2018-08-09  5:28       ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-09  5:28 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On 08/08/2018 07:02 PM, Juan Quintela wrote:
> Thomas Huth <thuth@redhat.com> wrote:
[...]
> I didn't want to go "further", but I think that we should have here is
> something like:
> 
> check-qtest-$(CONFIG_USB_XHCI_NEC) += tests/usb-hcd-xhci-test$(EXESUF)
> gcov-files-$(CONFIG_USB_XHCI) += hw/usb/hcd-xhci.c
> 
> and remove the arch specific bits.  If one arch don't support it, we
> know have CONFIG_USB_XHCI bits to not _enable_ it there.
> 
> What do you think?
> 
> Thanks, Juan.

If "make check" passes with that change, that sounds like the right
solution to me, too.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 11/22] virtio: split host bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 11/22] virtio: split host " Juan Quintela
@ 2018-08-09  6:10   ` Thomas Huth
  2018-08-24 13:00     ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Thomas Huth @ 2018-08-09  6:10 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  default-configs/virtio.mak        |  3 +++
>  hw/virtio/Makefile.objs           |  1 +
>  hw/virtio/virtio-input-host-pci.c | 42 +++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c            | 20 ---------------
>  4 files changed, 46 insertions(+), 20 deletions(-)
>  create mode 100644 hw/virtio/virtio-input-host-pci.c
> 
> diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
> index 1304849018..6309dbf938 100644
> --- a/default-configs/virtio.mak
> +++ b/default-configs/virtio.mak
> @@ -12,3 +12,6 @@ CONFIG_VIRTIO_RNG=y
>  CONFIG_SCSI=y
>  CONFIG_VIRTIO_SCSI=y
>  CONFIG_VIRTIO_SERIAL=y
> +CONFIG_VIRTIO_VSOCK=y
> +CONFIG_VIRTIO_INPUT_HOST=$(CONFIG_LINUX)

What's the VIRTIO_VSOCK good for? You don't seem to use it in this patch?

 Thomas


> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 4fbf7de84b..685ae1d866 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -11,6 +11,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
>  
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
> +obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
>  endif
>  
>  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> diff --git a/hw/virtio/virtio-input-host-pci.c b/hw/virtio/virtio-input-host-pci.c
> new file mode 100644
> index 0000000000..3159693dd9
> --- /dev/null
> +++ b/hw/virtio/virtio-input-host-pci.c
> @@ -0,0 +1,42 @@
> +/*
> + * Virtio input host PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */
> +
> +#include "qemu/osdep.h"
> +
> +#include "virtio-pci.h"
> +
> +static void virtio_input_host_initfn(Object *obj)
> +{
> +    VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
> +
> +    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
> +                                TYPE_VIRTIO_INPUT_HOST);
> +}
> +
> +static const TypeInfo virtio_input_host_pci_info = {
> +    .name          = TYPE_VIRTIO_INPUT_HOST_PCI,
> +    .parent        = TYPE_VIRTIO_INPUT_PCI,
> +    .instance_size = sizeof(VirtIOInputHostPCI),
> +    .instance_init = virtio_input_host_initfn,
> +};
> +
> +static void virtio_input_host_pci_register(void)
> +{
> +    type_register_static(&virtio_input_host_pci_info);
> +}
> +
> +type_init(virtio_input_host_pci_register)
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 1590b34dc9..f6094bed80 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2567,23 +2567,6 @@ static const TypeInfo virtio_tablet_pci_info = {
>      .instance_init = virtio_tablet_initfn,
>  };
>  
> -#ifdef CONFIG_LINUX
> -static void virtio_host_initfn(Object *obj)
> -{
> -    VirtIOInputHostPCI *dev = VIRTIO_INPUT_HOST_PCI(obj);
> -
> -    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
> -                                TYPE_VIRTIO_INPUT_HOST);
> -}
> -
> -static const TypeInfo virtio_host_pci_info = {
> -    .name          = TYPE_VIRTIO_INPUT_HOST_PCI,
> -    .parent        = TYPE_VIRTIO_INPUT_PCI,
> -    .instance_size = sizeof(VirtIOInputHostPCI),
> -    .instance_init = virtio_host_initfn,
> -};
> -#endif
> -
>  /* virtio-pci-bus */
>  
>  static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
> @@ -2637,9 +2620,6 @@ static void virtio_pci_register_types(void)
>      type_register_static(&virtio_keyboard_pci_info);
>      type_register_static(&virtio_mouse_pci_info);
>      type_register_static(&virtio_tablet_pci_info);
> -#ifdef CONFIG_LINUX
> -    type_register_static(&virtio_host_pci_info);
> -#endif
>      type_register_static(&virtio_pci_bus_info);
>      type_register_static(&virtio_pci_info);
>  #ifdef CONFIG_VIRTFS
> 

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

* Re: [Qemu-devel] [PATCH v2 12/22] virtio: split input bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 12/22] virtio: split input " Juan Quintela
@ 2018-08-09  6:17   ` Thomas Huth
  2018-08-24 13:14     ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Thomas Huth @ 2018-08-09  6:17 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Gerd Hoffmann

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs      |   1 +
>  hw/virtio/virtio-input-pci.c | 136 +++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c       | 112 -----------------------------
>  3 files changed, 137 insertions(+), 112 deletions(-)
>  create mode 100644 hw/virtio/virtio-input-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 685ae1d866..6819ed4e14 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -12,6 +12,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
> +obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
>  endif
>  
>  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c
> new file mode 100644
> index 0000000000..3198a505e9
> --- /dev/null
> +++ b/hw/virtio/virtio-input-pci.c
> @@ -0,0 +1,136 @@
> +/*
> + * Virtio input PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */

virtio-input had been added by Gerd in 2015, so I think you can now
switch to the GPLv2+ text only. Apart from that, patch looks fine to me.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 13/22] virtio: split rng bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 13/22] virtio: split rng " Juan Quintela
@ 2018-08-09  6:22   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-09  6:22 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs    |  1 +
>  hw/virtio/virtio-pci.c     | 52 -------------------------
>  hw/virtio/virtio-rng-pci.c | 77 ++++++++++++++++++++++++++++++++++++++
>  tests/Makefile.include     |  4 +-
>  4 files changed, 80 insertions(+), 54 deletions(-)
>  create mode 100644 hw/virtio/virtio-rng-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 6819ed4e14..2efa544a2d 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -13,6 +13,7 @@ obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
> +obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
>  endif
>  
>  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 992d3bc3b4..309fb20fef 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2409,57 +2409,6 @@ static const TypeInfo virtio_net_pci_info = {
>      .class_init    = virtio_net_pci_class_init,
>  };
>  
> -/* virtio-rng-pci */
> -
> -static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> -{
> -    VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
> -    DeviceState *vdev = DEVICE(&vrng->vdev);
> -    Error *err = NULL;
> -
> -    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
> -    object_property_set_bool(OBJECT(vdev), true, "realized", &err);
> -    if (err) {
> -        error_propagate(errp, err);
> -        return;
> -    }
> -
> -    object_property_set_link(OBJECT(vrng),
> -                             OBJECT(vrng->vdev.conf.rng), "rng",
> -                             NULL);
> -}
> -
> -static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
> -{
> -    DeviceClass *dc = DEVICE_CLASS(klass);
> -    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
> -    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
> -
> -    k->realize = virtio_rng_pci_realize;
> -    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> -
> -    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
> -    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_RNG;
> -    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
> -    pcidev_k->class_id = PCI_CLASS_OTHERS;
> -}
> -
> -static void virtio_rng_initfn(Object *obj)
> -{
> -    VirtIORngPCI *dev = VIRTIO_RNG_PCI(obj);
> -
> -    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
> -                                TYPE_VIRTIO_RNG);
> -}
> -
> -static const TypeInfo virtio_rng_pci_info = {
> -    .name          = TYPE_VIRTIO_RNG_PCI,
> -    .parent        = TYPE_VIRTIO_PCI,
> -    .instance_size = sizeof(VirtIORngPCI),
> -    .instance_init = virtio_rng_initfn,
> -    .class_init    = virtio_rng_pci_class_init,
> -};
> -
>  /* virtio-pci-bus */
>  
>  static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
> @@ -2507,7 +2456,6 @@ static const TypeInfo virtio_pci_bus_info = {
>  
>  static void virtio_pci_register_types(void)
>  {
> -    type_register_static(&virtio_rng_pci_info);
>      type_register_static(&virtio_pci_bus_info);
>      type_register_static(&virtio_pci_info);
>  #ifdef CONFIG_VIRTFS
> diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c
> new file mode 100644
> index 0000000000..b7651c8b66
> --- /dev/null
> +++ b/hw/virtio/virtio-rng-pci.c
> @@ -0,0 +1,77 @@
> +/*
> + * Virtio rng PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */

virtio-rng has been added by Amit in June 2012 (see commit 16c915ba42b4)
so you can use GPLv2+ text only here, too.

 Thomas

(Sorry for being picky here, but these "contributions after ...." texts
really look cumbersome to me - we should use this occasion of your
rework to clean them up if possible)

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes Juan Quintela
  2018-08-08 13:11   ` Thomas Huth
@ 2018-08-09 19:03   ` Dr. David Alan Gilbert
  2018-08-09 22:56     ` Michael S. Tsirkin
  1 sibling, 1 reply; 72+ messages in thread
From: Dr. David Alan Gilbert @ 2018-08-09 19:03 UTC (permalink / raw)
  To: Juan Quintela, mst; +Cc: qemu-devel, lvivier, peterx

* Juan Quintela (quintela@redhat.com) wrote:
> They are all already included in virtio_pci.h.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>


cc'ing in mst for virtio goodness.


> ---
>  hw/virtio/virtio-pci.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 3a01fe90f0..cb2ddd3f41 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -18,24 +18,11 @@
>  #include "qemu/osdep.h"
>  
>  #include "standard-headers/linux/virtio_pci.h"
> -#include "hw/virtio/virtio.h"
> -#include "hw/virtio/virtio-blk.h"
> -#include "hw/virtio/virtio-net.h"
> -#include "hw/virtio/virtio-serial.h"
> -#include "hw/virtio/virtio-scsi.h"
> -#include "hw/virtio/virtio-balloon.h"
> -#include "hw/virtio/virtio-input.h"
> -#include "hw/pci/pci.h"
> +#include "virtio-pci.h"
>  #include "qapi/error.h"
> -#include "qemu/error-report.h"
> -#include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
> -#include "hw/loader.h"
>  #include "sysemu/kvm.h"
> -#include "virtio-pci.h"
>  #include "qemu/range.h"
> -#include "hw/virtio/virtio-bus.h"
> -#include "qapi/visitor.h"
>  
>  #define VIRTIO_PCI_REGION_SIZE(dev)     VIRTIO_PCI_CONFIG_OFF(msix_present(dev))
>  
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

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

* Re: [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci
  2018-08-08 12:18   ` Thomas Huth
@ 2018-08-09 19:10     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 72+ messages in thread
From: Dr. David Alan Gilbert @ 2018-08-09 19:10 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Juan Quintela, qemu-devel, lvivier, peterx, Stefan Hajnoczi

* Thomas Huth (thuth@redhat.com) wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
> > Signed-off-by: Juan Quintela <quintela@redhat.com>
> > ---
> >  hw/virtio/Makefile.objs     |  2 +-
> >  hw/virtio/vhost-vsock-pci.c | 71 +++++++++++++++++++++++++++++++++++++
> >  hw/virtio/virtio-pci.c      | 51 --------------------------
> >  3 files changed, 72 insertions(+), 52 deletions(-)
> >  create mode 100644 hw/virtio/vhost-vsock-pci.c
> > 
> > diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> > index 1b2799cfd8..4fbf7de84b 100644
> > --- a/hw/virtio/Makefile.objs
> > +++ b/hw/virtio/Makefile.objs
> > @@ -10,7 +10,7 @@ obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-crypto.o
> >  obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
> >  
> >  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
> > -obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
> > +obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
> >  endif
> >  
> >  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> > diff --git a/hw/virtio/vhost-vsock-pci.c b/hw/virtio/vhost-vsock-pci.c
> > new file mode 100644
> > index 0000000000..5805667dc0
> > --- /dev/null
> > +++ b/hw/virtio/vhost-vsock-pci.c
> > @@ -0,0 +1,71 @@
> > +/*
> > + * Virtio vsock PCI vhost Bindings
> > + *
> > + * Copyright IBM, Corp. 2007
> > + * Copyright (c) 2009 CodeSourcery
> > + *
> > + * Authors:
> > + *  Anthony Liguori   <aliguori@us.ibm.com>
> > + *  Paul Brook        <paul@codesourcery.com>
> 
> The vhost-vsock code has been added by Stefan in 2016, so these
> Copyright and Author informations looks somehow weird in this new file
> now. Not sure how to deal best with this situation, ... I'd maybe simply
> drop the above lines in the new file?

Well, we should figure it out; if it's all new code then it doesn't need
to be GPL 2 only either.

Dave

>  Thomas
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-09 19:03   ` Dr. David Alan Gilbert
@ 2018-08-09 22:56     ` Michael S. Tsirkin
  2018-08-10  7:34       ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Michael S. Tsirkin @ 2018-08-09 22:56 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: Juan Quintela, qemu-devel, lvivier, peterx

On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
> * Juan Quintela (quintela@redhat.com) wrote:
> > They are all already included in virtio_pci.h.

All I see in virtio_pci.h is:

#include "standard-headers/linux/types.h"

Weird.

BTW what's the point of this patch?  Generally it's best not to depend
on headers including each other, it makes refactoring harder.


> > 
> > Signed-off-by: Juan Quintela <quintela@redhat.com>
> 
> 
> cc'ing in mst for virtio goodness.
> 
> 
> > ---
> >  hw/virtio/virtio-pci.c | 15 +--------------
> >  1 file changed, 1 insertion(+), 14 deletions(-)
> > 
> > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> > index 3a01fe90f0..cb2ddd3f41 100644
> > --- a/hw/virtio/virtio-pci.c
> > +++ b/hw/virtio/virtio-pci.c
> > @@ -18,24 +18,11 @@
> >  #include "qemu/osdep.h"
> >  
> >  #include "standard-headers/linux/virtio_pci.h"
> > -#include "hw/virtio/virtio.h"
> > -#include "hw/virtio/virtio-blk.h"
> > -#include "hw/virtio/virtio-net.h"
> > -#include "hw/virtio/virtio-serial.h"
> > -#include "hw/virtio/virtio-scsi.h"
> > -#include "hw/virtio/virtio-balloon.h"
> > -#include "hw/virtio/virtio-input.h"
> > -#include "hw/pci/pci.h"
> > +#include "virtio-pci.h"
> >  #include "qapi/error.h"
> > -#include "qemu/error-report.h"
> > -#include "hw/pci/msi.h"
> >  #include "hw/pci/msix.h"
> > -#include "hw/loader.h"
> >  #include "sysemu/kvm.h"
> > -#include "virtio-pci.h"
> >  #include "qemu/range.h"
> > -#include "hw/virtio/virtio-bus.h"
> > -#include "qapi/visitor.h"
> >  
> >  #define VIRTIO_PCI_REGION_SIZE(dev)     VIRTIO_PCI_CONFIG_OFF(msix_present(dev))
> >  
> > -- 
> > 2.17.1
> > 
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-09 22:56     ` Michael S. Tsirkin
@ 2018-08-10  7:34       ` Juan Quintela
  2018-08-10  9:29         ` Michael S. Tsirkin
  0 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-10  7:34 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Dr. David Alan Gilbert, qemu-devel, lvivier, peterx

"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
>> * Juan Quintela (quintela@redhat.com) wrote:
>> > They are all already included in virtio_pci.h.
>
> All I see in virtio_pci.h is:
>
> #include "standard-headers/linux/types.h"
>
> Weird.
>
> BTW what's the point of this patch?  Generally it's best not to depend
> on headers including each other, it makes refactoring harder.

If you see the following patches, we remove blk, net, serial, scsi,
balloon and input bits from that file, so I was removing includes patch
by patch.

And at the end, I found that we only need that ones.

"virtio-pci.h" does too many things here, I could have split it also,
because the mayority of the bits are only used now inside their own
virtio-foo-pci.c.  But then, there are things that share bits,
virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
in virtio-input-host-pci.c, etc,   So I decided to only do the direct
split.

And about including directly all the files that you use, and including
only the files that are extrictly needed, the normal argument is that
the less includes, the faster compiler times.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-10  7:34       ` Juan Quintela
@ 2018-08-10  9:29         ` Michael S. Tsirkin
  2018-08-10 10:01           ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Michael S. Tsirkin @ 2018-08-10  9:29 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Dr. David Alan Gilbert, qemu-devel, lvivier, peterx

On Fri, Aug 10, 2018 at 09:34:32AM +0200, Juan Quintela wrote:
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
> >> * Juan Quintela (quintela@redhat.com) wrote:
> >> > They are all already included in virtio_pci.h.
> >
> > All I see in virtio_pci.h is:
> >
> > #include "standard-headers/linux/types.h"
> >
> > Weird.
> >
> > BTW what's the point of this patch?  Generally it's best not to depend
> > on headers including each other, it makes refactoring harder.
> 
> If you see the following patches, we remove blk, net, serial, scsi,
> balloon and input bits from that file, so I was removing includes patch
> by patch.
> 
> And at the end, I found that we only need that ones.
> 
> "virtio-pci.h" does too many things here, I could have split it also,
> because the mayority of the bits are only used now inside their own
> virtio-foo-pci.c.  But then, there are things that share bits,
> virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
> in virtio-input-host-pci.c, etc,   So I decided to only do the direct
> split.
> 
> And about including directly all the files that you use, and including
> only the files that are extrictly needed, the normal argument is that
> the less includes, the faster compiler times.
> 
> Later, Juan.

That's reverse of the direction we have been going.
Pls move includes when you split up the files.

-- 
MST

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-10  9:29         ` Michael S. Tsirkin
@ 2018-08-10 10:01           ` Juan Quintela
  2018-08-10 10:17             ` Michael S. Tsirkin
  0 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-10 10:01 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Dr. David Alan Gilbert, qemu-devel, lvivier, peterx

"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Fri, Aug 10, 2018 at 09:34:32AM +0200, Juan Quintela wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>> > On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
>> >> * Juan Quintela (quintela@redhat.com) wrote:
>> >> > They are all already included in virtio_pci.h.
>> >
>> > All I see in virtio_pci.h is:
>> >
>> > #include "standard-headers/linux/types.h"
>> >
>> > Weird.
>> >
>> > BTW what's the point of this patch?  Generally it's best not to depend
>> > on headers including each other, it makes refactoring harder.
>> 
>> If you see the following patches, we remove blk, net, serial, scsi,
>> balloon and input bits from that file, so I was removing includes patch
>> by patch.
>> 
>> And at the end, I found that we only need that ones.
>> 
>> "virtio-pci.h" does too many things here, I could have split it also,
>> because the mayority of the bits are only used now inside their own
>> virtio-foo-pci.c.  But then, there are things that share bits,
>> virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
>> in virtio-input-host-pci.c, etc,   So I decided to only do the direct
>> split.
>> 
>> And about including directly all the files that you use, and including
>> only the files that are extrictly needed, the normal argument is that
>> the less includes, the faster compiler times.
>> 
>> Later, Juan.
>
> That's reverse of the direction we have been going.
> Pls move includes when you split up the files.

Hi

You want this bit of virtio-pci.h into vhost-vsock-pci.h?

#ifdef CONFIG_VHOST_VSOCK
/*
 * vhost-vsock-pci: This extends VirtioPCIProxy.
 */
#define TYPE_VHOST_VSOCK_PCI "vhost-vsock-pci"
#define VHOST_VSOCK_PCI(obj) \
        OBJECT_CHECK(VHostVSockPCI, (obj), TYPE_VHOST_VSOCK_PCI)

struct VHostVSockPCI {
    VirtIOPCIProxy parent_obj;
    VHostVSock vdev;
};
#endif

Except for shared things (input, bus, ...) the rest are only used on
the file that uses them.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-10 10:01           ` Juan Quintela
@ 2018-08-10 10:17             ` Michael S. Tsirkin
  2018-08-10 11:08               ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Michael S. Tsirkin @ 2018-08-10 10:17 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Dr. David Alan Gilbert, qemu-devel, lvivier, peterx

On Fri, Aug 10, 2018 at 12:01:44PM +0200, Juan Quintela wrote:
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > On Fri, Aug 10, 2018 at 09:34:32AM +0200, Juan Quintela wrote:
> >> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >> > On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
> >> >> * Juan Quintela (quintela@redhat.com) wrote:
> >> >> > They are all already included in virtio_pci.h.
> >> >
> >> > All I see in virtio_pci.h is:
> >> >
> >> > #include "standard-headers/linux/types.h"
> >> >
> >> > Weird.
> >> >
> >> > BTW what's the point of this patch?  Generally it's best not to depend
> >> > on headers including each other, it makes refactoring harder.
> >> 
> >> If you see the following patches, we remove blk, net, serial, scsi,
> >> balloon and input bits from that file, so I was removing includes patch
> >> by patch.
> >> 
> >> And at the end, I found that we only need that ones.
> >> 
> >> "virtio-pci.h" does too many things here, I could have split it also,
> >> because the mayority of the bits are only used now inside their own
> >> virtio-foo-pci.c.  But then, there are things that share bits,
> >> virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
> >> in virtio-input-host-pci.c, etc,   So I decided to only do the direct
> >> split.
> >> 
> >> And about including directly all the files that you use, and including
> >> only the files that are extrictly needed, the normal argument is that
> >> the less includes, the faster compiler times.
> >> 
> >> Later, Juan.
> >
> > That's reverse of the direction we have been going.
> > Pls move includes when you split up the files.
> 
> Hi
> 
> You want this bit of virtio-pci.h into vhost-vsock-pci.h?

In fact can we move it into c file?

> #ifdef CONFIG_VHOST_VSOCK
> /*
>  * vhost-vsock-pci: This extends VirtioPCIProxy.
>  */
> #define TYPE_VHOST_VSOCK_PCI "vhost-vsock-pci"
> #define VHOST_VSOCK_PCI(obj) \
>         OBJECT_CHECK(VHostVSockPCI, (obj), TYPE_VHOST_VSOCK_PCI)
> 
> struct VHostVSockPCI {
>     VirtIOPCIProxy parent_obj;
>     VHostVSock vdev;
> };
> #endif
> 
> Except for shared things (input, bus, ...) the rest are only used on
> the file that uses them.
> 
> Later, Juan.
> 

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak Juan Quintela
  2018-08-08 12:00   ` Thomas Huth
@ 2018-08-10 10:19   ` Paolo Bonzini
  2018-08-10 11:06     ` Juan Quintela
  2018-08-14 11:40     ` Juan Quintela
  1 sibling, 2 replies; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-10 10:19 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 13:48, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  default-configs/alpha-softmmu.mak       | 2 --
>  default-configs/arm-softmmu.mak         | 2 --
>  default-configs/hppa-softmmu.mak        | 3 ---
>  default-configs/i386-softmmu.mak        | 2 --
>  default-configs/mips-softmmu-common.mak | 2 --
>  default-configs/ppc-softmmu.mak         | 1 -
>  default-configs/ppcemb-softmmu.mak      | 2 --
>  default-configs/sh4-softmmu.mak         | 2 --
>  default-configs/sh4eb-softmmu.mak       | 2 --
>  default-configs/sparc64-softmmu.mak     | 2 --
>  default-configs/x86_64-softmmu.mak      | 2 --
>  11 files changed, 22 deletions(-)

I don't think CONFIG_SERIAL_ISA should be in pci.mak though, and
CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
CONFIG_SERIAL_PCI.  Perhaps introduce a superio.mak with all the legacy
ISA devices?

Paolo

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in Juan Quintela
  2018-08-08 12:03   ` Thomas Huth
@ 2018-08-10 10:20   ` Paolo Bonzini
  2018-08-10 11:08     ` Juan Quintela
  1 sibling, 1 reply; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-10 10:20 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 13:48, Juan Quintela wrote:
> Once there, untangle endianness-test and boot-serial-test.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Emanuele's qos-test would do this automatically.  It would be nicer to
convert the whole ISA subsystem to use libqos and qos-test...

Paolo

> --
> 
> boot-serial-test don't depend on isa-testdev.  Thanks Thomas.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  tests/Makefile.include | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 2016c353e3..4e5f47aac0 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -248,7 +248,7 @@ gcov-files-pci-y += hw/misc/ivshmem.c
>  check-qtest-pci-y += tests/megasas-test$(EXESUF)
>  gcov-files-pci-y += hw/scsi/megasas.c
>  
> -check-qtest-i386-y = tests/endianness-test$(EXESUF)
> +check-qtest-i386-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  check-qtest-i386-y += tests/fdc-test$(EXESUF)
>  gcov-files-i386-y = hw/block/fdc.c
>  check-qtest-i386-y += tests/ide-test$(EXESUF)
> @@ -321,15 +321,15 @@ check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
>  
>  check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)
>  
> -check-qtest-mips-y = tests/endianness-test$(EXESUF)
> -
> -check-qtest-mips64-y = tests/endianness-test$(EXESUF)
> -
> -check-qtest-mips64el-y = tests/endianness-test$(EXESUF)
> -
>  check-qtest-moxie-y = tests/boot-serial-test$(EXESUF)
>  
> -check-qtest-ppc-y = tests/endianness-test$(EXESUF)
> +check-qtest-mips-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
> +
> +check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
> +
> +check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
> +
> +check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  check-qtest-ppc-y += tests/boot-order-test$(EXESUF)
>  check-qtest-ppc-y += tests/prom-env-test$(EXESUF)
>  check-qtest-ppc-y += tests/drive_del-test$(EXESUF)
> @@ -360,16 +360,16 @@ check-qtest-ppc64-y += tests/numa-test$(EXESUF)
>  check-qtest-ppc64-$(CONFIG_IVSHMEM) += tests/ivshmem-test$(EXESUF)
>  check-qtest-ppc64-y += tests/cpu-plug-test$(EXESUF)
>  
> -check-qtest-sh4-y = tests/endianness-test$(EXESUF)
> +check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  
> -check-qtest-sh4eb-y = tests/endianness-test$(EXESUF)
> +check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  
>  check-qtest-sparc-y = tests/prom-env-test$(EXESUF)
>  check-qtest-sparc-y += tests/m48t59-test$(EXESUF)
>  gcov-files-sparc-y = hw/timer/m48t59.c
>  check-qtest-sparc-y += tests/boot-serial-test$(EXESUF)
>  
> -check-qtest-sparc64-y = tests/endianness-test$(EXESUF)
> +check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
>  check-qtest-sparc64-y += tests/prom-env-test$(EXESUF)
>  check-qtest-sparc64-y += tests/boot-serial-test$(EXESUF)
>  
> 

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

* Re: [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff
  2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
                   ` (21 preceding siblings ...)
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial " Juan Quintela
@ 2018-08-10 10:22 ` Paolo Bonzini
  22 siblings, 0 replies; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-10 10:22 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 13:48, Juan Quintela wrote:
> Hi
> 
> First the things I didn'~t touch:
> - CONFIG_FOO in source files (scsi mainly)
>   Paolo said that there are people working on that

IIRC I was referring to tests, so basically the first half of this
series.  The virtio-pci bits look great though.

Paolo

> - usb: it is a mess how things are entangled there
> - acpi options (like hotplug etc); another entanglement
> 
> So, what is there?
> - the bits that didn't got reviewed on previous iteration
> - virtio-pci: As Thomas did something for s390, I did the bits for virtio-pci.
> 
> I am able now to disable all virtio-pci devices, and run make tests.
> This is my current virtio bits:

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-10 10:19   ` Paolo Bonzini
@ 2018-08-10 11:06     ` Juan Quintela
  2018-08-10 12:08       ` Paolo Bonzini
  2018-08-14 11:40     ` Juan Quintela
  1 sibling, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-10 11:06 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, lvivier, dgilbert, peterx

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 08/08/2018 13:48, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  default-configs/alpha-softmmu.mak       | 2 --
>>  default-configs/arm-softmmu.mak         | 2 --
>>  default-configs/hppa-softmmu.mak        | 3 ---
>>  default-configs/i386-softmmu.mak        | 2 --
>>  default-configs/mips-softmmu-common.mak | 2 --
>>  default-configs/ppc-softmmu.mak         | 1 -
>>  default-configs/ppcemb-softmmu.mak      | 2 --
>>  default-configs/sh4-softmmu.mak         | 2 --
>>  default-configs/sh4eb-softmmu.mak       | 2 --
>>  default-configs/sparc64-softmmu.mak     | 2 --
>>  default-configs/x86_64-softmmu.mak      | 2 --
>>  11 files changed, 22 deletions(-)
>
> I don't think CONFIG_SERIAL_ISA should be in pci.mak though, and
> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
> CONFIG_SERIAL_PCI.  Perhaps introduce a superio.mak with all the legacy
> ISA devices?

Hi

Several things here.

a- I am just removing bits that are duplicated in this patch
   So I think it should got in as it is.

b- SuperIO: I would really be able to remove isapc machine type and
   isa-bus and related friends. (Yes, as put before, I know that all
   pc's have an isa bus, but no need for things like mmouse nowadays)

c- untangling piix and q35 is a bit of work.  The things that I remember
   from memory:
   * tests: we have tests for both on the same file (we can split the
     file)
   * is_default.  This is a mess.  I tried to disable "piix" machine
     types leaving only q35, and then tests complain that there is no
     default machine type.  I think that we should remove all the
     is_default logic and just choose the 1st for the list of machines
     (but that is one idea that I haven't triued to follow yet).

And that is before we start doing things like network isa cards, isa
sound cards, vmport (I hate that), parallel port, whatdog, etc, etc.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
  2018-08-10 10:17             ` Michael S. Tsirkin
@ 2018-08-10 11:08               ` Juan Quintela
  0 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-10 11:08 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Dr. David Alan Gilbert, qemu-devel, lvivier, peterx

"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Fri, Aug 10, 2018 at 12:01:44PM +0200, Juan Quintela wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>> > On Fri, Aug 10, 2018 at 09:34:32AM +0200, Juan Quintela wrote:
>> >> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>> >> > On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
>> >> >> * Juan Quintela (quintela@redhat.com) wrote:
>> >> >> > They are all already included in virtio_pci.h.
>> >> >
>> >> > All I see in virtio_pci.h is:
>> >> >
>> >> > #include "standard-headers/linux/types.h"
>> >> >
>> >> > Weird.
>> >> >
>> >> > BTW what's the point of this patch?  Generally it's best not to depend
>> >> > on headers including each other, it makes refactoring harder.
>> >> 
>> >> If you see the following patches, we remove blk, net, serial, scsi,
>> >> balloon and input bits from that file, so I was removing includes patch
>> >> by patch.
>> >> 
>> >> And at the end, I found that we only need that ones.
>> >> 
>> >> "virtio-pci.h" does too many things here, I could have split it also,
>> >> because the mayority of the bits are only used now inside their own
>> >> virtio-foo-pci.c.  But then, there are things that share bits,
>> >> virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
>> >> in virtio-input-host-pci.c, etc,   So I decided to only do the direct
>> >> split.
>> >> 
>> >> And about including directly all the files that you use, and including
>> >> only the files that are extrictly needed, the normal argument is that
>> >> the less includes, the faster compiler times.
>> >> 
>> >> Later, Juan.
>> >
>> > That's reverse of the direction we have been going.
>> > Pls move includes when you split up the files.
>> 
>> Hi
>> 
>> You want this bit of virtio-pci.h into vhost-vsock-pci.h?
>
> In fact can we move it into c file?

Miss-type.  I mean the .c file.

ok, will do for the next round.

Thanks for the comments.

>> #ifdef CONFIG_VHOST_VSOCK
>> /*
>>  * vhost-vsock-pci: This extends VirtioPCIProxy.
>>  */
>> #define TYPE_VHOST_VSOCK_PCI "vhost-vsock-pci"
>> #define VHOST_VSOCK_PCI(obj) \
>>         OBJECT_CHECK(VHostVSockPCI, (obj), TYPE_VHOST_VSOCK_PCI)
>> 
>> struct VHostVSockPCI {
>>     VirtIOPCIProxy parent_obj;
>>     VHostVSock vdev;
>> };
>> #endif
>> 
>> Except for shared things (input, bus, ...) the rest are only used on
>> the file that uses them.
>> 
>> Later, Juan.
>> 

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-10 10:20   ` Paolo Bonzini
@ 2018-08-10 11:08     ` Juan Quintela
  2018-08-10 12:11       ` Paolo Bonzini
  0 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-10 11:08 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, lvivier, dgilbert, peterx

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 08/08/2018 13:48, Juan Quintela wrote:
>> Once there, untangle endianness-test and boot-serial-test.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> Emanuele's qos-test would do this automatically.  It would be nicer to
> convert the whole ISA subsystem to use libqos and qos-test...

Can we get this in until we get some volunteer for that other work?
/me full of things on his plate at the moment.

Thanks, Juan.

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-10 11:06     ` Juan Quintela
@ 2018-08-10 12:08       ` Paolo Bonzini
  0 siblings, 0 replies; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-10 12:08 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On 10/08/2018 13:06, Juan Quintela wrote:
>> I don't think CONFIG_SERIAL_ISA should be in pci.mak though, and
>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
>> CONFIG_SERIAL_PCI.  Perhaps introduce a superio.mak with all the legacy
>> ISA devices?
>
> Hi
> 
> Several things here.
> 
> a- I am just removing bits that are duplicated in this patch
>    So I think it should got in as it is.

The right thing to do perhaps would be to remove CONFIG_SERIAL_ISA from
pci.mak.  There's no reason why a pSeries-only QEMU would include
CONFIG_SERIAL_ISA, I think.  Thomas, Laurent?

> b- SuperIO: I would really be able to remove isapc machine type and
>    isa-bus and related friends. (Yes, as put before, I know that all
>    pc's have an isa bus, but no need for things like mmouse nowadays)

Not sure how isapc and a hypothetical superio.mak are related.

> c- untangling piix and q35 is a bit of work.  The things that I remember
>    from memory:
>    * tests: we have tests for both on the same file (we can split the
>      file)

Again, you're duplicating what qos-test is doing, and again I'm not sure
how (c) is related to the other parts.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-10 11:08     ` Juan Quintela
@ 2018-08-10 12:11       ` Paolo Bonzini
  2018-08-10 15:17         ` Juan Quintela
  0 siblings, 1 reply; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-10 12:11 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On 10/08/2018 13:08, Juan Quintela wrote:
>> Emanuele's qos-test would do this automatically.  It would be nicer to
>> convert the whole ISA subsystem to use libqos and qos-test...
> Can we get this in until we get some volunteer for that other work?
> /me full of things on his plate at the moment.

Sure, but since this is RFC, I commented. :)  With qos-test, all tests
end up in a single binary that is generic for all QEMU targets, and
there's no need to synchronize the configuration with the testing.

The disadvantage of doing it at the Makefile level is that it relies on
the devices being either in all targets or none.  For example
CONFIG_ISA_TESTDEV cannot be removed from just
default-configs/ppc-softmmu.mak if you are building both a PPC and an
x86 target.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-10 12:11       ` Paolo Bonzini
@ 2018-08-10 15:17         ` Juan Quintela
  2018-08-13 11:31           ` Paolo Bonzini
  0 siblings, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-10 15:17 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, lvivier, dgilbert, peterx

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 10/08/2018 13:08, Juan Quintela wrote:
>>> Emanuele's qos-test would do this automatically.  It would be nicer to
>>> convert the whole ISA subsystem to use libqos and qos-test...
>> Can we get this in until we get some volunteer for that other work?
>> /me full of things on his plate at the moment.
>
> Sure, but since this is RFC, I commented. :)

I didn't expect less of you O:-)

> With qos-test, all tests
> end up in a single binary that is generic for all QEMU targets, and
> there's no need to synchronize the configuration with the testing.
>
> The disadvantage of doing it at the Makefile level is that it relies on
> the devices being either in all targets or none.  For example
> CONFIG_ISA_TESTDEV cannot be removed from just
> default-configs/ppc-softmmu.mak if you are building both a PPC and an
> x86 target.

I can live with that.  My use case is:
- complining for more than one architecture: everything
  under the sun is compiled in
- development: I choose a single architecture and the minimal amount of
  devices for whatever I am testing

So, for me is perfect, thanks.

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in
  2018-08-10 15:17         ` Juan Quintela
@ 2018-08-13 11:31           ` Paolo Bonzini
  0 siblings, 0 replies; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-13 11:31 UTC (permalink / raw)
  To: quintela; +Cc: lvivier, qemu-devel, peterx, dgilbert

On 10/08/2018 17:17, Juan Quintela wrote:
> Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 10/08/2018 13:08, Juan Quintela wrote:
>>>> Emanuele's qos-test would do this automatically.  It would be nicer to
>>>> convert the whole ISA subsystem to use libqos and qos-test...
>>> Can we get this in until we get some volunteer for that other work?
>>> /me full of things on his plate at the moment.
>>
>> Sure, but since this is RFC, I commented. :)
> 
> I didn't expect less of you O:-)
> 
>> With qos-test, all tests
>> end up in a single binary that is generic for all QEMU targets, and
>> there's no need to synchronize the configuration with the testing.
>>
>> The disadvantage of doing it at the Makefile level is that it relies on
>> the devices being either in all targets or none.  For example
>> CONFIG_ISA_TESTDEV cannot be removed from just
>> default-configs/ppc-softmmu.mak if you are building both a PPC and an
>> x86 target.

Anyway, I'm not opposed to merging this part, it's just that they may be
unnecessary in the future.  The virtio split is more interesting to me,
and I am very happy that you are doing it!

Paolo

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-10 10:19   ` Paolo Bonzini
  2018-08-10 11:06     ` Juan Quintela
@ 2018-08-14 11:40     ` Juan Quintela
  2018-08-14 11:52       ` Paolo Bonzini
  1 sibling, 1 reply; 72+ messages in thread
From: Juan Quintela @ 2018-08-14 11:40 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, lvivier, dgilbert, peterx

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 08/08/2018 13:48, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  default-configs/alpha-softmmu.mak       | 2 --
>>  default-configs/arm-softmmu.mak         | 2 --
>>  default-configs/hppa-softmmu.mak        | 3 ---
>>  default-configs/i386-softmmu.mak        | 2 --
>>  default-configs/mips-softmmu-common.mak | 2 --
>>  default-configs/ppc-softmmu.mak         | 1 -
>>  default-configs/ppcemb-softmmu.mak      | 2 --
>>  default-configs/sh4-softmmu.mak         | 2 --
>>  default-configs/sh4eb-softmmu.mak       | 2 --
>>  default-configs/sparc64-softmmu.mak     | 2 --
>>  default-configs/x86_64-softmmu.mak      | 2 --
>>  11 files changed, 22 deletions(-)
>
> I don't think CONFIG_SERIAL_ISA should be in pci.mak though

agreed.

>, and
> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
> CONFIG_SERIAL_PCI.

I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI.  That is
not enough.  CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things
like riscv* require it (i.e. basically all the weird(*) boards have a
serial port)



> Perhaps introduce a superio.mak with all the legacy
> ISA devices?

What are the surperio.mak or isa.mak.  And once there, what are the isa
devices?  Weird things that came to my mind that can't be disabled:

- mmmouse
- serial-isa
- fdc
- vmport
- vga-isa (this is another weird thing)
- ipmi-isa?
- what else?

Later, Juan.

(*): weird here means that they don't have PCI available.

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 11:40     ` Juan Quintela
@ 2018-08-14 11:52       ` Paolo Bonzini
  2018-08-14 12:06         ` Peter Maydell
  0 siblings, 1 reply; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-14 11:52 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On 14/08/2018 13:40, Juan Quintela wrote:
>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
>> CONFIG_SERIAL_PCI.
> 
> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI.  That is
> not enough.  CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things
> like riscv* require it

Right, I would put

   CONFIG_SERIAL=y
   CONFIG_SERIAL_ISA=y

in superio.mak and

   CONFIG_SERIAL=y
   CONFIG_SERIAL_PCI=y

in pci.mak.

>> Perhaps introduce a superio.mak with all the legacy
>> ISA devices?
> What are the surperio.mak or isa.mak.  And once there, what are the isa
> devices?  Weird things that came to my mind that can't be disabled:
> 
> - mmmouse

msmouse is a character device backend, not a device model

> - serial-isa
> - fdc
> - vmport
> - vga-isa (this is another weird thing)
> - ipmi-isa?
> - what else?

SuperIO is RTC, I8254, I8257, I8259, ISA serial, parallel, floppy.  They
can all be disabled (well, no guarantee that it compiles but the option
is there).

Paolo

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 11:52       ` Paolo Bonzini
@ 2018-08-14 12:06         ` Peter Maydell
  2018-08-14 12:56           ` Paolo Bonzini
  2018-08-14 13:31           ` Juan Quintela
  0 siblings, 2 replies; 72+ messages in thread
From: Peter Maydell @ 2018-08-14 12:06 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Juan Quintela, Laurent Vivier, QEMU Developers, Peter Xu,
	Dr. David Alan Gilbert

On 14 August 2018 at 12:52, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 14/08/2018 13:40, Juan Quintela wrote:
>>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
>>> CONFIG_SERIAL_PCI.
>>
>> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI.  That is
>> not enough.  CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things
>> like riscv* require it
>
> Right, I would put
>
>    CONFIG_SERIAL=y
>    CONFIG_SERIAL_ISA=y
>
> in superio.mak and
>
>    CONFIG_SERIAL=y
>    CONFIG_SERIAL_PCI=y
>
> in pci.mak.

What about the boards that use the serial.c code but do not
have PCI, ISA or a superio chip? That is, all the boards/devices
that call serial_mm_init() directly to create a memory-mapped
16550.

(If anybody feels like trying to do a complicated refactoring,
serial_mm_init() is a pretty ugly legacy API around some
non-QOMified core 16550 code...)

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 12:06         ` Peter Maydell
@ 2018-08-14 12:56           ` Paolo Bonzini
  2018-08-14 12:57             ` Peter Maydell
  2018-08-14 13:31           ` Juan Quintela
  1 sibling, 1 reply; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-14 12:56 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Juan Quintela, Laurent Vivier, QEMU Developers, Peter Xu,
	Dr. David Alan Gilbert

On 14/08/2018 14:06, Peter Maydell wrote:
> On 14 August 2018 at 12:52, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 14/08/2018 13:40, Juan Quintela wrote:
>>>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
>>>> CONFIG_SERIAL_PCI.
>>>
>>> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI.  That is
>>> not enough.  CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things
>>> like riscv* require it
>>
>> Right, I would put
>>
>>    CONFIG_SERIAL=y
>>    CONFIG_SERIAL_ISA=y
>>
>> in superio.mak and
>>
>>    CONFIG_SERIAL=y
>>    CONFIG_SERIAL_PCI=y
>>
>> in pci.mak.
> 
> What about the boards that use the serial.c code but do not
> have PCI, ISA or a superio chip? That is, all the boards/devices
> that call serial_mm_init() directly to create a memory-mapped
> 16550.

They just add

   CONFIG_SERIAL=y

to the .mak file.

Paolo

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 12:56           ` Paolo Bonzini
@ 2018-08-14 12:57             ` Peter Maydell
  2018-08-14 13:05               ` Paolo Bonzini
  0 siblings, 1 reply; 72+ messages in thread
From: Peter Maydell @ 2018-08-14 12:57 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Juan Quintela, Laurent Vivier, QEMU Developers, Peter Xu,
	Dr. David Alan Gilbert

On 14 August 2018 at 13:56, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 14/08/2018 14:06, Peter Maydell wrote:
>> What about the boards that use the serial.c code but do not
>> have PCI, ISA or a superio chip? That is, all the boards/devices
>> that call serial_mm_init() directly to create a memory-mapped
>> 16550.
>
> They just add
>
>    CONFIG_SERIAL=y
>
> to the .mak file.

...but the patch that has kicked off this thread is *removing*
CONFIG_SERIAL=y from the various .mak files...

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 12:57             ` Peter Maydell
@ 2018-08-14 13:05               ` Paolo Bonzini
  0 siblings, 0 replies; 72+ messages in thread
From: Paolo Bonzini @ 2018-08-14 13:05 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Juan Quintela, Laurent Vivier, QEMU Developers, Peter Xu,
	Dr. David Alan Gilbert

On 14/08/2018 14:57, Peter Maydell wrote:
> On 14 August 2018 at 13:56, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 14/08/2018 14:06, Peter Maydell wrote:
>>> What about the boards that use the serial.c code but do not
>>> have PCI, ISA or a superio chip? That is, all the boards/devices
>>> that call serial_mm_init() directly to create a memory-mapped
>>> 16550.
>>
>> They just add
>>
>>    CONFIG_SERIAL=y
>>
>> to the .mak file.
> 
> ...but the patch that has kicked off this thread is *removing*
> CONFIG_SERIAL=y from the various .mak files...

Probably because they were including pci.mak.  Indeed CONFIG_SERIAL=y
should remain in the
ARM/HPPA/Microblaze/MIPS/Mozie/NiOS2/OpenRISC/PPC/RiscV/SH/SPARC64/Xtensa
.mak files.

Another possibility would be to split .mak files per-machine, and
include the per-machine file in the toplevel.

Thanks,

Paolo

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

* Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak
  2018-08-14 12:06         ` Peter Maydell
  2018-08-14 12:56           ` Paolo Bonzini
@ 2018-08-14 13:31           ` Juan Quintela
  1 sibling, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-14 13:31 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Paolo Bonzini, Laurent Vivier, QEMU Developers, Peter Xu,
	Dr. David Alan Gilbert

Peter Maydell <peter.maydell@linaro.org> wrote:
> On 14 August 2018 at 12:52, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 14/08/2018 13:40, Juan Quintela wrote:
>>>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and
>>>> CONFIG_SERIAL_PCI.
>>>
>>> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI.  That is
>>> not enough.  CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things
>>> like riscv* require it
>>
>> Right, I would put
>>
>>    CONFIG_SERIAL=y
>>    CONFIG_SERIAL_ISA=y
>>
>> in superio.mak and
>>
>>    CONFIG_SERIAL=y
>>    CONFIG_SERIAL_PCI=y
>>
>> in pci.mak.
>
> What about the boards that use the serial.c code but do not
> have PCI, ISA or a superio chip? That is, all the boards/devices
> that call serial_mm_init() directly to create a memory-mapped
> 16550.

That is what I mean that changing CONFIG_SERIAL to
$(call lor,$(CONFIG_SERIAL_ISA), $(CONFIG_SERIAL_PCI))

is not enough.


> (If anybody feels like trying to do a complicated refactoring,
> serial_mm_init() is a pretty ugly legacy API around some
> non-QOMified core 16550 code...)

It is really, really interesting, we have:

- serial_init()
  used is sh4, mips and imx serial

- serial_mm_init()
  loads of places

- serial_hds_isa_init()
  sparc64, ppc, other mips, and pc

And now you can start getting creative with qom.

O:-)

Later, Juan.

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

* Re: [Qemu-devel] [PATCH v2 14/22] virtio: split balloon bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 14/22] virtio: split balloon " Juan Quintela
@ 2018-08-15 15:32   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 15:32 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs        |  1 +
>  hw/virtio/virtio-balloon-pci.c | 82 ++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c         | 57 -----------------------
>  tests/Makefile.include         |  4 +-
>  4 files changed, 85 insertions(+), 59 deletions(-)
>  create mode 100644 hw/virtio/virtio-balloon-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 15/22] virtio: split 9p bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 15/22] virtio: split 9p " Juan Quintela
@ 2018-08-15 15:37   ` Thomas Huth
  2018-08-15 15:40   ` Thomas Huth
  1 sibling, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 15:37 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs   |  1 +
>  hw/virtio/virtio-9p-pci.c | 74 +++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c    | 52 ---------------------------
>  3 files changed, 75 insertions(+), 52 deletions(-)
>  create mode 100644 hw/virtio/virtio-9p-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk " Juan Quintela
@ 2018-08-15 15:40   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 15:40 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs        |  1 +
>  hw/virtio/vhost-user-blk-pci.c | 88 ++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c         | 60 -----------------------
>  3 files changed, 89 insertions(+), 60 deletions(-)
>  create mode 100644 hw/virtio/vhost-user-blk-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 15/22] virtio: split 9p bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 15/22] virtio: split 9p " Juan Quintela
  2018-08-15 15:37   ` Thomas Huth
@ 2018-08-15 15:40   ` Thomas Huth
  1 sibling, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 15:40 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs   |  1 +
>  hw/virtio/virtio-9p-pci.c | 74 +++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c    | 52 ---------------------------
>  3 files changed, 75 insertions(+), 52 deletions(-)
>  create mode 100644 hw/virtio/virtio-9p-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi " Juan Quintela
@ 2018-08-15 16:18   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 16:18 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs         |  1 +
>  hw/virtio/vhost-user-scsi-pci.c | 89 +++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c          | 58 ---------------------
>  3 files changed, 90 insertions(+), 58 deletions(-)
>  create mode 100644 hw/virtio/vhost-user-scsi-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index 2c95c55bd0..a5d2e38d3a 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -12,6 +12,7 @@ obj-$(call land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-p
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>  obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
> +obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
>  obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
> diff --git a/hw/virtio/vhost-user-scsi-pci.c b/hw/virtio/vhost-user-scsi-pci.c
> new file mode 100644
> index 0000000000..6f3a73c2a8
> --- /dev/null
> +++ b/hw/virtio/vhost-user-scsi-pci.c
> @@ -0,0 +1,89 @@
> +/*
> + * Virtio PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */

The vhost-user-scsi code has been introduced in 2017 by Felipe
Franciosi, so I think you could remove the above "Authors" lines, and
adjust the GPL license statement to plain GPLv2+ here.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi " Juan Quintela
@ 2018-08-15 16:21   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 16:21 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs    |  1 +
>  hw/virtio/vhost-scsi-pci.c | 94 ++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c     | 59 ------------------------
>  3 files changed, 95 insertions(+), 59 deletions(-)
>  create mode 100644 hw/virtio/vhost-scsi-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index a5d2e38d3a..6e6e001449 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -13,6 +13,7 @@ obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>  obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk-pci.o
>  obj-$(CONFIG_VHOST_USER_SCSI) += vhost-user-scsi-pci.o
> +obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
>  obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
>  obj-$(CONFIG_VIRTIO_RNG) += virtio-rng-pci.o
> diff --git a/hw/virtio/vhost-scsi-pci.c b/hw/virtio/vhost-scsi-pci.c
> new file mode 100644
> index 0000000000..0ff9f10516
> --- /dev/null
> +++ b/hw/virtio/vhost-scsi-pci.c
> @@ -0,0 +1,94 @@
> +/*
> + * Virtio PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */

vhost-scsi has been added in 2013 by Nicholas Bellinger, so you can
simplify the above header comment, too.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi bits from virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi " Juan Quintela
@ 2018-08-15 16:30   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-15 16:30 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Notice that we can't still run tests with it disabled.  Both cdrom-test and
> drive_del-test use virtio-scsi without checking if it is enabled.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs     |  1 +
>  hw/virtio/virtio-pci.c      | 68 ---------------------------
>  hw/virtio/virtio-scsi-pci.c | 93 +++++++++++++++++++++++++++++++++++++
>  tests/Makefile.include      |  4 +-
>  4 files changed, 96 insertions(+), 70 deletions(-)
>  create mode 100644 hw/virtio/virtio-scsi-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci Juan Quintela
@ 2018-08-16  7:12   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-16  7:12 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Michael S. Tsirkin

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs    |  1 +
>  hw/virtio/virtio-blk-pci.c | 82 ++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c     | 58 ---------------------------
>  tests/Makefile.include     |  4 +-
>  4 files changed, 85 insertions(+), 60 deletions(-)
>  create mode 100644 hw/virtio/virtio-blk-pci.c

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net bits rom virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net " Juan Quintela
@ 2018-08-16  7:14   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-16  7:14 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx, Michael S. Tsirkin

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs    |  1 +
>  hw/virtio/virtio-net-pci.c | 81 ++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio-pci.c     | 56 --------------------------
>  tests/Makefile.include     |  4 +-
>  4 files changed, 84 insertions(+), 58 deletions(-)
>  create mode 100644 hw/virtio/virtio-net-pci.c
> 
> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
> index c28b740dca..0810553ab8 100644
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -21,6 +21,7 @@ obj-$(CONFIG_VIRTIO_BALLOON) += virtio-balloon-pci.o
>  obj-$(CONFIG_VIRTIO_9P) += virtio-9p-pci.o
>  obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi-pci.o
>  obj-$(CONFIG_VIRTIO_BLK) += virtio-blk-pci.o
> +obj-$(CONFIG_VIRTIO_NET) += virtio-net-pci.o
>  endif
>  
>  common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
> diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c
> new file mode 100644
> index 0000000000..cf8cf7535c
> --- /dev/null
> +++ b/hw/virtio/virtio-net-pci.c
> @@ -0,0 +1,81 @@
> +/*
> + * Virtio net PCI Bindings
> + *
> + * Copyright IBM, Corp. 2007
> + * Copyright (c) 2009 CodeSourcery
> + *
> + * Authors:
> + *  Anthony Liguori   <aliguori@us.ibm.com>
> + *  Paul Brook        <paul@codesourcery.com>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See
> + * the COPYING file in the top-level directory.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.
> + */
> +
> +#include "qemu/osdep.h"
> +
> +#include "virtio-pci.h"
> +#include "qapi/error.h"
> +
> +static Property virtio_net_properties[] = {
> +    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
> +                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
> +    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
> +    DEFINE_PROP_END_OF_LIST(),
> +};
> +
> +static void virtio_net_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> +{
> +    DeviceState *qdev = DEVICE(vpci_dev);
> +    VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev);
> +    DeviceState *vdev = DEVICE(&dev->vdev);
> +
> +    virtio_net_set_netclient_name(&dev->vdev, qdev->id,
> +                                  object_get_typename(OBJECT(qdev)));
> +    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
> +    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
> +}
> +
> +static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
> +{
> +    DeviceClass *dc = DEVICE_CLASS(klass);
> +    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> +    VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
> +
> +    k->romfile = "efi-virtio.rom";
> +    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
> +    k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
> +    k->revision = VIRTIO_PCI_ABI_VERSION;
> +    k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> +    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
> +    dc->props = virtio_net_properties;
> +    vpciklass->realize = virtio_net_pci_realize;
> +}
> +
> +static void virtio_net_pci_instance_init(Object *obj)
> +{
> +    VirtIONetPCI *dev = VIRTIO_NET_PCI(obj);
> +
> +    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
> +                                TYPE_VIRTIO_NET);
> +    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
> +                              "bootindex", &error_abort);
> +}
> +
> +static const TypeInfo virtio_net_pci_info = {
> +    .name          = TYPE_VIRTIO_NET_PCI,
> +    .parent        = TYPE_VIRTIO_PCI,
> +    .instance_size = sizeof(VirtIONetPCI),
> +    .instance_init = virtio_net_pci_instance_init,
> +    .class_init    = virtio_net_pci_class_init,
> +};
> +
> +static void virtio_net_pci_register(void)
> +{
> +    type_register_static(&virtio_net_pci_info);
> +}
> +
> +type_init(virtio_net_pci_register)
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index e1c6088019..589e565746 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -1957,61 +1957,6 @@ static const TypeInfo virtio_serial_pci_info = {
>      .class_init    = virtio_serial_pci_class_init,
>  };
>  
> -/* virtio-net-pci */
> -
> -static Property virtio_net_properties[] = {
> -    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
> -                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
> -    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 3),
> -    DEFINE_PROP_END_OF_LIST(),
> -};
> -
> -static void virtio_net_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> -{
> -    DeviceState *qdev = DEVICE(vpci_dev);
> -    VirtIONetPCI *dev = VIRTIO_NET_PCI(vpci_dev);
> -    DeviceState *vdev = DEVICE(&dev->vdev);
> -
> -    virtio_net_set_netclient_name(&dev->vdev, qdev->id,
> -                                  object_get_typename(OBJECT(qdev)));
> -    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
> -    object_property_set_bool(OBJECT(vdev), true, "realized", errp);
> -}
> -
> -static void virtio_net_pci_class_init(ObjectClass *klass, void *data)
> -{
> -    DeviceClass *dc = DEVICE_CLASS(klass);
> -    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> -    VirtioPCIClass *vpciklass = VIRTIO_PCI_CLASS(klass);
> -
> -    k->romfile = "efi-virtio.rom";
> -    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
> -    k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
> -    k->revision = VIRTIO_PCI_ABI_VERSION;
> -    k->class_id = PCI_CLASS_NETWORK_ETHERNET;
> -    set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
> -    dc->props = virtio_net_properties;
> -    vpciklass->realize = virtio_net_pci_realize;
> -}
> -
> -static void virtio_net_pci_instance_init(Object *obj)
> -{
> -    VirtIONetPCI *dev = VIRTIO_NET_PCI(obj);
> -
> -    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
> -                                TYPE_VIRTIO_NET);
> -    object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
> -                              "bootindex", &error_abort);
> -}
> -
> -static const TypeInfo virtio_net_pci_info = {
> -    .name          = TYPE_VIRTIO_NET_PCI,
> -    .parent        = TYPE_VIRTIO_PCI,
> -    .instance_size = sizeof(VirtIONetPCI),
> -    .instance_init = virtio_net_pci_instance_init,
> -    .class_init    = virtio_net_pci_class_init,
> -};
> -
>  /* virtio-pci-bus */
>  
>  static void virtio_pci_bus_new(VirtioBusState *bus, size_t bus_size,
> @@ -2062,7 +2007,6 @@ static void virtio_pci_register_types(void)
>      type_register_static(&virtio_pci_bus_info);
>      type_register_static(&virtio_pci_info);
>      type_register_static(&virtio_serial_pci_info);
> -    type_register_static(&virtio_net_pci_info);
>  }
>  
>  type_init(virtio_pci_register_types)
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 296e04f704..a1352ccefb 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -189,8 +189,8 @@ check-qtest-virtioserial-y += tests/virtio-console-test$(EXESUF)
>  gcov-files-virtioserial-y += hw/char/virtio-console.c
>  
>  gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio.c
> -check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
> -gcov-files-virtio-y += i386-softmmu/hw/net/virtio-net.c
> +check-qtest-virtio-$(CONFIG_VIRTIO_NET) += tests/virtio-net-test$(EXESUF)
> +gcov-files-virtio-$(CONFIG_VIRTIO_NET) += i386-softmmu/hw/net/virtio-net.c
>  check-qtest-virtio-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)
>  gcov-files-virtio-$(CONFIG_VIRTIO_BALLOON) += i386-softmmu/hw/virtio/virtio-balloon.c
>  check-qtest-virtio-$(CONFIG_VIRTIO_BLK) += tests/virtio-blk-test$(EXESUF)
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial bits rom virtio-pci
  2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial " Juan Quintela
@ 2018-08-16  7:24   ` Thomas Huth
  0 siblings, 0 replies; 72+ messages in thread
From: Thomas Huth @ 2018-08-16  7:24 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 08/08/2018 01:48 PM, Juan Quintela wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/Makefile.objs       |  1 +
>  hw/virtio/virtio-pci.c        | 74 --------------------------
>  hw/virtio/virtio-serial-pci.c | 97 +++++++++++++++++++++++++++++++++++
>  tests/Makefile.include        | 12 ++---
>  4 files changed, 104 insertions(+), 80 deletions(-)
>  create mode 100644 hw/virtio/virtio-serial-pci.c
[...]
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index a1352ccefb..8666206ea4 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -143,7 +143,7 @@ check-unit-y += tests/test-crypto-secret$(EXESUF)
>  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlscredsx509$(EXESUF)
>  check-unit-$(CONFIG_GNUTLS) += tests/test-crypto-tlssession$(EXESUF)
>  ifneq (,$(findstring qemu-ga,$(TOOLS)))
> -check-unit-$(CONFIG_LINUX) += tests/test-qga$(EXESUF)
> +check-unit-$(land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)

Maybe mention qga's dependency in the patch description?

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH v2 11/22] virtio: split host bits from virtio-pci
  2018-08-09  6:10   ` Thomas Huth
@ 2018-08-24 13:00     ` Juan Quintela
  0 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-24 13:00 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, lvivier, dgilbert, peterx

Thomas Huth <thuth@redhat.com> wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  default-configs/virtio.mak        |  3 +++
>>  hw/virtio/Makefile.objs           |  1 +
>>  hw/virtio/virtio-input-host-pci.c | 42 +++++++++++++++++++++++++++++++
>>  hw/virtio/virtio-pci.c            | 20 ---------------
>>  4 files changed, 46 insertions(+), 20 deletions(-)
>>  create mode 100644 hw/virtio/virtio-input-host-pci.c
>> 
>> diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
>> index 1304849018..6309dbf938 100644
>> --- a/default-configs/virtio.mak
>> +++ b/default-configs/virtio.mak
>> @@ -12,3 +12,6 @@ CONFIG_VIRTIO_RNG=y
>>  CONFIG_SCSI=y
>>  CONFIG_VIRTIO_SCSI=y
>>  CONFIG_VIRTIO_SERIAL=y
>> +CONFIG_VIRTIO_VSOCK=y
>> +CONFIG_VIRTIO_INPUT_HOST=$(CONFIG_LINUX)
>
> What's the VIRTIO_VSOCK good for? You don't seem to use it in this patch?

Trash from previous rebases.  Removed.  Thanks.

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

* Re: [Qemu-devel] [PATCH v2 12/22] virtio: split input bits from virtio-pci
  2018-08-09  6:17   ` Thomas Huth
@ 2018-08-24 13:14     ` Juan Quintela
  0 siblings, 0 replies; 72+ messages in thread
From: Juan Quintela @ 2018-08-24 13:14 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, lvivier, dgilbert, peterx, Gerd Hoffmann

Thomas Huth <thuth@redhat.com> wrote:
> On 08/08/2018 01:48 PM, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  hw/virtio/Makefile.objs      |   1 +
>>  hw/virtio/virtio-input-pci.c | 136 +++++++++++++++++++++++++++++++++++
>>  hw/virtio/virtio-pci.c       | 112 -----------------------------
>>  3 files changed, 137 insertions(+), 112 deletions(-)
>>  create mode 100644 hw/virtio/virtio-input-pci.c
>> 
>> diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
>> index 685ae1d866..6819ed4e14 100644
>> --- a/hw/virtio/Makefile.objs
>> +++ b/hw/virtio/Makefile.objs
>> @@ -12,6 +12,7 @@ obj-$(call
>> land,$(CONFIG_VIRTIO_CRYPTO),$(CONFIG_VIRTIO_PCI)) +=
>> virtio-crypto-p
>>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o vhost-vsock-pci.o
>>  obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host-pci.o
>> +obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-pci.o
>>  endif
>>  
>>  common-obj-$(call lnot,$(call
>> land,$(CONFIG_VIRTIO),$(CONFIG_LINUX))) += vhost-stub.o
>> diff --git a/hw/virtio/virtio-input-pci.c b/hw/virtio/virtio-input-pci.c
>> new file mode 100644
>> index 0000000000..3198a505e9
>> --- /dev/null
>> +++ b/hw/virtio/virtio-input-pci.c
>> @@ -0,0 +1,136 @@
>> +/*
>> + * Virtio input PCI Bindings
>> + *
>> + * Copyright IBM, Corp. 2007
>> + * Copyright (c) 2009 CodeSourcery
>> + *
>> + * Authors:
>> + *  Anthony Liguori   <aliguori@us.ibm.com>
>> + *  Paul Brook        <paul@codesourcery.com>
>> + *
>> + * This work is licensed under the terms of the GNU GPL, version 2.  See
>> + * the COPYING file in the top-level directory.
>> + *
>> + * Contributions after 2012-01-13 are licensed under the terms of the
>> + * GNU GPL, version 2 or (at your option) any later version.
>> + */
>
> virtio-input had been added by Gerd in 2015, so I think you can now
> switch to the GPLv2+ text only. Apart from that, patch looks fine to me.

Done.
Thanks.

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

end of thread, other threads:[~2018-08-24 13:14 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 11:48 [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 01/22] configure: We don't want to clean configuration files Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak Juan Quintela
2018-08-08 12:00   ` Thomas Huth
2018-08-10 10:19   ` Paolo Bonzini
2018-08-10 11:06     ` Juan Quintela
2018-08-10 12:08       ` Paolo Bonzini
2018-08-14 11:40     ` Juan Quintela
2018-08-14 11:52       ` Paolo Bonzini
2018-08-14 12:06         ` Peter Maydell
2018-08-14 12:56           ` Paolo Bonzini
2018-08-14 12:57             ` Peter Maydell
2018-08-14 13:05               ` Paolo Bonzini
2018-08-14 13:31           ` Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 03/22] check: Use land/lor when possible Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 04/22] check: Only test isa-testdev when it is compiled in Juan Quintela
2018-08-08 12:03   ` Thomas Huth
2018-08-10 10:20   ` Paolo Bonzini
2018-08-10 11:08     ` Juan Quintela
2018-08-10 12:11       ` Paolo Bonzini
2018-08-10 15:17         ` Juan Quintela
2018-08-13 11:31           ` Paolo Bonzini
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec " Juan Quintela
2018-08-08 12:06   ` Thomas Huth
2018-08-08 17:02     ` Juan Quintela
2018-08-09  5:28       ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu Juan Quintela
2018-08-08 12:10   ` Thomas Huth
2018-08-08 16:59     ` Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 07/22] check: Only test ivshm when it is compiled in Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are " Juan Quintela
2018-08-08 12:11   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes Juan Quintela
2018-08-08 13:11   ` Thomas Huth
2018-08-09 19:03   ` Dr. David Alan Gilbert
2018-08-09 22:56     ` Michael S. Tsirkin
2018-08-10  7:34       ` Juan Quintela
2018-08-10  9:29         ` Michael S. Tsirkin
2018-08-10 10:01           ` Juan Quintela
2018-08-10 10:17             ` Michael S. Tsirkin
2018-08-10 11:08               ` Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci Juan Quintela
2018-08-08 12:18   ` Thomas Huth
2018-08-09 19:10     ` Dr. David Alan Gilbert
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 11/22] virtio: split host " Juan Quintela
2018-08-09  6:10   ` Thomas Huth
2018-08-24 13:00     ` Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 12/22] virtio: split input " Juan Quintela
2018-08-09  6:17   ` Thomas Huth
2018-08-24 13:14     ` Juan Quintela
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 13/22] virtio: split rng " Juan Quintela
2018-08-09  6:22   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 14/22] virtio: split balloon " Juan Quintela
2018-08-15 15:32   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 15/22] virtio: split 9p " Juan Quintela
2018-08-15 15:37   ` Thomas Huth
2018-08-15 15:40   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 16/22] virtio: split vhost-user-blk " Juan Quintela
2018-08-15 15:40   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 17/22] virtio: split vhost-user-scsi " Juan Quintela
2018-08-15 16:18   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 18/22] virtio: split vhost-scsi " Juan Quintela
2018-08-15 16:21   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 19/22] virtio: split virtio-scsi " Juan Quintela
2018-08-15 16:30   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 20/22] virtio: split virtio-blk bits rom virtio-pci Juan Quintela
2018-08-16  7:12   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 21/22] virtio: split virtio-net " Juan Quintela
2018-08-16  7:14   ` Thomas Huth
2018-08-08 11:48 ` [Qemu-devel] [PATCH v2 22/22] virtio: split virtio-serial " Juan Quintela
2018-08-16  7:24   ` Thomas Huth
2018-08-10 10:22 ` [Qemu-devel] [RFC PATCH v2 00/22] More patches to disable stuff Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.