From 24f7eeed9ad7f90975c2da44425d15b8f0837120 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Tue, 21 Jan 2020 10:28:13 +0100 Subject: [PATCH 01/14] test-logging: Fix -Werror=maybe-uninitialized warning Checking for uninitialized variables raises warning for file path variables in test_logfile_write and test_logfile_lock functions. To suppress this warning, initialize varibles to NULL. This is safe change as result of g_build_filename is stored to them before any usage. Signed-off-by: Miroslav Rezanina Message-Id: <63b0fcedf7dfe799c8210b113e5dccf32414a89d.1579598240.git.mrezanin@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Robert Foley Signed-off-by: Thomas Huth --- tests/test-logging.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 1e646f045d..6387e4933f 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -114,8 +114,8 @@ static void test_logfile_write(gconstpointer data) QemuLogFile *logfile2; gchar const *dir = data; Error *err = NULL; - g_autofree gchar *file_path; - g_autofree gchar *file_path1; + g_autofree gchar *file_path = NULL; + g_autofree gchar *file_path1 = NULL; FILE *orig_fd; /* @@ -157,7 +157,7 @@ static void test_logfile_lock(gconstpointer data) FILE *logfile; gchar const *dir = data; Error *err = NULL; - g_autofree gchar *file_path; + g_autofree gchar *file_path = NULL; file_path = g_build_filename(dir, "qemu_test_logfile_lock0.log", NULL); From 4eb387267ee7604239be2fbd45e5cb34de93d6d8 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 17 Jan 2020 12:26:48 +0000 Subject: [PATCH 02/14] tests/vhost-user-bridge: Fix build vhost-user-bridge isn't actually a test, it's just a helper (that should probably move somewhere else) - but the build was broken in the qtest move. Fixes: 833884f37adc9f125fa2 Signed-off-by: Dr. David Alan Gilbert Message-Id: <20200117122648.137862-1-dgilbert@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/Makefile.include | 1 + tests/qtest/Makefile.include | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index a1bff5dcce..fe63fec5f1 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -586,6 +586,7 @@ include $(SRC_PATH)/tests/qtest/Makefile.include tests/test-qga$(EXESUF): qemu-ga$(EXESUF) tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y) +tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a SPEED = quick diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include index e6bb4ab28c..eb0f23b108 100644 --- a/tests/qtest/Makefile.include +++ b/tests/qtest/Makefile.include @@ -290,7 +290,6 @@ tests/qtest/test-filter-redirector$(EXESUF): tests/qtest/test-filter-redirector. tests/qtest/test-x86-cpuid-compat$(EXESUF): tests/qtest/test-x86-cpuid-compat.o $(qtest-obj-y) tests/qtest/ivshmem-test$(EXESUF): tests/qtest/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y) tests/qtest/dbus-vmstate-test$(EXESUF): tests/qtest/dbus-vmstate-test.o tests/qtest/migration-helpers.o tests/qtest/dbus-vmstate1.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y) -tests/qtest/vhost-user-bridge$(EXESUF): tests/qtest/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a tests/qtest/test-arm-mptimer$(EXESUF): tests/qtest/test-arm-mptimer.o tests/qtest/numa-test$(EXESUF): tests/qtest/numa-test.o tests/qtest/vmgenid-test$(EXESUF): tests/qtest/vmgenid-test.o tests/qtest/boot-sector.o tests/qtest/acpi-utils.o From 316082b119d7b9f62753c3d245de911f2a33fb79 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 22 Jan 2020 14:40:20 +0100 Subject: [PATCH 03/14] docs/devel: Fix qtest paths and info about check-block in testing.rst The qtests have recently been moved to a separate subdirectory, so the paths that are mentioned in the documentation have to be adjusted accordingly. And some of the iotests are now always run as part of "make check", so this information has to be adjusted here, too. Message-Id: <20200122134511.23806-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index ab5be0c729..770a987ea4 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -16,8 +16,8 @@ The usual way to run these tests is: make check -which includes QAPI schema tests, unit tests, and QTests. Different sub-types -of "make check" tests will be explained below. +which includes QAPI schema tests, unit tests, QTests and some iotests. +Different sub-types of "make check" tests will be explained below. Before running tests, it is best to build QEMU programs first. Some tests expect the executables to exist and will fail with obscure messages if they @@ -79,8 +79,8 @@ QTest cases can be executed with make check-qtest -The QTest library is implemented by ``tests/libqtest.c`` and the API is defined -in ``tests/libqtest.h``. +The QTest library is implemented by ``tests/qtest/libqtest.c`` and the API is +defined in ``tests/qtest/libqtest.h``. Consider adding a new QTest case when you are introducing a new virtual hardware, or extending one if you are adding functionalities to an existing @@ -94,20 +94,20 @@ libqos instead of directly calling into libqtest. Steps to add a new QTest case are: 1. Create a new source file for the test. (More than one file can be added as - necessary.) For example, ``tests/test-foo-device.c``. + necessary.) For example, ``tests/qtest/foo-test.c``. 2. Write the test code with the glib and libqtest/libqos API. See also existing tests and the library headers for reference. -3. Register the new test in ``tests/Makefile.include``. Add the test executable - name to an appropriate ``check-qtest-*-y`` variable. For example: +3. Register the new test in ``tests/qtest/Makefile.include``. Add the test + executable name to an appropriate ``check-qtest-*-y`` variable. For example: - ``check-qtest-generic-y = tests/test-foo-device$(EXESUF)`` + ``check-qtest-generic-y = tests/qtest/foo-test$(EXESUF)`` 4. Add object dependencies of the executable in the Makefile, including the test source file(s) and other interesting objects. For example: - ``tests/test-foo-device$(EXESUF): tests/test-foo-device.o $(libqos-obj-y)`` + ``tests/qtest/foo-test$(EXESUF): tests/qtest/foo-test.o $(libqos-obj-y)`` Debugging a QTest failure is slightly harder than the unit test because the tests look up QEMU program names in the environment variables, such as @@ -152,8 +152,9 @@ parser (either fixing a bug or extending/modifying the syntax). To do this: check-block ----------- -``make check-block`` is a legacy command to invoke block layer iotests and is -rarely used. See "QEMU iotests" section below for more information. +``make check-block`` runs a subset of the block layer iotests (the tests that +are in the "auto" group in ``tests/qemu-iotests/group``). +See the "QEMU iotests" section below for more information. GCC gcov support ---------------- From ab00cf4d73150822f24ca6cf762595a8c0cda452 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 27 Jan 2020 14:44:35 +0100 Subject: [PATCH 04/14] tests/Makefile: Fix inclusion of the qos dependency files The qos dependency files can be found under tests/qtest/libqos and not under tests/qtest/qos. Fixes: 1cf4323ecd0 ("Move the libqos files under tests/qtest/") Message-Id: <20200127140245.20065-1-thuth@redhat.com> Reviewed-by: Laurent Vivier Signed-off-by: Thomas Huth --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index fe63fec5f1..2f1cafed72 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -919,6 +919,6 @@ all: $(QEMU_IOTESTS_HELPERS-y) -include $(wildcard tests/*.d) -include $(wildcard tests/qtest/*.d) --include $(wildcard tests/qtest/qos/*.d) +-include $(wildcard tests/qtest/libqos/*.d) endif From 77c24259b635c2c858e2b5ae61363843c4d88560 Mon Sep 17 00:00:00 2001 From: Pan Nengyuan Date: Mon, 3 Feb 2020 10:59:35 +0800 Subject: [PATCH 05/14] boot-order-test: fix memleaks in boot-order-test It's not a big deal, but 'check qtest-ppc/ppc64' runs fail if sanitizers is enabled. The memory leak stack is as follow: Direct leak of 128 byte(s) in 4 object(s) allocated from: #0 0x7f11756f5970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) #1 0x7f1174f2549d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d) #2 0x556af05aa7da in mm_fw_cfg_init /mnt/sdb/qemu/tests/libqos/fw_cfg.c:119 #3 0x556af059f4f5 in read_boot_order_pmac /mnt/sdb/qemu/tests/boot-order-test.c:137 #4 0x556af059efe2 in test_a_boot_order /mnt/sdb/qemu/tests/boot-order-test.c:47 #5 0x556af059f2c0 in test_boot_orders /mnt/sdb/qemu/tests/boot-order-test.c:59 #6 0x556af059f52d in test_pmac_oldworld_boot_order /mnt/sdb/qemu/tests/boot-order-test.c:152 #7 0x7f1174f46cb9 (/lib64/libglib-2.0.so.0+0x73cb9) #8 0x7f1174f46b73 (/lib64/libglib-2.0.so.0+0x73b73) #9 0x7f1174f46b73 (/lib64/libglib-2.0.so.0+0x73b73) #10 0x7f1174f46f71 in g_test_run_suite (/lib64/libglib-2.0.so.0+0x73f71) #11 0x7f1174f46f94 in g_test_run (/lib64/libglib-2.0.so.0+0x73f94) Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Message-Id: <20200203025935.36228-1-pannengyuan@huawei.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/boot-order-test.c | 6 +++--- tests/qtest/libqos/fw_cfg.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot-order-test.c index 4a6218a516..2f1c07221c 100644 --- a/tests/qtest/boot-order-test.c +++ b/tests/qtest/boot-order-test.c @@ -110,7 +110,7 @@ static void test_pc_boot_order(void) static uint64_t read_boot_order_pmac(QTestState *qts) { - QFWCFG *fw_cfg = mm_fw_cfg_init(qts, 0xf0000510); + g_autoptr(QFWCFG) fw_cfg = mm_fw_cfg_init(qts, 0xf0000510); return qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_DEVICE); } @@ -135,7 +135,7 @@ static void test_pmac_newworld_boot_order(void) static uint64_t read_boot_order_sun4m(QTestState *qts) { - QFWCFG *fw_cfg = mm_fw_cfg_init(qts, 0xd00000510ULL); + g_autoptr(QFWCFG) fw_cfg = mm_fw_cfg_init(qts, 0xd00000510ULL); return qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_DEVICE); } @@ -147,7 +147,7 @@ static void test_sun4m_boot_order(void) static uint64_t read_boot_order_sun4u(QTestState *qts) { - QFWCFG *fw_cfg = io_fw_cfg_init(qts, 0x510); + g_autoptr(QFWCFG) fw_cfg = io_fw_cfg_init(qts, 0x510); return qfw_cfg_get_u16(fw_cfg, FW_CFG_BOOT_DEVICE); } diff --git a/tests/qtest/libqos/fw_cfg.h b/tests/qtest/libqos/fw_cfg.h index 13325cc4ff..c6a7cf8cf0 100644 --- a/tests/qtest/libqos/fw_cfg.h +++ b/tests/qtest/libqos/fw_cfg.h @@ -49,4 +49,6 @@ static inline void pc_fw_cfg_uninit(QFWCFG *fw_cfg) io_fw_cfg_uninit(fw_cfg); } +G_DEFINE_AUTOPTR_CLEANUP_FUNC(QFWCFG, mm_fw_cfg_uninit) + #endif From c66e8ab0e3af8fb163a7de8fa2df2dd69858a894 Mon Sep 17 00:00:00 2001 From: Heyi Guo Date: Sun, 2 Feb 2020 19:00:09 +0800 Subject: [PATCH 06/14] tests/qtest: update comments about bios-tables-test-allowed-diff.h Update comments in tests/qtest/bios-tables-test.c to reflect the current path of bios-tables-test-allowed-diff.h, which is now under tests/qtest/ as well. Signed-off-by: Heyi Guo Message-Id: <20200202110009.51479-1-guoheyi@huawei.com> Reviewed-by: Thomas Huth Reviewed-by: Igor Mammedov Signed-off-by: Thomas Huth --- tests/qtest/bios-tables-test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 3ab4872bd7..b4752c644c 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -14,14 +14,14 @@ * How to add or update the tests: * Contributor: * 1. add empty files for new tables, if any, under tests/data/acpi - * 2. list any changed files in tests/bios-tables-test-allowed-diff.h + * 2. list any changed files in tests/qtest/bios-tables-test-allowed-diff.h * 3. commit the above *before* making changes that affect the tables * * Contributor or ACPI Maintainer (steps 4-7 need to be redone to resolve conflicts * in binary commit created in step 6): * * After 1-3 above tests will pass but ignore differences with the expected files. - * You will also notice that tests/bios-tables-test-allowed-diff.h lists + * You will also notice that tests/qtest/bios-tables-test-allowed-diff.h lists * a bunch of files. This is your hint that you need to do the below: * 4. Run * make check V=1 @@ -40,14 +40,14 @@ * in commit log. * 7. Before sending patches to the list (Contributor) * or before doing a pull request (Maintainer), make sure - * tests/bios-tables-test-allowed-diff.h is empty - this will ensure + * tests/qtest/bios-tables-test-allowed-diff.h is empty - this will ensure * following changes to ACPI tables will be noticed. * * The resulting patchset/pull request then looks like this: - * - patch 1: list changed files in tests/bios-tables-test-allowed-diff.h. + * - patch 1: list changed files in tests/qtest/bios-tables-test-allowed-diff.h. * - patches 2 - n: real changes, may contain multiple patches. * - patch n + 1: update golden master binaries and empty - * tests/bios-tables-test-allowed-diff.h + * tests/qtest/bios-tables-test-allowed-diff.h */ #include "qemu/osdep.h" From c7cf4ddb8068d83d6da1a626590ca67ba4c508ad Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 20 Jan 2020 14:33:32 +0100 Subject: [PATCH 07/14] gitlab-ci: Refresh the list of iotests iotest 147 and 205 have recently been marked as "NBD-only", so they are currently simply skipped and thus can be removed. iotest 129 occasionally fails in the gitlab-CI, and according to Max, there are some known issues with this test (see for example this URL: https://lists.nongnu.org/archive/html/qemu-block/2019-06/msg00499.html ), so for the time being, let's disable it until the problems are fixed. The iotests 040, 127, 203 and 256 are scheduled to become part of "make check-block", so we also do not have to test them seperately here anymore. On the other side, new iotests have been added to the QEMU repository in the past months, so we can now add some new test > 256 instead. Message-Id: <20200121131936.8214-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 228783993e..c15e394f09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,12 +54,12 @@ build-tcg-disabled: - make check-qapi-schema - cd tests/qemu-iotests/ - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 - 052 063 077 086 101 104 106 113 147 148 150 151 152 157 159 160 - 163 170 171 183 184 192 194 197 205 208 215 221 222 226 227 236 - - ./check -qcow2 028 040 051 056 057 058 065 067 068 082 085 091 095 096 102 - 122 124 127 129 132 139 142 144 145 147 151 152 155 157 165 194 - 196 197 200 202 203 205 208 209 215 216 218 222 227 234 246 247 - 248 250 254 255 256 + 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 + 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 + - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122 + 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 + 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 + 260 261 262 263 264 270 272 273 277 279 build-user: script: From 432b119be4a5d0902d71869f2a29c3c01d60eb45 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 8 Jan 2020 20:09:34 +0100 Subject: [PATCH 08/14] include/sysemu/sysemu.h: Remove usused variable no_quit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The no_quit variable has been removed in commit 78782712a62d56 ("vl: drop no_quit variable"), so let's remove the extern declaration in the header now, too. Fixes: 78782712a62d ("vl: drop no_quit variable") Message-Id: <20200108192402.19672-1-thuth@redhat.com> Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Signed-off-by: Thomas Huth --- include/sysemu/sysemu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 80c57fdc4e..686f4217a6 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -44,7 +44,6 @@ extern int alt_grab; extern int ctrl_grab; extern int cursor_hide; extern int graphic_rotate; -extern int no_quit; extern int no_shutdown; extern int old_param; extern int boot_menu; From d9018fbbd68bf3a8338828ee3038341518c74212 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 21 Jan 2020 17:05:31 +0100 Subject: [PATCH 09/14] trivial: Remove xenfb_enabled from sysemu.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The define is only used in one other place. Move the code there instead of keeping this xen-specific define in sysemu.h. Message-Id: <20200121161747.10569-1-thuth@redhat.com> Acked-by: Paul Durrant Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- hw/xenpv/xen_machine_pv.c | 2 +- include/sysemu/sysemu.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c index 3a8af1a1e0..8df575a457 100644 --- a/hw/xenpv/xen_machine_pv.c +++ b/hw/xenpv/xen_machine_pv.c @@ -60,7 +60,7 @@ static void xen_init_pv(MachineState *machine) xen_be_register("qnic", &xen_netdev_ops); /* configure framebuffer */ - if (xenfb_enabled) { + if (vga_interface_type == VGA_XENFB) { xen_config_dev_vfb(0, "vnc"); xen_config_dev_vkbd(0); } diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 686f4217a6..6358a324a7 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -32,7 +32,6 @@ typedef enum { } VGAInterfaceType; extern int vga_interface_type; -#define xenfb_enabled (vga_interface_type == VGA_XENFB) extern int graphic_width; extern int graphic_height; From 3ab5a6ece5ce40a144b6838737f13a413651c5b1 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 11 Sep 2019 20:56:08 +0200 Subject: [PATCH 10/14] hw/*/Makefile.objs: Move many .o files to common-objs We have many files that apparently do not depend on the target CPU configuration, i.e. which can be put into common-obj-y instead of obj-y. This way, the code can be shared for example between qemu-system-arm and qemu-system-aarch64, or the various big and little endian variants like qemu-system-sh4 and qemu-system-sh4eb, so that we do not have to compile the code multiple times anymore. Reviewed-by: Stefan Hajnoczi Message-Id: <20200130133841.10779-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- hw/adc/Makefile.objs | 2 +- hw/block/Makefile.objs | 2 +- hw/char/Makefile.objs | 16 ++++++++-------- hw/core/Makefile.objs | 2 +- hw/display/Makefile.objs | 2 +- hw/dma/Makefile.objs | 6 +++--- hw/gpio/Makefile.objs | 10 +++++----- hw/i2c/Makefile.objs | 4 ++-- hw/i2c/ppc4xx_i2c.c | 1 - hw/input/Makefile.objs | 8 ++++---- hw/net/Makefile.objs | 6 +++--- hw/nvram/Makefile.objs | 2 +- hw/pcmcia/Makefile.objs | 2 +- hw/sd/Makefile.objs | 10 +++++----- hw/ssi/Makefile.objs | 4 ++-- hw/usb/Makefile.objs | 4 ++-- 16 files changed, 40 insertions(+), 41 deletions(-) diff --git a/hw/adc/Makefile.objs b/hw/adc/Makefile.objs index 3f6dfdedae..2b9dc36c7f 100644 --- a/hw/adc/Makefile.objs +++ b/hw/adc/Makefile.objs @@ -1 +1 @@ -obj-$(CONFIG_STM32F2XX_ADC) += stm32f2xx_adc.o +common-obj-$(CONFIG_STM32F2XX_ADC) += stm32f2xx_adc.o diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs index 28c2495a00..4b4a2b338d 100644 --- a/hw/block/Makefile.objs +++ b/hw/block/Makefile.objs @@ -10,7 +10,7 @@ common-obj-$(CONFIG_ONENAND) += onenand.o common-obj-$(CONFIG_NVME_PCI) += nvme.o common-obj-$(CONFIG_SWIM) += swim.o -obj-$(CONFIG_SH4) += tc58128.o +common-obj-$(CONFIG_SH4) += tc58128.o obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs index 02d8a66925..9e9a6c1aff 100644 --- a/hw/char/Makefile.objs +++ b/hw/char/Makefile.objs @@ -13,14 +13,13 @@ common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o common-obj-$(CONFIG_XEN) += xen_console.o common-obj-$(CONFIG_CADENCE) += cadence_uart.o -obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o -obj-$(CONFIG_COLDFIRE) += mcf_uart.o -obj-$(CONFIG_OMAP) += omap_uart.o -obj-$(CONFIG_SH4) += sh_serial.o -obj-$(CONFIG_PSERIES) += spapr_vty.o -obj-$(CONFIG_DIGIC) += digic-uart.o -obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o -obj-$(CONFIG_RASPI) += bcm2835_aux.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o +common-obj-$(CONFIG_COLDFIRE) += mcf_uart.o +common-obj-$(CONFIG_OMAP) += omap_uart.o +common-obj-$(CONFIG_SH4) += sh_serial.o +common-obj-$(CONFIG_DIGIC) += digic-uart.o +common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o +common-obj-$(CONFIG_RASPI) += bcm2835_aux.o common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o @@ -33,4 +32,5 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o +obj-$(CONFIG_PSERIES) += spapr_vty.o obj-$(CONFIG_TERMINAL3270) += terminal3270.o diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index 9e41ec9a15..6215e7c208 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -19,8 +19,8 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += null-machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o +common-obj-$(CONFIG_SOFTMMU) += numa.o obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o -obj-$(CONFIG_SOFTMMU) += numa.o common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o common-obj-$(CONFIG_XILINX_AXI) += stream.o diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 5f03dfdcc4..77a7d622bd 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -24,7 +24,7 @@ common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o common-obj-$(CONFIG_BLIZZARD) += blizzard.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o common-obj-$(CONFIG_FRAMEBUFFER) += framebuffer.o -obj-$(CONFIG_MILKYMIST) += milkymist-vgafb.o +common-obj-$(CONFIG_MILKYMIST) += milkymist-vgafb.o common-obj-$(CONFIG_ZAURUS) += tc6393xb.o common-obj-$(CONFIG_MACFB) += macfb.o diff --git a/hw/dma/Makefile.objs b/hw/dma/Makefile.objs index b672e7a522..f4b1cfe26d 100644 --- a/hw/dma/Makefile.objs +++ b/hw/dma/Makefile.objs @@ -8,9 +8,9 @@ common-obj-$(CONFIG_XILINX_AXI) += xilinx_axidma.o common-obj-$(CONFIG_ZYNQ_DEVCFG) += xlnx-zynq-devcfg.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_dma.o common-obj-$(CONFIG_STP2000) += sparc32_dma.o -obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o +common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zdma.o -obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o -obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o +common-obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o common-obj-$(CONFIG_RASPI) += bcm2835_dma.o diff --git a/hw/gpio/Makefile.objs b/hw/gpio/Makefile.objs index d305b3b24b..3cfc261f9b 100644 --- a/hw/gpio/Makefile.objs +++ b/hw/gpio/Makefile.objs @@ -5,8 +5,8 @@ common-obj-$(CONFIG_ZAURUS) += zaurus.o common-obj-$(CONFIG_E500) += mpc8xxx.o common-obj-$(CONFIG_GPIO_KEY) += gpio_key.o -obj-$(CONFIG_OMAP) += omap_gpio.o -obj-$(CONFIG_IMX) += imx_gpio.o -obj-$(CONFIG_RASPI) += bcm2835_gpio.o -obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o -obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o +common-obj-$(CONFIG_OMAP) += omap_gpio.o +common-obj-$(CONFIG_IMX) += imx_gpio.o +common-obj-$(CONFIG_RASPI) += bcm2835_gpio.o +common-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs index d7073a401f..6ba976b257 100644 --- a/hw/i2c/Makefile.objs +++ b/hw/i2c/Makefile.objs @@ -9,5 +9,5 @@ common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_i2c.o common-obj-$(CONFIG_NRF51_SOC) += microbit_i2c.o common-obj-$(CONFIG_MPC_I2C) += mpc_i2c.o -obj-$(CONFIG_OMAP) += omap_i2c.o -obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o +common-obj-$(CONFIG_OMAP) += omap_i2c.o +common-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o diff --git a/hw/i2c/ppc4xx_i2c.c b/hw/i2c/ppc4xx_i2c.c index 3f015a1581..c0a8e04567 100644 --- a/hw/i2c/ppc4xx_i2c.c +++ b/hw/i2c/ppc4xx_i2c.c @@ -27,7 +27,6 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu/module.h" -#include "cpu.h" #include "hw/i2c/ppc4xx_i2c.h" #include "hw/irq.h" diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs index f98f635685..abc1ff03c0 100644 --- a/hw/input/Makefile.objs +++ b/hw/input/Makefile.objs @@ -12,7 +12,7 @@ common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o -obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o -obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o -obj-$(CONFIG_TSC210X) += tsc210x.o -obj-$(CONFIG_LASIPS2) += lasips2.o +common-obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o +common-obj-$(CONFIG_TSC210X) += tsc210x.o +common-obj-$(CONFIG_LASIPS2) += lasips2.o diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs index 19f13e9fa5..991c46c773 100644 --- a/hw/net/Makefile.objs +++ b/hw/net/Makefile.objs @@ -34,8 +34,8 @@ common-obj-$(CONFIG_SUNHME) += sunhme.o common-obj-$(CONFIG_FTGMAC100) += ftgmac100.o common-obj-$(CONFIG_SUNGEM) += sungem.o -obj-$(CONFIG_ETRAXFS) += etraxfs_eth.o -obj-$(CONFIG_COLDFIRE) += mcf_fec.o +common-obj-$(CONFIG_ETRAXFS) += etraxfs_eth.o +common-obj-$(CONFIG_COLDFIRE) += mcf_fec.o obj-$(CONFIG_MILKYMIST) += milkymist-minimac2.o obj-$(CONFIG_PSERIES) += spapr_llan.o obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o @@ -45,7 +45,7 @@ common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET)) += vhost_net.o common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET))) += vhost_net-stub.o common-obj-$(CONFIG_ALL) += vhost_net-stub.o -obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \ +common-obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \ fsl_etsec/rings.o fsl_etsec/miim.o common-obj-$(CONFIG_ROCKER) += rocker/rocker.o rocker/rocker_fp.o \ diff --git a/hw/nvram/Makefile.objs b/hw/nvram/Makefile.objs index 090df63fcd..f3ad921382 100644 --- a/hw/nvram/Makefile.objs +++ b/hw/nvram/Makefile.objs @@ -4,5 +4,5 @@ common-obj-$(CONFIG_AT24C) += eeprom_at24c.o common-obj-y += fw_cfg.o common-obj-$(CONFIG_CHRP_NVRAM) += chrp_nvram.o common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o +common-obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o obj-$(CONFIG_PSERIES) += spapr_nvram.o -obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o diff --git a/hw/pcmcia/Makefile.objs b/hw/pcmcia/Makefile.objs index 4eac060c93..02cd986a2c 100644 --- a/hw/pcmcia/Makefile.objs +++ b/hw/pcmcia/Makefile.objs @@ -1,2 +1,2 @@ common-obj-y += pcmcia.o -obj-$(CONFIG_PXA2XX) += pxa2xx.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx.o diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs index a884c238df..e371281ac4 100644 --- a/hw/sd/Makefile.objs +++ b/hw/sd/Makefile.objs @@ -4,8 +4,8 @@ common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o common-obj-$(CONFIG_SDHCI) += sdhci.o common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o -obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o -obj-$(CONFIG_OMAP) += omap_mmc.o -obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o -obj-$(CONFIG_RASPI) += bcm2835_sdhost.o -obj-$(CONFIG_ASPEED_SOC) += aspeed_sdhci.o +common-obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o +common-obj-$(CONFIG_OMAP) += omap_mmc.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o +common-obj-$(CONFIG_RASPI) += bcm2835_sdhost.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_sdhci.o diff --git a/hw/ssi/Makefile.objs b/hw/ssi/Makefile.objs index f5bcc65fe7..07a85f1967 100644 --- a/hw/ssi/Makefile.objs +++ b/hw/ssi/Makefile.objs @@ -6,5 +6,5 @@ common-obj-$(CONFIG_ASPEED_SOC) += aspeed_smc.o common-obj-$(CONFIG_STM32F2XX_SPI) += stm32f2xx_spi.o common-obj-$(CONFIG_MSF2) += mss-spi.o -obj-$(CONFIG_OMAP) += omap_spi.o -obj-$(CONFIG_IMX) += imx_spi.o +common-obj-$(CONFIG_OMAP) += omap_spi.o +common-obj-$(CONFIG_IMX) += imx_spi.o diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index 0052d49ce1..2b10868937 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -13,8 +13,8 @@ common-obj-$(CONFIG_USB_XHCI) += hcd-xhci.o common-obj-$(CONFIG_USB_XHCI_NEC) += hcd-xhci-nec.o common-obj-$(CONFIG_USB_MUSB) += hcd-musb.o -obj-$(CONFIG_TUSB6010) += tusb6010.o -obj-$(CONFIG_IMX) += chipidea.o +common-obj-$(CONFIG_TUSB6010) += tusb6010.o +common-obj-$(CONFIG_IMX) += chipidea.o # emulated usb devices common-obj-$(CONFIG_USB) += dev-hub.o From ea763fd23334ee5f11e19c7cd1ae75bcab8dc15c Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 3 Feb 2020 16:31:46 +0100 Subject: [PATCH 11/14] Makefile: Do not use wildcard hw/*/Kconfig as input for minikconf The hw/*/Kconfig files should be sourced from hw/Kconfig, so there is no need to pass them along as input files to minikconfig. We should use the hw/*/Kconfig wildcard only for build dependencies in the Makefile. With this change, there are now no duplicate entries in the generated *-softmmu/config-devices.mak.d files anymore, and there is finally a chance to get rid of stale Kconfig files like hw/bt/Kconfig, too (once they do not show up in the config-devices.mak.d files now anymore). Message-Id: <20200203153905.20544-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a6f5d44082..461d40bea6 100644 --- a/Makefile +++ b/Makefile @@ -397,11 +397,11 @@ MINIKCONF_ARGS = \ CONFIG_LINUX=$(CONFIG_LINUX) \ CONFIG_PVRDMA=$(CONFIG_PVRDMA) -MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig \ - $(wildcard $(SRC_PATH)/hw/*/Kconfig) +MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig +MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig) MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \ -$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak +$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak $(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp") $(call quiet-command, if test -f $@; then \ if cmp -s $@.old $@; then \ From 10ebc0a8fde078c51d7340d194aa45d58f076f5b Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 15 Jan 2020 12:22:58 +0100 Subject: [PATCH 12/14] hw/input: Do not enable CONFIG_PCKBD by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The i8042 PS/2 Controller should not be enabled by default. It has to be selected by machines or chipsets (e.g. SuperIO chipsets). Message-Id: <20200115113748.24757-1-thuth@redhat.com> Acked-by: Paolo Bonzini Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- hw/input/Kconfig | 1 - hw/isa/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/Kconfig b/hw/input/Kconfig index 25c77a1b87..64f14daabf 100644 --- a/hw/input/Kconfig +++ b/hw/input/Kconfig @@ -7,7 +7,6 @@ config LM832X config PCKBD bool - default y select PS2 depends on ISA_BUS diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 8a38813cc1..c7f07854f7 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -16,6 +16,7 @@ config I82378 config ISA_SUPERIO bool select ISA_BUS + select PCKBD config PC87312 bool From 9154cf688bbc721a9a38197537fa821f6291b91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 29 Jan 2020 20:23:50 +0100 Subject: [PATCH 13/14] hw/hppa/Kconfig: LASI chipset requires PARALLEL port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PARISC Lasi chipset emulation requires some of the common parallel support and fails to build on a --without-default-devices: LINK hppa-softmmu/qemu-system-hppa /usr/bin/ld: hw/hppa/lasi.o: in function `lasi_init': hw/hppa/lasi.c:324: undefined reference to `parallel_mm_init' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:206: qemu-system-hppa] Error 1 Fixes: 376b851909d Reported-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200129192350.27143-1-philmd@redhat.com> Acked-by: Helge Deller Signed-off-by: Thomas Huth --- hw/hppa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig index 82178c7dcb..22948db025 100644 --- a/hw/hppa/Kconfig +++ b/hw/hppa/Kconfig @@ -12,4 +12,5 @@ config DINO select LSI_SCSI_PCI select LASI_82596 select LASIPS2 + select PARALLEL select ARTIST From 4f67366e3bbe6040998be038156486eed264ea58 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 3 Feb 2020 16:55:34 +0100 Subject: [PATCH 14/14] configure: Fix typo of the have_afalg variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The variable is called 'have_afalg' and not 'hava_afalg'. Fixes: f0d92b56d88 ('introduce some common functions for af_alg backend') Message-Id: <20200203160046.23194-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Longpeng(Mike) Signed-off-by: Thomas Huth --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5095f01728..115dc38085 100755 --- a/configure +++ b/configure @@ -5843,7 +5843,7 @@ fi ########################################## # check for usable AF_ALG environment -hava_afalg=no +have_afalg=no cat > $TMPC << EOF #include #include