From 58379af7102616531bf8ca499121e33b034fe9e4 Mon Sep 17 00:00:00 2001 From: Han Han Date: Tue, 1 Nov 2022 09:46:47 +0800 Subject: [PATCH 1/7] qapi: virtio: Fix the introduced version The items of qapi/virtio.json are introduced at a5ebce38576. They will be in the version 7.2 not 7.1. Signed-off-by: Han Han Reviewed-by: Laurent Vivier Message-Id: <20221101014647.3000801-1-hhan@redhat.com> Signed-off-by: Laurent Vivier --- qapi/virtio.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qapi/virtio.json b/qapi/virtio.json index e47a8fb2e0..872c7e3623 100644 --- a/qapi/virtio.json +++ b/qapi/virtio.json @@ -15,7 +15,7 @@ # # @name: Name of the VirtIODevice # -# Since: 7.1 +# Since: 7.2 # ## { 'struct': 'VirtioInfo', @@ -32,7 +32,7 @@ # # Returns: List of gathered VirtIODevices # -# Since: 7.1 +# Since: 7.2 # # Example: # @@ -97,7 +97,7 @@ # # @log-size: vhost_dev log_size # -# Since: 7.1 +# Since: 7.2 # ## @@ -167,7 +167,7 @@ # Present if the given VirtIODevice has an active vhost # device. # -# Since: 7.1 +# Since: 7.2 # ## @@ -206,7 +206,7 @@ # # Returns: VirtioStatus of the virtio device # -# Since: 7.1 +# Since: 7.2 # # Examples: # @@ -452,7 +452,7 @@ # # @unknown-statuses: Virtio device statuses bitmap that have not been decoded # -# Since: 7.1 +# Since: 7.2 ## { 'struct': 'VirtioDeviceStatus', @@ -471,7 +471,7 @@ # @unknown-protocols: Vhost user device protocol features bitmap that # have not been decoded # -# Since: 7.1 +# Since: 7.2 ## { 'struct': 'VhostDeviceProtocols', @@ -492,7 +492,7 @@ # @unknown-dev-features: Virtio device features bitmap that have not # been decoded # -# Since: 7.1 +# Since: 7.2 ## { 'struct': 'VirtioDeviceFeatures', @@ -535,7 +535,7 @@ # # @signalled-used-valid: VirtQueue signalled_used_valid flag # -# Since: 7.1 +# Since: 7.2 # ## @@ -576,7 +576,7 @@ # shadow_avail_idx will not be displayed in the case where # the selected VirtIODevice has a running vhost device. # -# Since: 7.1 +# Since: 7.2 # # Examples: # @@ -666,7 +666,7 @@ # # @used-size: vhost_virtqueue used_size # -# Since: 7.1 +# Since: 7.2 # ## @@ -699,7 +699,7 @@ # # Returns: VirtVhostQueueStatus of the vhost_virtqueue # -# Since: 7.1 +# Since: 7.2 # # Examples: # @@ -767,7 +767,7 @@ # # @flags: List of descriptor flags # -# Since: 7.1 +# Since: 7.2 # ## @@ -787,7 +787,7 @@ # # @ring: VRingAvail ring[] entry at provided index # -# Since: 7.1 +# Since: 7.2 # ## @@ -805,7 +805,7 @@ # # @idx: VRingUsed index # -# Since: 7.1 +# Since: 7.2 # ## @@ -829,7 +829,7 @@ # # @used: VRingUsed info # -# Since: 7.1 +# Since: 7.2 # ## @@ -857,7 +857,7 @@ # # Returns: VirtioQueueElement information # -# Since: 7.1 +# Since: 7.2 # # Examples: # From 1e458f11273c315ee2045f6e632b8dfb5f2b1544 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 30 Oct 2022 11:59:44 +0100 Subject: [PATCH 2/7] Fix some typos in documentation and comments Most of them were found and fixed using codespell. Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: Stefan Hajnoczi Message-Id: <20221030105944.311940-1-sw@weilnetz.de> Signed-off-by: Laurent Vivier --- docs/devel/testing.rst | 2 +- docs/system/arm/cpu-features.rst | 2 +- docs/system/loongarch/loongson3.rst | 2 +- docs/tools/virtiofsd.rst | 2 +- include/exec/memory.h | 2 +- qapi/qom.json | 2 +- qemu-options.hx | 10 +++++----- qga/qapi-schema.json | 2 +- tests/qtest/libqtest.h | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index fbb98faabe..e10c47b5a7 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -99,7 +99,7 @@ successfully on various hosts. The following list shows some best practices: * If your test cases uses the blkdebug feature, use relative path to pass the config and image file paths in the command line as Windows absolute path contains the delimiter ":" which will confuse the blkdebug parser. -* Use double quotes in your extra QEMU commmand line in your test cases +* Use double quotes in your extra QEMU command line in your test cases instead of single quotes, as Windows does not drop single quotes when passing the command line to QEMU. * Windows opens a file in text mode by default, while a POSIX compliant diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst index c2c01ec7d2..00c444042f 100644 --- a/docs/system/arm/cpu-features.rst +++ b/docs/system/arm/cpu-features.rst @@ -433,7 +433,7 @@ additional constraints on the set of vector lengths supported by SME. SME User-mode Default Vector Length Property -------------------------------------------- -For qemu-aarch64, the cpu propery ``sme-default-vector-length=N`` is +For qemu-aarch64, the cpu property ``sme-default-vector-length=N`` is defined to mirror the Linux kernel parameter file ``/proc/sys/abi/sme_default_vector_length``. The default length, ``N``, is in units of bytes and must be between 16 and 8192. diff --git a/docs/system/loongarch/loongson3.rst b/docs/system/loongarch/loongson3.rst index 1bdab44e27..489ea20f8f 100644 --- a/docs/system/loongarch/loongson3.rst +++ b/docs/system/loongarch/loongson3.rst @@ -41,7 +41,7 @@ can be accessed by following steps. $ qemu-system-loongarch64 -machine virt -m 4G -cpu la464-loongarch-cpu \ -smp 1 -bios QEMU_EFI.fd -kernel vmlinuz.efi -initrd initrd.img \ - -append "root=/dev/ram rdinit=/sbin/init consol e=ttyS0,115200" \ + -append "root=/dev/ram rdinit=/sbin/init console=ttyS0,115200" \ --nographic Note: The running speed may be a little slow, as the performance of our diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst index 5f5ac9dd56..995a754a7b 100644 --- a/docs/tools/virtiofsd.rst +++ b/docs/tools/virtiofsd.rst @@ -232,7 +232,7 @@ e.g.: ``:ok:server::security.:`` - will pass 'securty.' xattr's in listxattr from the server + will pass 'security.' xattr's in listxattr from the server and ignore following rules. ``:ok:all:::`` diff --git a/include/exec/memory.h b/include/exec/memory.h index bfb1de8eea..a751c111bd 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1970,7 +1970,7 @@ void memory_region_clear_dirty_bitmap(MemoryRegion *mr, hwaddr start, * querying the same page multiple times, which is especially useful for * display updates where the scanlines often are not page aligned. * - * The dirty bitmap region which gets copyed into the snapshot (and + * The dirty bitmap region which gets copied into the snapshot (and * cleared afterwards) can be larger than requested. The boundaries * are rounded up/down so complete bitmap longs (covering 64 pages on * 64bit hosts) can be copied over into the bitmap snapshot. Which diff --git a/qapi/qom.json b/qapi/qom.json index 87fcad2423..4db956f07e 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -589,7 +589,7 @@ # # @size: size of the memory region in bytes # -# @x-use-canonical-path-for-ramblock-id: if true, the canoncial path is used +# @x-use-canonical-path-for-ramblock-id: if true, the canonical path is used # for ramblock-id. Disable this for 4.0 # machine types or older to allow # migration with newer QEMU versions. diff --git a/qemu-options.hx b/qemu-options.hx index 911d82afa5..dbdf9c301b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1051,7 +1051,7 @@ SRST details on the external interface. ``-device isa-ipmi-kcs,bmc=id[,ioport=val][,irq=val]`` - Add a KCS IPMI interafce on the ISA bus. This also adds a + Add a KCS IPMI interface on the ISA bus. This also adds a corresponding ACPI and SMBIOS entries, if appropriate. ``bmc=id`` @@ -1071,7 +1071,7 @@ SRST is 0xe4 and the default interrupt is 5. ``-device pci-ipmi-kcs,bmc=id`` - Add a KCS IPMI interafce on the PCI bus. + Add a KCS IPMI interface on the PCI bus. ``bmc=id`` The BMC to connect to, one of ipmi-bmc-sim or ipmi-bmc-extern above. @@ -5283,8 +5283,8 @@ SRST read the colo-compare git log. ``-object cryptodev-backend-builtin,id=id[,queues=queues]`` - Creates a cryptodev backend which executes crypto opreation from - the QEMU cipher APIS. The id parameter is a unique ID that will + Creates a cryptodev backend which executes crypto operations from + the QEMU cipher APIs. The id parameter is a unique ID that will be used to reference this cryptodev backend from the ``virtio-crypto`` device. The queues parameter is optional, which specify the queue number of cryptodev backend, the default @@ -5551,7 +5551,7 @@ SRST file=/etc/qemu/vnc.allow Finally the ``/etc/qemu/vnc.allow`` file would contain the list - of x509 distingished names that are permitted access + of x509 distinguished names that are permitted access :: diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index 026a56f76c..796434ed34 100644 --- a/qga/qapi-schema.json +++ b/qga/qapi-schema.json @@ -392,7 +392,7 @@ ## # @guest-file-flush: # -# Write file changes bufferred in userspace to disk/kernel buffers +# Write file changes buffered in userspace to disk/kernel buffers # # @handle: filehandle returned by guest-file-open # diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h index 91a5f7edd9..fcf1c3c3b3 100644 --- a/tests/qtest/libqtest.h +++ b/tests/qtest/libqtest.h @@ -736,7 +736,7 @@ bool qtest_has_device(const char *device); * qtest_qmp_device_add_qdict: * @qts: QTestState instance to operate on * @drv: Name of the device that should be added - * @arguments: QDict with properties for the device to intialize + * @arguments: QDict with properties for the device to initialize * * Generic hot-plugging test via the device_add QMP command with properties * supplied in form of QDict. Use NULL for empty properties list. From ba24456b93a205b728475d5f0880f3ec495e383a Mon Sep 17 00:00:00 2001 From: Chuck Zmudzinski Date: Mon, 31 Oct 2022 17:35:52 -0400 Subject: [PATCH 3/7] xen/pt: fix syntax error that causes FTBFS in some configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Qemu is built with --enable-xen and --disable-xen-pci-passthrough and the target os is linux, the build fails with: meson.build:3477:2: ERROR: File xen_pt_stub.c does not exist. Fixes: 582ea95f5f93 ("meson: convert hw/xen") Signed-off-by: Chuck Zmudzinski Reviewed-by: Philippe Mathieu-Daudé Message-Id: <5f1342a13c09af77b1a7b0aeaba5955bcea89731.1667242033.git.brchuckz@aol.com> Signed-off-by: Laurent Vivier --- hw/xen/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 08dc1f6857..ae0ace3046 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -18,7 +18,7 @@ if have_xen_pci_passthrough 'xen_pt_msi.c', )) else - xen_specific_ss.add('xen_pt_stub.c') + xen_specific_ss.add(files('xen_pt_stub.c')) endif specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss) From 0f208a9747a700a4b63afc87d58da0c87f37e214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 26 Oct 2022 01:50:04 +0200 Subject: [PATCH 4/7] target/m68k: Rename qregs.def -> qregs.h.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use the .h.inc extension to include C headers. To be consistent with the rest of the codebase, rename the C headers using the .def extension. IDE/tools using our .editorconfig / .gitattributes will leverage this consistency. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Message-Id: <20221025235006.7215-2-philmd@linaro.org> Signed-off-by: Laurent Vivier --- target/m68k/{qregs.def => qregs.h.inc} | 0 target/m68k/translate.c | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename target/m68k/{qregs.def => qregs.h.inc} (100%) diff --git a/target/m68k/qregs.def b/target/m68k/qregs.h.inc similarity index 100% rename from target/m68k/qregs.def rename to target/m68k/qregs.h.inc diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 5cbde4be34..18418312b1 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -39,7 +39,7 @@ #define DEFO32(name, offset) static TCGv QREG_##name; #define DEFO64(name, offset) static TCGv_i64 QREG_##name; -#include "qregs.def" +#include "qregs.h.inc" #undef DEFO32 #undef DEFO64 @@ -75,7 +75,7 @@ void m68k_tcg_init(void) #define DEFO64(name, offset) \ QREG_##name = tcg_global_mem_new_i64(cpu_env, \ offsetof(CPUM68KState, offset), #name); -#include "qregs.def" +#include "qregs.h.inc" #undef DEFO32 #undef DEFO64 From 9cef8d99266cca7189237287dcd18b0a91c9aae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 26 Oct 2022 01:50:05 +0200 Subject: [PATCH 5/7] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use the .h.inc extension to include C headers. To be consistent with the rest of the codebase, rename the C headers using the .def extension. IDE/tools using our .editorconfig / .gitattributes will leverage this consistency. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Message-Id: <20221025235006.7215-3-philmd@linaro.org> Signed-off-by: Laurent Vivier --- target/s390x/tcg/{insn-data.def => insn-data.h.inc} | 2 +- .../s390x/tcg/{insn-format.def => insn-format.h.inc} | 0 target/s390x/tcg/translate.c | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%) rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%) diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.h.inc similarity index 99% rename from target/s390x/tcg/insn-data.def rename to target/s390x/tcg/insn-data.h.inc index 6382ceabfc..7e952bdfc8 100644 --- a/target/s390x/tcg/insn-data.def +++ b/target/s390x/tcg/insn-data.h.inc @@ -8,7 +8,7 @@ * * OPC = (op << 8) | op2 where op is the major, op2 the minor opcode * NAME = name of the opcode, used internally - * FMT = format of the opcode (defined in insn-format.def) + * FMT = format of the opcode (defined in insn-format.h.inc) * FAC = facility the opcode is available in (defined in DisasFacility) * I1 = func in1_xx fills o->in1 * I2 = func in2_xx fills o->in2 diff --git a/target/s390x/tcg/insn-format.def b/target/s390x/tcg/insn-format.h.inc similarity index 100% rename from target/s390x/tcg/insn-format.def rename to target/s390x/tcg/insn-format.h.inc diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 03efccdf9f..2fbdab7252 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -1011,7 +1011,7 @@ static void free_compare(DisasCompare *c) #define F6(N, X1, X2, X3, X4, X5, X6) F0(N) typedef enum { -#include "insn-format.def" +#include "insn-format.h.inc" } DisasFormat; #undef F0 @@ -1076,7 +1076,7 @@ typedef struct DisasFormatInfo { #define F6(N, X1, X2, X3, X4, X5, X6) { { X1, X2, X3, X4, X5, X6 } }, static const DisasFormatInfo format_info[] = { -#include "insn-format.def" +#include "insn-format.h.inc" }; #undef F0 @@ -6143,7 +6143,7 @@ static void in2_insn(DisasContext *s, DisasOps *o) #define E(OPC, NM, FT, FC, I1, I2, P, W, OP, CC, D, FL) insn_ ## NM, enum DisasInsnEnum { -#include "insn-data.def" +#include "insn-data.h.inc" }; #undef E @@ -6223,7 +6223,7 @@ enum DisasInsnEnum { #define FAC_MIE3 S390_FEAT_MISC_INSTRUCTION_EXT3 /* miscellaneous-instruction-extensions facility 3 */ static const DisasInsn insn_info[] = { -#include "insn-data.def" +#include "insn-data.h.inc" }; #undef E @@ -6233,7 +6233,7 @@ static const DisasInsn insn_info[] = { static const DisasInsn *lookup_opc(uint16_t opc) { switch (opc) { -#include "insn-data.def" +#include "insn-data.h.inc" default: return NULL; } From 5d756c82c9eb288f9e19bbc711c99e6b6bda9f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 26 Oct 2022 01:50:06 +0200 Subject: [PATCH 6/7] target/tricore: Rename csfr.def -> csfr.h.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use the .h.inc extension to include C headers. To be consistent with the rest of the codebase, rename the C headers using the .def extension. IDE/tools using our .editorconfig / .gitattributes will leverage this consistency. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann Reviewed-by: Alex Bennée Message-Id: <20221025235006.7215-4-philmd@linaro.org> Signed-off-by: Laurent Vivier --- target/tricore/{csfr.def => csfr.h.inc} | 0 target/tricore/translate.c | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename target/tricore/{csfr.def => csfr.h.inc} (100%) diff --git a/target/tricore/csfr.def b/target/tricore/csfr.h.inc similarity index 100% rename from target/tricore/csfr.def rename to target/tricore/csfr.h.inc diff --git a/target/tricore/translate.c b/target/tricore/translate.c index c5b7bfbf20..df9e46c649 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -388,7 +388,7 @@ static inline void gen_mfcr(DisasContext *ctx, TCGv ret, int32_t offset) gen_helper_psw_read(ret, cpu_env); } else { switch (offset) { -#include "csfr.def" +#include "csfr.h.inc" } } } @@ -418,7 +418,7 @@ static inline void gen_mtcr(DisasContext *ctx, TCGv r1, gen_helper_psw_write(cpu_env, r1); } else { switch (offset) { -#include "csfr.def" +#include "csfr.h.inc" } } } else { From 5a820d5d07cb101752c731799a326648a5aa185a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 3 Nov 2022 10:23:29 +0000 Subject: [PATCH 7/7] tests/unit: simpler variable sequence for test-io-channel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids some compilers complaining about a potentially un-initialised [src|dst]argv. In retrospect using GString was overkill for what we are constructing. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20221103102329.2581508-1-alex.bennee@linaro.org> Signed-off-by: Laurent Vivier --- tests/unit/test-io-channel-command.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c index 43e29c8cfb..19f72eab96 100644 --- a/tests/unit/test-io-channel-command.c +++ b/tests/unit/test-io-channel-command.c @@ -33,19 +33,13 @@ static void test_io_channel_command_fifo(bool async) { g_autofree gchar *tmpdir = g_dir_make_tmp("qemu-test-io-channel.XXXXXX", NULL); g_autofree gchar *fifo = g_strdup_printf("%s/%s", tmpdir, TEST_FIFO); - g_autoptr(GString) srcargs = g_string_new(socat); - g_autoptr(GString) dstargs = g_string_new(socat); - g_auto(GStrv) srcargv; - g_auto(GStrv) dstargv; + g_autofree gchar *srcargs = g_strdup_printf("%s - PIPE:%s,wronly", socat, fifo); + g_autofree gchar *dstargs = g_strdup_printf("%s PIPE:%s,rdonly -", socat, fifo); + g_auto(GStrv) srcargv = g_strsplit(srcargs, " ", -1); + g_auto(GStrv) dstargv = g_strsplit(dstargs, " ", -1); QIOChannel *src, *dst; QIOChannelTest *test; - g_string_append_printf(srcargs, " - PIPE:%s,wronly", fifo); - g_string_append_printf(dstargs, " PIPE:%s,rdonly -", fifo); - - srcargv = g_strsplit(srcargs->str, " ", -1); - dstargv = g_strsplit(dstargs->str, " ", -1); - src = QIO_CHANNEL(qio_channel_command_new_spawn((const char **) srcargv, O_WRONLY, &error_abort));