All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 00/14] More patches to disable stuff
@ 2018-07-17 12:04 Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in Juan Quintela
                   ` (15 more replies)
  0 siblings, 16 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Hi

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: 20180717113402.5510-1-quintela@redhat.com

Juan Quintela (14):
  check: Only test ipmi when it is compiled in
  check: Only test megasas when it is compiled in
  check: Only test lsi when it is compiled in
  check: Only test esp when it is compiled in
  check: Only test sga when it is compiled in
  check: Only test usb smartcard when it is compiled in
  check: Only test usb storage when it is compiled in
  check: Only test nvdim_acpi when it is compiled in
  check: Only test virtio-balloon when it is compiled in
  check: Only test virtio-serial when it is compiled in
  check: Only test virtio-rng when it is compiled in
  check: Only test virtio-gpu when it is compiled in
  check: Only test virtio-input when it is compiled in
  check: Only test virtio-scsi when it is compiled in

 hw/virtio/virtio-pci.c    | 15 ++++++++++++---
 tests/Makefile.include    | 36 ++++++++++++++++++------------------
 tests/bios-tables-test.c  |  8 ++++++++
 tests/boot-serial-test.c  |  2 ++
 tests/cdrom-test.c        | 10 ++++++++++
 tests/display-vga-test.c  |  4 ++++
 tests/drive_del-test.c    |  6 ++++++
 tests/usb-hcd-uhci-test.c |  5 ++++-
 tests/usb-hcd-xhci-test.c |  9 ++++++++-
 9 files changed, 72 insertions(+), 23 deletions(-)

-- 
2.17.1

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

* [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 02/14] check: Only test megasas " Juan Quintela
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include   | 4 ++--
 tests/bios-tables-test.c | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 0ac4b960bc..bb1080ecb5 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -260,8 +260,8 @@ check-qtest-i386-y += tests/bios-tables-test$(EXESUF)
 check-qtest-i386-y += tests/boot-serial-test$(EXESUF)
 check-qtest-i386-$(CONFIG_SLIRP) += tests/pxe-test$(EXESUF)
 check-qtest-i386-y += tests/rtc-test$(EXESUF)
-check-qtest-i386-y += tests/ipmi-kcs-test$(EXESUF)
-check-qtest-i386-y += tests/ipmi-bt-test$(EXESUF)
+check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += tests/ipmi-kcs-test$(EXESUF)
+check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += tests/ipmi-bt-test$(EXESUF)
 check-qtest-i386-y += tests/i440fx-test$(EXESUF)
 check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
 check-qtest-i386-y += tests/drive_del-test$(EXESUF)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 4e24930c4b..fd59c7f9a2 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -736,6 +736,7 @@ static void test_acpi_q35_tcg_cphp(void)
     free_test_data(&data);
 }
 
+#ifdef CONFIG_IPMI
 static uint8_t ipmi_required_struct_types[] = {
     0, 1, 3, 4, 16, 17, 19, 32, 38, 127
 };
@@ -772,6 +773,7 @@ static void test_acpi_piix4_tcg_ipmi(void)
                   &data);
     free_test_data(&data);
 }
+#endif
 
 static void test_acpi_q35_tcg_memhp(void)
 {
@@ -875,8 +877,10 @@ int main(int argc, char *argv[])
         qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge);
         qtest_add_func("acpi/q35", test_acpi_q35_tcg);
         qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge);
+#ifdef CONFIG_IPMI
         qtest_add_func("acpi/piix4/ipmi", test_acpi_piix4_tcg_ipmi);
         qtest_add_func("acpi/q35/ipmi", test_acpi_q35_tcg_ipmi);
+#endif
         qtest_add_func("acpi/piix4/cpuhp", test_acpi_piix4_tcg_cphp);
         qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp);
         qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp);
-- 
2.17.1

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

* [Qemu-devel] [PATCH 02/14] check: Only test megasas when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 03/14] check: Only test lsi " Juan Quintela
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 4 ++--
 tests/cdrom-test.c     | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index bb1080ecb5..6565206a78 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -245,8 +245,8 @@ 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_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
+check-qtest-pci-$(CONFIG_MEGASAS_SCSI_PCI) += tests/megasas-test$(EXESUF)
+gcov-files-pci-$(CONFIG_MEGASAS_SCSI_PCI) += hw/scsi/megasas.c
 
 check-qtest-i386-$(CONFIG_ISA_TESTDEV) = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index 7a1fce5dfb..42c29524b8 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -143,12 +143,14 @@ static void add_x86_tests(void)
     qtest_add_data_func("cdrom/boot/lsi53c895a",
                         "-device lsi53c895a -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
+#ifdef CONFIG_MEGASAS_SCSI_PCI
     qtest_add_data_func("cdrom/boot/megasas", "-M q35 "
                         "-device megasas -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
     qtest_add_data_func("cdrom/boot/megasas-gen2", "-M q35 "
                         "-device megasas-gen2 -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
+#endif
 }
 
 static void add_s390x_tests(void)
-- 
2.17.1

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

* [Qemu-devel] [PATCH 03/14] check: Only test lsi when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 02/14] check: Only test megasas " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 04/14] check: Only test esp " Juan Quintela
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/cdrom-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index 42c29524b8..bab2ecc306 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -140,9 +140,11 @@ static void add_x86_tests(void)
     qtest_add_data_func("cdrom/boot/dc390",
                         "-device dc390 -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
+#ifdef CONFIG_LSI_SCSI_PCI
     qtest_add_data_func("cdrom/boot/lsi53c895a",
                         "-device lsi53c895a -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
+#endif
 #ifdef CONFIG_MEGASAS_SCSI_PCI
     qtest_add_data_func("cdrom/boot/megasas", "-M q35 "
                         "-device megasas -device scsi-cd,drive=cd1 "
-- 
2.17.1

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

* [Qemu-devel] [PATCH 04/14] check: Only test esp when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (2 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 03/14] check: Only test lsi " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 05/14] check: Only test sga " Juan Quintela
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/cdrom-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index bab2ecc306..0d7dff6da5 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -134,12 +134,14 @@ static void add_x86_tests(void)
                         "-blockdev file,node-name=cdr,filename=", test_cdboot);
     qtest_add_data_func("cdrom/boot/isapc", "-M isapc "
                         "-drive if=ide,media=cdrom,file=", test_cdboot);
+#ifdef CONFIG_ESP_PCI
     qtest_add_data_func("cdrom/boot/am53c974",
                         "-device am53c974 -device scsi-cd,drive=cd1 "
                         "-drive if=none,id=cd1,format=raw,file=", test_cdboot);
     qtest_add_data_func("cdrom/boot/dc390",
                         "-device dc390 -device scsi-cd,drive=cd1 "
                         "-blockdev file,node-name=cd1,filename=", test_cdboot);
+#endif
 #ifdef CONFIG_LSI_SCSI_PCI
     qtest_add_data_func("cdrom/boot/lsi53c895a",
                         "-device lsi53c895a -device scsi-cd,drive=cd1 "
-- 
2.17.1

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

* [Qemu-devel] [PATCH 05/14] check: Only test sga when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (3 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 04/14] check: Only test esp " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 06/14] check: Only test usb smartcard " Juan Quintela
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/boot-serial-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index 952a2e7ead..3f7c46fdf7 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -87,11 +87,13 @@ static testdef_t tests[] = {
     { "ppc64", "pseries", "", "Open Firmware" },
     { "ppc64", "powernv", "-cpu POWER8", "OPAL" },
     { "ppc64", "sam460ex", "-device e1000", "8086  100e" },
+#ifdef CONFIG_SGA
     { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
     { "i386", "pc", "-device sga", "SGABIOS" },
     { "i386", "q35", "-device sga", "SGABIOS" },
     { "x86_64", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
     { "x86_64", "q35", "-device sga", "SGABIOS" },
+#endif
     { "sparc", "LX", "", "TMS390S10" },
     { "sparc", "SS-4", "", "MB86904" },
     { "sparc", "SS-600MP", "", "TMS390Z55" },
-- 
2.17.1

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

* [Qemu-devel] [PATCH 06/14] check: Only test usb smartcard when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (4 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 05/14] check: Only test sga " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 07/14] check: Only test usb storage " Juan Quintela
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/usb-hcd-xhci-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index 5b1b681bf2..be80c5f032 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -35,6 +35,7 @@ static void test_usb_uas_hotplug(void)
     qtest_qmp_device_del("uas");
 }
 
+#ifdef CONFIG_USB_SMARTCARD
 static void test_usb_ccid_hotplug(void)
 {
     qtest_qmp_device_add("usb-ccid", "ccid", NULL);
@@ -43,6 +44,7 @@ static void test_usb_ccid_hotplug(void)
     qtest_qmp_device_add("usb-ccid", "ccid", NULL);
     qtest_qmp_device_del("ccid");
 }
+#endif
 
 int main(int argc, char **argv)
 {
@@ -53,8 +55,9 @@ int main(int argc, char **argv)
     qtest_add_func("/xhci/pci/init", test_xhci_init);
     qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
     qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
+#ifdef CONFIG_USB_SMARTCARD
     qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
-
+#endif
     qtest_start("-device nec-usb-xhci,id=xhci"
                 " -drive id=drive0,if=none,file=null-co://,format=raw");
     ret = g_test_run();
-- 
2.17.1

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

* [Qemu-devel] [PATCH 07/14] check: Only test usb storage when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (5 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 06/14] check: Only test usb smartcard " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 08/14] check: Only test nvdim_acpi " Juan Quintela
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include    | 2 +-
 tests/usb-hcd-uhci-test.c | 5 ++++-
 tests/usb-hcd-xhci-test.c | 4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 6565206a78..9193945c24 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -284,7 +284,7 @@ check-qtest-i386-$(CONFIG_USB_OHCI) += tests/usb-hcd-ohci-test$(EXESUF)
 gcov-files-i386-$(CONFIG_USB_OHCI) += hw/usb/hcd-ohci.c
 check-qtest-i386-$(CONFIG_USB_UHCI) += tests/usb-hcd-uhci-test$(EXESUF)
 gcov-files-i386-$(CONFIG_USB_UHCI) += hw/usb/hcd-uhci.c
-check-qtest-i386-$(CONFIG_USB_EHCI) += tests/usb-hcd-ehci-test$(EXESUF)
+check-qtest-i386-$(call land, $(CONFIG_USB_EHCI), $(CONFIG_USB_STORAGE_BOT)) += tests/usb-hcd-ehci-test$(EXESUF)
 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
diff --git a/tests/usb-hcd-uhci-test.c b/tests/usb-hcd-uhci-test.c
index 6a7e5a2fed..bf996af6c6 100644
--- a/tests/usb-hcd-uhci-test.c
+++ b/tests/usb-hcd-uhci-test.c
@@ -46,12 +46,14 @@ static void test_uhci_hotplug(void)
     usb_test_hotplug("uhci", 2, test_port_2);
 }
 
+#ifdef CONFIG_USB_STORAGE_BOT
 static void test_usb_storage_hotplug(void)
 {
     qtest_qmp_device_add("usb-storage", "usbdev0", "'drive': 'drive0'");
 
     qtest_qmp_device_del("usbdev0");
 }
+#endif
 
 int main(int argc, char **argv)
 {
@@ -66,8 +68,9 @@ int main(int argc, char **argv)
     qtest_add_func("/uhci/pci/init", test_uhci_init);
     qtest_add_func("/uhci/pci/port1", test_port_1);
     qtest_add_func("/uhci/pci/hotplug", test_uhci_hotplug);
+#ifdef CONFIG_USB_STORAGE_BOT
     qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_hotplug);
-
+#endif
     if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
         qs = qtest_pc_boot(cmd);
     } else if (strcmp(arch, "ppc64") == 0) {
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index be80c5f032..a8996800b2 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -21,6 +21,7 @@ static void test_xhci_hotplug(void)
     usb_test_hotplug("xhci", 1, NULL);
 }
 
+#ifdef CONFIG_USB_STORAGE_UAS
 static void test_usb_uas_hotplug(void)
 {
     qtest_qmp_device_add("usb-uas", "uas", NULL);
@@ -34,6 +35,7 @@ static void test_usb_uas_hotplug(void)
     qtest_qmp_device_del("scsihd");
     qtest_qmp_device_del("uas");
 }
+#endif
 
 #ifdef CONFIG_USB_SMARTCARD
 static void test_usb_ccid_hotplug(void)
@@ -54,7 +56,9 @@ int main(int argc, char **argv)
 
     qtest_add_func("/xhci/pci/init", test_xhci_init);
     qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
+#ifdef CONFIG_USB_STORAGE_UAS
     qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
+#endif
 #ifdef CONFIG_USB_SMARTCARD
     qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
 #endif
-- 
2.17.1

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

* [Qemu-devel] [PATCH 08/14] check: Only test nvdim_acpi when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (6 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 07/14] check: Only test usb storage " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon " Juan Quintela
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/bios-tables-test.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index fd59c7f9a2..1de6e3d58c 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -825,6 +825,7 @@ static void test_acpi_piix4_tcg_numamem(void)
     free_test_data(&data);
 }
 
+#ifdef CONFIG_NVDIM_ACPI
 static void test_acpi_tcg_dimm_pxm(const char *machine)
 {
     test_data data;
@@ -860,6 +861,7 @@ static void test_acpi_piix4_tcg_dimm_pxm(void)
 {
     test_acpi_tcg_dimm_pxm(MACHINE_PC);
 }
+#endif
 
 int main(int argc, char *argv[])
 {
@@ -887,8 +889,10 @@ int main(int argc, char *argv[])
         qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp);
         qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem);
         qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem);
+#ifdef CONFIG_NVDIM_ACPI
         qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm);
         qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
+#endif
     }
     ret = g_test_run();
     boot_sector_cleanup(disk);
-- 
2.17.1

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

* [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (7 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 08/14] check: Only test nvdim_acpi " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:19   ` Cornelia Huck
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 10/14] check: Only test virtio-serial " Juan Quintela
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/virtio-pci.c | 5 ++++-
 tests/Makefile.include | 6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 3a01fe90f0..bdbc7ab78d 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2287,7 +2287,7 @@ static const TypeInfo vhost_vsock_pci_info = {
 #endif
 
 /* virtio-balloon-pci */
-
+#ifdef CONFIG_VIRTIO_BALLOON
 static Property virtio_balloon_pci_properties[] = {
     DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
     DEFINE_PROP_END_OF_LIST(),
@@ -2341,6 +2341,7 @@ static const TypeInfo virtio_balloon_pci_info = {
     .instance_init = virtio_balloon_pci_instance_init,
     .class_init    = virtio_balloon_pci_class_init,
 };
+#endif
 
 /* virtio-serial-pci */
 
@@ -2711,7 +2712,9 @@ static void virtio_pci_register_types(void)
     type_register_static(&vhost_user_blk_pci_info);
 #endif
     type_register_static(&virtio_scsi_pci_info);
+#ifdef CONFIG_VIRTIO_BALLOON
     type_register_static(&virtio_balloon_pci_info);
+#endif
     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 9193945c24..bb30c56795 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-y += tests/virtio-rng-test$(EXESUF)
@@ -397,7 +397,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
 check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
 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-$(CONFIG_VIRTIO_BALLOON) += 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-y += tests/cpu-plug-test$(EXESUF)
-- 
2.17.1

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

* [Qemu-devel] [PATCH 10/14] check: Only test virtio-serial when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (8 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 11/14] check: Only test virtio-rng " Juan Quintela
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 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 bb30c56795..7feda20577 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -204,10 +204,10 @@ 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-y += $(check-qtest-virtioserial-y)
-gcov-files-virtio-y += $(gcov-files-virtioserial-y)
+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-$(CONFIG_VIRTIO_SERIAL) += $(check-qtest-virtioserial-y)
+gcov-files-virtio-$(CONFIG_VIRTIO_SERIAL) += $(gcov-files-virtioserial-y)
 
 check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
-- 
2.17.1

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

* [Qemu-devel] [PATCH 11/14] check: Only test virtio-rng when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (9 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 10/14] check: Only test virtio-serial " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 12/14] check: Only test virtio-gpu " Juan Quintela
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/virtio/virtio-pci.c | 6 ++++--
 tests/Makefile.include | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index bdbc7ab78d..75c96990c0 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2472,7 +2472,7 @@ static const TypeInfo virtio_net_pci_info = {
 };
 
 /* virtio-rng-pci */
-
+#ifdef CONFIG_VIRTIO_RNG
 static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
 {
     VirtIORngPCI *vrng = VIRTIO_RNG_PCI(vpci_dev);
@@ -2521,7 +2521,7 @@ static const TypeInfo virtio_rng_pci_info = {
     .instance_init = virtio_rng_initfn,
     .class_init    = virtio_rng_pci_class_init,
 };
-
+#endif
 /* virtio-input-pci */
 
 static Property virtio_input_pci_properties[] = {
@@ -2693,7 +2693,9 @@ static const TypeInfo virtio_pci_bus_info = {
 
 static void virtio_pci_register_types(void)
 {
+#ifdef CONFIG_VIRTIO_RNG
     type_register_static(&virtio_rng_pci_info);
+#endif
     type_register_static(&virtio_input_pci_info);
     type_register_static(&virtio_input_hid_pci_info);
     type_register_static(&virtio_keyboard_pci_info);
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 7feda20577..a9cb5e926b 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -195,8 +195,8 @@ 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-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] 25+ messages in thread

* [Qemu-devel] [PATCH 12/14] check: Only test virtio-gpu when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (10 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 11/14] check: Only test virtio-rng " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 13/14] check: Only test virtio-input " Juan Quintela
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include   | 4 ++--
 tests/display-vga-test.c | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index a9cb5e926b..c4d68061e5 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -238,8 +238,8 @@ check-qtest-pci-y += tests/display-vga-test$(EXESUF)
 gcov-files-pci-y += hw/display/vga.c
 gcov-files-pci-y += hw/display/cirrus_vga.c
 gcov-files-pci-y += hw/display/vga-pci.c
-gcov-files-pci-y += hw/display/virtio-gpu.c
-gcov-files-pci-y += hw/display/virtio-gpu-pci.c
+gcov-files-pci-$(CONFIG_VIRTIO_GPU) += hw/display/virtio-gpu.c
+gcov-files-pci-$(CONFIG_VIRTIO_GPU) += 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
diff --git a/tests/display-vga-test.c b/tests/display-vga-test.c
index 2d7d24eee0..b716e70a4b 100644
--- a/tests/display-vga-test.c
+++ b/tests/display-vga-test.c
@@ -34,11 +34,13 @@ static void pci_multihead(void)
     qtest_end();
 }
 
+#ifdef CONFIG_VIRTIO_GPU
 static void pci_virtio_gpu(void)
 {
     qtest_start("-vga none -device virtio-gpu-pci");
     qtest_end();
 }
+#endif
 
 #ifdef CONFIG_VIRTIO_VGA
 static void pci_virtio_vga(void)
@@ -61,7 +63,9 @@ int main(int argc, char **argv)
     qtest_add_func("/display/pci/stdvga", pci_stdvga);
     qtest_add_func("/display/pci/secondary", pci_secondary);
     qtest_add_func("/display/pci/multihead", pci_multihead);
+#ifdef CONFIG_VIRTIO_GPU
     qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
+#endif
 #ifdef CONFIG_VIRTIO_VGA
     qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
 #endif
-- 
2.17.1

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

* [Qemu-devel] [PATCH 13/14] check: Only test virtio-input when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (11 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 12/14] check: Only test virtio-gpu " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 14/14] check: Only test virtio-scsi " Juan Quintela
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

The full of it.  Introspection is able to search for drivers that you
aren't there, so just disable it.

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

diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 75c96990c0..987d7c0a5a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2524,6 +2524,7 @@ static const TypeInfo virtio_rng_pci_info = {
 #endif
 /* virtio-input-pci */
 
+#ifdef CONFIG_VIRTIO_INPUT
 static Property virtio_input_pci_properties[] = {
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
     DEFINE_PROP_END_OF_LIST(),
@@ -2645,6 +2646,7 @@ static const TypeInfo virtio_host_pci_info = {
     .instance_init = virtio_host_initfn,
 };
 #endif
+#endif
 
 /* virtio-pci-bus */
 
@@ -2696,6 +2698,7 @@ static void virtio_pci_register_types(void)
 #ifdef CONFIG_VIRTIO_RNG
     type_register_static(&virtio_rng_pci_info);
 #endif
+#ifdef CONFIG_VIRTIO_INPUT
     type_register_static(&virtio_input_pci_info);
     type_register_static(&virtio_input_hid_pci_info);
     type_register_static(&virtio_keyboard_pci_info);
@@ -2703,6 +2706,7 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_tablet_pci_info);
 #ifdef CONFIG_LINUX
     type_register_static(&virtio_host_pci_info);
+#endif
 #endif
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
-- 
2.17.1

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

* [Qemu-devel] [PATCH 14/14] check: Only test virtio-scsi when it is compiled in
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (12 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 13/14] check: Only test virtio-input " Juan Quintela
@ 2018-07-17 12:04 ` Juan Quintela
  2018-07-17 12:18 ` [Qemu-devel] [RFC 00/14] More patches to disable stuff Thomas Huth
  2018-07-17 13:38 ` Paolo Bonzini
  15 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 12:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dgilbert, lvivier, peterx

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 tests/Makefile.include | 4 ++--
 tests/cdrom-test.c     | 4 ++++
 tests/drive_del-test.c | 6 ++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index c4d68061e5..74ee02348c 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
diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index 0d7dff6da5..46ec5d43e9 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -129,9 +129,11 @@ static void test_cdboot(gconstpointer data)
 static void add_x86_tests(void)
 {
     qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot);
+#ifdef CONFIG_VIRTIO_SCSI
     qtest_add_data_func("cdrom/boot/virtio-scsi",
                         "-device virtio-scsi -device scsi-cd,drive=cdr "
                         "-blockdev file,node-name=cdr,filename=", test_cdboot);
+#endif
     qtest_add_data_func("cdrom/boot/isapc", "-M isapc "
                         "-drive if=ide,media=cdrom,file=", test_cdboot);
 #ifdef CONFIG_ESP_PCI
@@ -160,9 +162,11 @@ static void add_x86_tests(void)
 static void add_s390x_tests(void)
 {
     qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot);
+#ifdef CONFIG_VIRTIO_SCSI
     qtest_add_data_func("cdrom/boot/virtio-scsi",
                         "-device virtio-scsi -device scsi-cd,drive=cdr "
                         "-blockdev file,node-name=cdr,filename=", test_cdboot);
+#endif
 }
 
 int main(int argc, char **argv)
diff --git a/tests/drive_del-test.c b/tests/drive_del-test.c
index 852fefc8f3..d6f010269a 100644
--- a/tests/drive_del-test.c
+++ b/tests/drive_del-test.c
@@ -31,6 +31,7 @@ static void drive_del(void)
     g_free(resp);
 }
 
+#ifdef CONFIG_VIRTIO_SCSI
 static void device_del(void)
 {
     QDict *response;
@@ -43,6 +44,7 @@ static void device_del(void)
     g_assert(qdict_haskey(response, "return"));
     qobject_unref(response);
 }
+#endif
 
 static void test_drive_without_dev(void)
 {
@@ -91,6 +93,7 @@ static void test_after_failed_device_add(void)
     qtest_end();
 }
 
+#ifdef CONFIG_VIRTIO_SCSI
 static void test_drive_del_device_del(void)
 {
     char *args;
@@ -112,6 +115,7 @@ static void test_drive_del_device_del(void)
     qtest_end();
     g_free(args);
 }
+#endif
 
 int main(int argc, char **argv)
 {
@@ -127,8 +131,10 @@ int main(int argc, char **argv)
         !strcmp(arch, "s390x")) {
         qtest_add_func("/drive_del/after_failed_device_add",
                        test_after_failed_device_add);
+#ifdef CONFIG_VIRTIO_SCSI
         qtest_add_func("/blockdev/drive_del_device_del",
                        test_drive_del_device_del);
+#endif
     }
 
     return g_test_run();
-- 
2.17.1

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (13 preceding siblings ...)
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 14/14] check: Only test virtio-scsi " Juan Quintela
@ 2018-07-17 12:18 ` Thomas Huth
  2018-07-17 17:00   ` Juan Quintela
  2018-07-17 13:38 ` Paolo Bonzini
  15 siblings, 1 reply; 25+ messages in thread
From: Thomas Huth @ 2018-07-17 12:18 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 17.07.2018 14:04, Juan Quintela wrote:
> Hi
> 
> 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?

I think this is the wrong way to go. If you add #ifdefs to the sources,
you have to make the binaries target-specific. Currently each test
binary can work for each target architecture. With #ifdefs, that's not
possible anymore. So please don't do that.

If you want to make the tests more flexible for configuration, please
use QOM instead to check whether the devices are available or not.

 Thomas

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

* Re: [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon when it is compiled in
  2018-07-17 12:04 ` [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon " Juan Quintela
@ 2018-07-17 12:19   ` Cornelia Huck
  2018-07-17 17:19     ` Juan Quintela
  0 siblings, 1 reply; 25+ messages in thread
From: Cornelia Huck @ 2018-07-17 12:19 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On Tue, 17 Jul 2018 14:04:09 +0200
Juan Quintela <quintela@redhat.com> wrote:

> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/virtio/virtio-pci.c | 5 ++++-
>  tests/Makefile.include | 6 +++---
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 3a01fe90f0..bdbc7ab78d 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -2287,7 +2287,7 @@ static const TypeInfo vhost_vsock_pci_info = {
>  #endif
>  
>  /* virtio-balloon-pci */
> -
> +#ifdef CONFIG_VIRTIO_BALLOON
>  static Property virtio_balloon_pci_properties[] = {
>      DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
>      DEFINE_PROP_END_OF_LIST(),
> @@ -2341,6 +2341,7 @@ static const TypeInfo virtio_balloon_pci_info = {
>      .instance_init = virtio_balloon_pci_instance_init,
>      .class_init    = virtio_balloon_pci_class_init,
>  };
> +#endif
>  
>  /* virtio-serial-pci */
>  
> @@ -2711,7 +2712,9 @@ static void virtio_pci_register_types(void)
>      type_register_static(&vhost_user_blk_pci_info);
>  #endif
>      type_register_static(&virtio_scsi_pci_info);
> +#ifdef CONFIG_VIRTIO_BALLOON
>      type_register_static(&virtio_balloon_pci_info);
> +#endif
>      type_register_static(&virtio_serial_pci_info);
>      type_register_static(&virtio_net_pci_info);
>  #ifdef CONFIG_VHOST_SCSI

You only make virtio-balloon-pci conditional...

> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 9193945c24..bb30c56795 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-y += tests/virtio-rng-test$(EXESUF)
> @@ -397,7 +397,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) += tests/test-netfilter$(EXESUF)
>  check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
>  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-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)

...but the test uses virtio-balloon-ccw on s390x.

>  check-qtest-s390x-y += tests/virtio-console-test$(EXESUF)
>  check-qtest-s390x-y += tests/virtio-serial-test$(EXESUF)
>  check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF)

Same for the other virtio device types.

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
                   ` (14 preceding siblings ...)
  2018-07-17 12:18 ` [Qemu-devel] [RFC 00/14] More patches to disable stuff Thomas Huth
@ 2018-07-17 13:38 ` Paolo Bonzini
  2018-07-17 17:01   ` Juan Quintela
  15 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2018-07-17 13:38 UTC (permalink / raw)
  To: Juan Quintela, qemu-devel; +Cc: lvivier, dgilbert, peterx

On 17/07/2018 14:04, Juan Quintela wrote:
> Hi
> 
> 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.

Emanuele's GSoC project will be able to do this automatically; tests are
defined to "consume" some devices, and are not enabled unless the device
is present.

Thanks,

Paolo

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-17 12:18 ` [Qemu-devel] [RFC 00/14] More patches to disable stuff Thomas Huth
@ 2018-07-17 17:00   ` Juan Quintela
  2018-07-19 11:06     ` Thomas Huth
  0 siblings, 1 reply; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 17:00 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, lvivier, dgilbert, peterx

Thomas Huth <thuth@redhat.com> wrote:
> On 17.07.2018 14:04, Juan Quintela wrote:
>> Hi
>> 
>> 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?
>
> I think this is the wrong way to go. If you add #ifdefs to the sources,
> you have to make the binaries target-specific. Currently each test
> binary can work for each target architecture. With #ifdefs, that's not
> possible anymore. So please don't do that.

As the system goes now, you have something enabled if it is enabled for
any _configuration_, that is what config-all-devices.mak is supposed to
do.

> If you want to make the tests more flexible for configuration, please
> use QOM instead to check whether the devices are available or not.

QOM is the problem, not the solution (TM).  Uninteresting bits deleted.

tests/device-instrospect-test.c

static void test_device_intro_concrete(void)
{
    ...
    types = device_type_list(false);
    ...
}

static QList *device_type_list(bool abstract)
{
    return qom_list_types("device", abstract);
}

static QList *qom_list_types(const char *implements, bool abstract)
{
    QDict *resp;
    QList *ret;
    QDict *args = qdict_new();

    qdict_put_bool(args, "abstract", abstract);
    if (implements) {
        qdict_put_str(args, "implements", implements);
    }
    resp = qmp("{'execute': 'qom-list-types',"
               " 'arguments': %p }", args);
    g_assert(qdict_haskey(resp, "return"));
    ret = qdict_get_qlist(resp, "return");
    qobject_ref(ret);
    qobject_unref(resp);
    return ret;
}

If I disable CONFIG_VIRTIO_RNG, then I don't compile
common-obj-$(CONFIG_VIRTIO_RNG) += virtio-rng.o

So far so good, but look at virtio-pci.c:

static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
{
   ...
}

static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
{
   ....
}

static void virtio_rng_initfn(Object *obj)
{
   ...
}

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_pci_register_types(void)
{
    type_register_static(&virtio_rng_pci_info);
...
}

See, we have defined the device "virtio-rng-pci", but there is no
implementation.  WHen I run device-intronspection-test on that qemu with
CONFIG_VIRTIO_RNG, it fails to run.  If we can agree that something is
wrong, then we can search for a solution.  I send this patches as an RFC
to ask for what people think is the best solution, or if we should even
bother in fix that.

Later, JUan.

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-17 13:38 ` Paolo Bonzini
@ 2018-07-17 17:01   ` Juan Quintela
  0 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 17:01 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, lvivier, dgilbert, peterx

Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 17/07/2018 14:04, Juan Quintela wrote:
>> Hi
>> 
>> 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.
>
> Emanuele's GSoC project will be able to do this automatically; tests are
> defined to "consume" some devices, and are not enabled unless the device
> is present.

Nice.  Thanks.

>
> Thanks,
>
> Paolo

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

* Re: [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon when it is compiled in
  2018-07-17 12:19   ` Cornelia Huck
@ 2018-07-17 17:19     ` Juan Quintela
  0 siblings, 0 replies; 25+ messages in thread
From: Juan Quintela @ 2018-07-17 17:19 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: qemu-devel, lvivier, dgilbert, peterx

Cornelia Huck <cohuck@redhat.com> wrote:
> On Tue, 17 Jul 2018 14:04:09 +0200
> Juan Quintela <quintela@redhat.com> wrote:
>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  hw/virtio/virtio-pci.c | 5 ++++-
>>  tests/Makefile.include | 6 +++---
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>> 
>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>> index 3a01fe90f0..bdbc7ab78d 100644
>> --- a/hw/virtio/virtio-pci.c
>> +++ b/hw/virtio/virtio-pci.c
>> @@ -2287,7 +2287,7 @@ static const TypeInfo vhost_vsock_pci_info = {
>>  #endif
>>  
>>  /* virtio-balloon-pci */
>> -
>> +#ifdef CONFIG_VIRTIO_BALLOON
>>  static Property virtio_balloon_pci_properties[] = {
>>      DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
>>      DEFINE_PROP_END_OF_LIST(),
>> @@ -2341,6 +2341,7 @@ static const TypeInfo virtio_balloon_pci_info = {
>>      .instance_init = virtio_balloon_pci_instance_init,
>>      .class_init    = virtio_balloon_pci_class_init,
>>  };
>> +#endif
>>  
>>  /* virtio-serial-pci */
>>  
>> @@ -2711,7 +2712,9 @@ static void virtio_pci_register_types(void)
>>      type_register_static(&vhost_user_blk_pci_info);
>>  #endif
>>      type_register_static(&virtio_scsi_pci_info);
>> +#ifdef CONFIG_VIRTIO_BALLOON
>>      type_register_static(&virtio_balloon_pci_info);
>> +#endif
>>      type_register_static(&virtio_serial_pci_info);
>>      type_register_static(&virtio_net_pci_info);
>>  #ifdef CONFIG_VHOST_SCSI
>
> You only make virtio-balloon-pci conditional...
>
>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>> index 9193945c24..bb30c56795 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-y += tests/virtio-rng-test$(EXESUF)
>> @@ -397,7 +397,7 @@ check-qtest-s390x-$(CONFIG_SLIRP) +=
>> tests/test-netfilter$(EXESUF)
>>  check-qtest-s390x-$(CONFIG_POSIX) += tests/test-filter-mirror$(EXESUF)
>>  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-$(CONFIG_VIRTIO_BALLOON) += tests/virtio-balloon-test$(EXESUF)
>
> ...but the test uses virtio-balloon-ccw on s390x.

I didn't compile check on s390x, you can guess.

>>  check-qtest-s390x-y += tests/virtio-console-test$(EXESUF)
>>  check-qtest-s390x-y += tests/virtio-serial-test$(EXESUF)
>>  check-qtest-s390x-y += tests/cpu-plug-test$(EXESUF)
>
> Same for the other virtio device types.

I put somewhere on the cover letter that usb & virtio are a mess.
Virtio devices:
- are pci in everything
- except on s390 (kind of)
- and some old arm boards (kind of)

Add test stuff there, and it is a royal mess.  I don't really know what
is the best way to test this kind of thing without complicating (still
more) the testing directory.  This is an RFC to agree about how to go
from here.  Notice that Paolo said that there is GSOC student to do
something on this area.

Thanks, Juan.

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-17 17:00   ` Juan Quintela
@ 2018-07-19 11:06     ` Thomas Huth
  2018-07-19 11:45       ` Cornelia Huck
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Huth @ 2018-07-19 11:06 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel, lvivier, dgilbert, peterx

On 17.07.2018 19:00, Juan Quintela wrote:
> Thomas Huth <thuth@redhat.com> wrote:
>> On 17.07.2018 14:04, Juan Quintela wrote:
>>> Hi
>>>
>>> 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?
>>
>> I think this is the wrong way to go. If you add #ifdefs to the sources,
>> you have to make the binaries target-specific. Currently each test
>> binary can work for each target architecture. With #ifdefs, that's not
>> possible anymore. So please don't do that.
> 
> As the system goes now, you have something enabled if it is enabled for
> any _configuration_, that is what config-all-devices.mak is supposed to
> do.

We certainly need this for common, target-independent code. Using
#ifdefs for common code will only cause confusion for people who are not
aware of the common vs. target-specific code compilation yet.

>> If you want to make the tests more flexible for configuration, please
>> use QOM instead to check whether the devices are available or not.
> 
> QOM is the problem, not the solution (TM).  Uninteresting bits deleted.
> 
> tests/device-instrospect-test.c
> 
> static void test_device_intro_concrete(void)
> {
>     ...
>     types = device_type_list(false);
>     ...
> }
> 
> static QList *device_type_list(bool abstract)
> {
>     return qom_list_types("device", abstract);
> }
> 
> static QList *qom_list_types(const char *implements, bool abstract)
> {
>     QDict *resp;
>     QList *ret;
>     QDict *args = qdict_new();
> 
>     qdict_put_bool(args, "abstract", abstract);
>     if (implements) {
>         qdict_put_str(args, "implements", implements);
>     }
>     resp = qmp("{'execute': 'qom-list-types',"
>                " 'arguments': %p }", args);
>     g_assert(qdict_haskey(resp, "return"));
>     ret = qdict_get_qlist(resp, "return");
>     qobject_ref(ret);
>     qobject_unref(resp);
>     return ret;
> }
> 
> If I disable CONFIG_VIRTIO_RNG, then I don't compile
> common-obj-$(CONFIG_VIRTIO_RNG) += virtio-rng.o
> 
> So far so good, but look at virtio-pci.c:
> 
> static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> {
>    ...
> }
> 
> static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
> {
>    ....
> }
> 
> static void virtio_rng_initfn(Object *obj)
> {
>    ...
> }
> 
> 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_pci_register_types(void)
> {
>     type_register_static(&virtio_rng_pci_info);
> ...
> }
> 
> See, we have defined the device "virtio-rng-pci", but there is no
> implementation.  WHen I run device-intronspection-test on that qemu with
> CONFIG_VIRTIO_RNG, it fails to run.  If we can agree that something is
> wrong, then we can search for a solution.

I agree with you that the current situation with virtio-pci. c is bad. I
think we should split it up into individual files instead
(virtio-pci-rng.c etc.).

 Thomas

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-19 11:06     ` Thomas Huth
@ 2018-07-19 11:45       ` Cornelia Huck
  2018-07-19 11:58         ` Thomas Huth
  0 siblings, 1 reply; 25+ messages in thread
From: Cornelia Huck @ 2018-07-19 11:45 UTC (permalink / raw)
  To: Thomas Huth; +Cc: quintela, lvivier, qemu-devel, peterx, dgilbert

On Thu, 19 Jul 2018 13:06:59 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 17.07.2018 19:00, Juan Quintela wrote:

> > So far so good, but look at virtio-pci.c:
> > 
> > static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
> > {
> >    ...
> > }
> > 
> > static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
> > {
> >    ....
> > }
> > 
> > static void virtio_rng_initfn(Object *obj)
> > {
> >    ...
> > }
> > 
> > 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_pci_register_types(void)
> > {
> >     type_register_static(&virtio_rng_pci_info);
> > ...
> > }
> > 
> > See, we have defined the device "virtio-rng-pci", but there is no
> > implementation.  WHen I run device-intronspection-test on that qemu with
> > CONFIG_VIRTIO_RNG, it fails to run.  If we can agree that something is
> > wrong, then we can search for a solution.  
> 
> I agree with you that the current situation with virtio-pci. c is bad. I
> think we should split it up into individual files instead
> (virtio-pci-rng.c etc.).

We should then do the same thing for virtio-ccw as well.

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-19 11:45       ` Cornelia Huck
@ 2018-07-19 11:58         ` Thomas Huth
  2018-07-19 12:04           ` Cornelia Huck
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Huth @ 2018-07-19 11:58 UTC (permalink / raw)
  To: Cornelia Huck; +Cc: quintela, lvivier, qemu-devel, peterx, dgilbert

On 19.07.2018 13:45, Cornelia Huck wrote:
> On Thu, 19 Jul 2018 13:06:59 +0200
> Thomas Huth <thuth@redhat.com> wrote:
> 
>> On 17.07.2018 19:00, Juan Quintela wrote:
> 
>>> So far so good, but look at virtio-pci.c:
>>>
>>> static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
>>> {
>>>    ...
>>> }
>>>
>>> static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
>>> {
>>>    ....
>>> }
>>>
>>> static void virtio_rng_initfn(Object *obj)
>>> {
>>>    ...
>>> }
>>>
>>> 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_pci_register_types(void)
>>> {
>>>     type_register_static(&virtio_rng_pci_info);
>>> ...
>>> }
>>>
>>> See, we have defined the device "virtio-rng-pci", but there is no
>>> implementation.  WHen I run device-intronspection-test on that qemu with
>>> CONFIG_VIRTIO_RNG, it fails to run.  If we can agree that something is
>>> wrong, then we can search for a solution.  
>>
>> I agree with you that the current situation with virtio-pci. c is bad. I
>> think we should split it up into individual files instead
>> (virtio-pci-rng.c etc.).
> 
> We should then do the same thing for virtio-ccw as well.

Yes. I can do that if you like.

 Thomas

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

* Re: [Qemu-devel] [RFC 00/14] More patches to disable stuff
  2018-07-19 11:58         ` Thomas Huth
@ 2018-07-19 12:04           ` Cornelia Huck
  0 siblings, 0 replies; 25+ messages in thread
From: Cornelia Huck @ 2018-07-19 12:04 UTC (permalink / raw)
  To: Thomas Huth; +Cc: quintela, lvivier, qemu-devel, peterx, dgilbert

On Thu, 19 Jul 2018 13:58:02 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On 19.07.2018 13:45, Cornelia Huck wrote:
> > On Thu, 19 Jul 2018 13:06:59 +0200
> > Thomas Huth <thuth@redhat.com> wrote:

> >> I agree with you that the current situation with virtio-pci. c is bad. I
> >> think we should split it up into individual files instead
> >> (virtio-pci-rng.c etc.).  
> > 
> > We should then do the same thing for virtio-ccw as well.  
> 
> Yes. I can do that if you like.

Sure, feel free to go ahead.

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

end of thread, other threads:[~2018-07-19 12:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 12:04 [Qemu-devel] [RFC 00/14] More patches to disable stuff Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 01/14] check: Only test ipmi when it is compiled in Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 02/14] check: Only test megasas " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 03/14] check: Only test lsi " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 04/14] check: Only test esp " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 05/14] check: Only test sga " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 06/14] check: Only test usb smartcard " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 07/14] check: Only test usb storage " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 08/14] check: Only test nvdim_acpi " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 09/14] check: Only test virtio-balloon " Juan Quintela
2018-07-17 12:19   ` Cornelia Huck
2018-07-17 17:19     ` Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 10/14] check: Only test virtio-serial " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 11/14] check: Only test virtio-rng " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 12/14] check: Only test virtio-gpu " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 13/14] check: Only test virtio-input " Juan Quintela
2018-07-17 12:04 ` [Qemu-devel] [PATCH 14/14] check: Only test virtio-scsi " Juan Quintela
2018-07-17 12:18 ` [Qemu-devel] [RFC 00/14] More patches to disable stuff Thomas Huth
2018-07-17 17:00   ` Juan Quintela
2018-07-19 11:06     ` Thomas Huth
2018-07-19 11:45       ` Cornelia Huck
2018-07-19 11:58         ` Thomas Huth
2018-07-19 12:04           ` Cornelia Huck
2018-07-17 13:38 ` Paolo Bonzini
2018-07-17 17:01   ` Juan Quintela

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.