All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/10] Trivial branch for 7.2 patches
@ 2022-11-03 16:17 Laurent Vivier
  2022-11-03 16:17 ` [PULL 01/10] qapi: virtio: Fix the introduced version Laurent Vivier
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Laurent Vivier

The following changes since commit a11f65ec1b8adcb012b89c92819cbda4dc25aaf1:

  Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-11-01 13:49:33 -0400)

are available in the Git repository at:

  https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-7.2-pull-request

for you to fetch changes up to 489db95896b86dacdde9dab1de84745880449e37:

  tests/unit: simpler variable sequence for test-io-channel (2022-11-03 17:16:34 +0100)

----------------------------------------------------------------
Pull request trivial branch 20221103

----------------------------------------------------------------

Alex Bennée (1):
  tests/unit: simpler variable sequence for test-io-channel

Chuck Zmudzinski (1):
  xen/pt: fix syntax error that causes FTBFS in some configurations

Han Han (1):
  qapi: virtio: Fix the introduced version

Philippe Mathieu-Daudé (3):
  target/m68k: Rename qregs.def -> qregs.h.inc
  target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc
  target/tricore: Rename csfr.def -> csfr.h.inc

Stefan Weil (4):
  Fix some typos in documentation and comments
  libvhost-user: Fix wrong type of argument to formatting function
    (reported by LGTM)
  libvhost-user: Fix format strings
  libvhost-user: Add format attribute to local function vu_panic

 docs/devel/testing.rst                        |  2 +-
 docs/system/arm/cpu-features.rst              |  2 +-
 docs/system/loongarch/loongson3.rst           |  2 +-
 docs/tools/virtiofsd.rst                      |  2 +-
 hw/xen/meson.build                            |  2 +-
 include/exec/memory.h                         |  2 +-
 qapi/qom.json                                 |  2 +-
 qapi/virtio.json                              | 34 +++++++++----------
 qemu-options.hx                               | 10 +++---
 qga/qapi-schema.json                          |  2 +-
 subprojects/libvhost-user/libvhost-user.c     | 19 ++++++++---
 target/m68k/{qregs.def => qregs.h.inc}        |  0
 target/m68k/translate.c                       |  4 +--
 .../tcg/{insn-data.def => insn-data.h.inc}    |  2 +-
 .../{insn-format.def => insn-format.h.inc}    |  0
 target/s390x/tcg/translate.c                  | 10 +++---
 target/tricore/{csfr.def => csfr.h.inc}       |  0
 target/tricore/translate.c                    |  4 +--
 tests/qtest/libqtest.h                        |  2 +-
 tests/unit/test-io-channel-command.c          | 14 +++-----
 20 files changed, 60 insertions(+), 55 deletions(-)
 rename target/m68k/{qregs.def => qregs.h.inc} (100%)
 rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%)
 rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%)
 rename target/tricore/{csfr.def => csfr.h.inc} (100%)

-- 
2.37.3



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

* [PULL 01/10] qapi: virtio: Fix the introduced version
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 02/10] Fix some typos in documentation and comments Laurent Vivier
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Han Han, Laurent Vivier

From: Han Han <hhan@redhat.com>

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 <hhan@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20221101014647.3000801-1-hhan@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 qapi/virtio.json | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/qapi/virtio.json b/qapi/virtio.json
index e47a8fb2e0a9..872c7e36236c 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:
 #
-- 
2.37.3



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

* [PULL 02/10] Fix some typos in documentation and comments
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
  2022-11-03 16:17 ` [PULL 01/10] qapi: virtio: Fix the introduced version Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 03/10] xen/pt: fix syntax error that causes FTBFS in some configurations Laurent Vivier
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Peter Maydell, Thomas Huth,
	Stefan Hajnoczi, Laurent Vivier

From: Stefan Weil <sw@weilnetz.de>

Most of them were found and fixed using codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221030105944.311940-1-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 fbb98faabeed..e10c47b5a7ca 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 c2c01ec7d265..00c444042ff5 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 1bdab44e2728..489ea20f8ff7 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 5f5ac9dd56a3..995a754a7bf9 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 bfb1de8eeae1..a751c111bd3d 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 87fcad2423ae..4db956f07e6c 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 ceee0ddc255d..525f9dc2f223 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.
@@ -5264,8 +5264,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
@@ -5532,7 +5532,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 026a56f76caf..796434ed346f 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 91a5f7edd94d..fcf1c3c3b36f 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.
-- 
2.37.3



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

* [PULL 03/10] xen/pt: fix syntax error that causes FTBFS in some configurations
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
  2022-11-03 16:17 ` [PULL 01/10] qapi: virtio: Fix the introduced version Laurent Vivier
  2022-11-03 16:17 ` [PULL 02/10] Fix some typos in documentation and comments Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Laurent Vivier
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Chuck Zmudzinski, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Chuck Zmudzinski <brchuckz@aol.com>

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 <brchuckz@aol.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <5f1342a13c09af77b1a7b0aeaba5955bcea89731.1667242033.git.brchuckz@aol.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 08dc1f685738..ae0ace3046b8 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)
-- 
2.37.3



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

* [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM)
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 03/10] xen/pt: fix syntax error that causes FTBFS in some configurations Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-04 16:16   ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 05/10] libvhost-user: Fix format strings Laurent Vivier
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Philippe Mathieu-Daudé, Laurent Vivier

From: Stefan Weil <sw@weilnetz.de>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-Id: <20220422070144.1043697-2-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 subprojects/libvhost-user/libvhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c
index ffed4729a3dc..d9a6e3e5560f 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -651,7 +651,7 @@ generate_faults(VuDev *dev) {
 
         if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, &reg_struct)) {
             vu_panic(dev, "%s: Failed to userfault region %d "
-                          "@%p + size:%zx offset: %zx: (ufd=%d)%s\n",
+                          "@%" PRIx64 " + size:%zx offset: %zx: (ufd=%d)%s\n",
                      __func__, i,
                      dev_region->mmap_addr,
                      dev_region->size, dev_region->mmap_offset,
-- 
2.37.3



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

* [PULL 05/10] libvhost-user: Fix format strings
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 06/10] libvhost-user: Add format attribute to local function vu_panic Laurent Vivier
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Marc-André Lureau, Laurent Vivier

From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220422070144.1043697-3-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 subprojects/libvhost-user/libvhost-user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c
index d9a6e3e5560f..d67953a1c39c 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -700,7 +700,7 @@ vu_add_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
     if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
         close(vmsg->fds[0]);
         vu_panic(dev, "VHOST_USER_ADD_MEM_REG requires a message size of at "
-                      "least %d bytes and only %d bytes were received",
+                      "least %zu bytes and only %d bytes were received",
                       VHOST_USER_MEM_REG_SIZE, vmsg->size);
         return false;
     }
@@ -826,7 +826,7 @@ vu_rem_mem_reg(VuDev *dev, VhostUserMsg *vmsg) {
     if (vmsg->size < VHOST_USER_MEM_REG_SIZE) {
         vmsg_close_fds(vmsg);
         vu_panic(dev, "VHOST_USER_REM_MEM_REG requires a message size of at "
-                      "least %d bytes and only %d bytes were received",
+                      "least %zu bytes and only %d bytes were received",
                       VHOST_USER_MEM_REG_SIZE, vmsg->size);
         return false;
     }
-- 
2.37.3



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

* [PULL 06/10] libvhost-user: Add format attribute to local function vu_panic
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 05/10] libvhost-user: Fix format strings Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 07/10] target/m68k: Rename qregs.def -> qregs.h.inc Laurent Vivier
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Stefan Weil, Marc-André Lureau, Laurent Vivier

From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220422070144.1043697-4-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 subprojects/libvhost-user/libvhost-user.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c
index d67953a1c39c..f7b45b3066c1 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -45,6 +45,17 @@
 #include "libvhost-user.h"
 
 /* usually provided by GLib */
+#if     __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#if !defined(__clang__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
+#define G_GNUC_PRINTF(format_idx, arg_idx) \
+  __attribute__((__format__(gnu_printf, format_idx, arg_idx)))
+#else
+#define G_GNUC_PRINTF(format_idx, arg_idx) \
+  __attribute__((__format__(__printf__, format_idx, arg_idx)))
+#endif
+#else   /* !__GNUC__ */
+#define G_GNUC_PRINTF(format_idx, arg_idx)
+#endif  /* !__GNUC__ */
 #ifndef MIN
 #define MIN(x, y) ({                            \
             typeof(x) _min1 = (x);              \
@@ -151,7 +162,7 @@ vu_request_to_string(unsigned int req)
     }
 }
 
-static void
+static void G_GNUC_PRINTF(2, 3)
 vu_panic(VuDev *dev, const char *msg, ...)
 {
     char *buf = NULL;
-- 
2.37.3



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

* [PULL 07/10] target/m68k: Rename qregs.def -> qregs.h.inc
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (5 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 06/10] libvhost-user: Add format attribute to local function vu_panic Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 08/10] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc Laurent Vivier
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Laurent Vivier, Alex Bennée

From: Philippe Mathieu-Daudé <philmd@linaro.org>

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é <philmd@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221025235006.7215-2-philmd@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 5cbde4be3404..18418312b14b 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
 
-- 
2.37.3



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

* [PULL 08/10] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (6 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 07/10] target/m68k: Rename qregs.def -> qregs.h.inc Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 09/10] target/tricore: Rename csfr.def -> csfr.h.inc Laurent Vivier
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Thomas Huth, Alex Bennée, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

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é <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221025235006.7215-3-philmd@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 6382ceabfcfa..7e952bdfc828 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 03efccdf9f92..2fbdab72523e 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;
     }
-- 
2.37.3



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

* [PULL 09/10] target/tricore: Rename csfr.def -> csfr.h.inc
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (7 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 08/10] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-03 16:17 ` [PULL 10/10] tests/unit: simpler variable sequence for test-io-channel Laurent Vivier
  2022-11-04 14:39 ` [PULL 00/10] Trivial branch for 7.2 patches Stefan Hajnoczi
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Philippe Mathieu-Daudé,
	Bastian Koppelmann, Alex Bennée, Laurent Vivier

From: Philippe Mathieu-Daudé <philmd@linaro.org>

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é <philmd@linaro.org>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221025235006.7215-4-philmd@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 c5b7bfbf2013..df9e46c6495e 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 {
-- 
2.37.3



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

* [PULL 10/10] tests/unit: simpler variable sequence for test-io-channel
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (8 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 09/10] target/tricore: Rename csfr.def -> csfr.h.inc Laurent Vivier
@ 2022-11-03 16:17 ` Laurent Vivier
  2022-11-04 14:39 ` [PULL 00/10] Trivial branch for 7.2 patches Stefan Hajnoczi
  10 siblings, 0 replies; 14+ messages in thread
From: Laurent Vivier @ 2022-11-03 16:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Alex Bennée, Philippe Mathieu-Daudé,
	Laurent Vivier

From: Alex Bennée <alex.bennee@linaro.org>

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 <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20221103102329.2581508-1-alex.bennee@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 43e29c8cfbf4..19f72eab961d 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));
-- 
2.37.3



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

* Re: [PULL 00/10] Trivial branch for 7.2 patches
  2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
                   ` (9 preceding siblings ...)
  2022-11-03 16:17 ` [PULL 10/10] tests/unit: simpler variable sequence for test-io-channel Laurent Vivier
@ 2022-11-04 14:39 ` Stefan Hajnoczi
  10 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2022-11-04 14:39 UTC (permalink / raw)
  To: Laurent Vivier, Stefan Weil; +Cc: qemu-devel, qemu-trivial

Hi Stefan and Laurent,
Please take a look at this CI failure, I think it's triggered by this
pull request:

arm-linux-gnueabi-gcc -Isubprojects/libvhost-user/libvhost-user.a.p
-Isubprojects/libvhost-user -I../subprojects/libvhost-user
-fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common
-fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined
-Wimplicit-fallthrough=2 -Wno-missing-include-dirs
-Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE
-pthread -D_GNU_SOURCE -MD -MQ
subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -MF
subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o.d -o
subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -c
../subprojects/libvhost-user/libvhost-user.c
../subprojects/libvhost-user/libvhost-user.c: In function ‘generate_faults’:
../subprojects/libvhost-user/libvhost-user.c:664:27: error: format
‘%zx’ expects argument of type ‘size_t’, but argument 6 has type
‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
664 | vu_panic(dev, "%s: Failed to userfault region %d "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
668 | dev_region->size, dev_region->mmap_offset,
| ~~~~~~~~~~~~~~~~
| |
| uint64_t {aka long long unsigned int}
../subprojects/libvhost-user/libvhost-user.c:665:50: note: format
string is defined here
665 | "@%" PRIx64 " + size:%zx offset: %zx: (ufd=%d)%s\n",
| ~~^
| |
| unsigned int
| %llx
../subprojects/libvhost-user/libvhost-user.c:664:27: error: format
‘%zx’ expects argument of type ‘size_t’, but argument 7 has type
‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
664 | vu_panic(dev, "%s: Failed to userfault region %d "
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
668 | dev_region->size, dev_region->mmap_offset,
| ~~~~~~~~~~~~~~~~~~~~~~~
| |
| uint64_t {aka long long unsigned int}
../subprojects/libvhost-user/libvhost-user.c:665:62: note: format
string is defined here
665 | "@%" PRIx64 " + size:%zx offset: %zx: (ufd=%d)%s\n",
| ~~^
| |
| unsigned int
| %llx
cc1: all warnings being treated as errors

https://gitlab.com/qemu-project/qemu/-/jobs/3275327714

On Thu, 3 Nov 2022 at 12:20, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit a11f65ec1b8adcb012b89c92819cbda4dc25aaf1:
>
>   Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-11-01 13:49:33 -0400)
>
> are available in the Git repository at:
>
>   https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-7.2-pull-request
>
> for you to fetch changes up to 489db95896b86dacdde9dab1de84745880449e37:
>
>   tests/unit: simpler variable sequence for test-io-channel (2022-11-03 17:16:34 +0100)
>
> ----------------------------------------------------------------
> Pull request trivial branch 20221103
>
> ----------------------------------------------------------------
>
> Alex Bennée (1):
>   tests/unit: simpler variable sequence for test-io-channel
>
> Chuck Zmudzinski (1):
>   xen/pt: fix syntax error that causes FTBFS in some configurations
>
> Han Han (1):
>   qapi: virtio: Fix the introduced version
>
> Philippe Mathieu-Daudé (3):
>   target/m68k: Rename qregs.def -> qregs.h.inc
>   target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc
>   target/tricore: Rename csfr.def -> csfr.h.inc
>
> Stefan Weil (4):
>   Fix some typos in documentation and comments
>   libvhost-user: Fix wrong type of argument to formatting function
>     (reported by LGTM)
>   libvhost-user: Fix format strings
>   libvhost-user: Add format attribute to local function vu_panic
>
>  docs/devel/testing.rst                        |  2 +-
>  docs/system/arm/cpu-features.rst              |  2 +-
>  docs/system/loongarch/loongson3.rst           |  2 +-
>  docs/tools/virtiofsd.rst                      |  2 +-
>  hw/xen/meson.build                            |  2 +-
>  include/exec/memory.h                         |  2 +-
>  qapi/qom.json                                 |  2 +-
>  qapi/virtio.json                              | 34 +++++++++----------
>  qemu-options.hx                               | 10 +++---
>  qga/qapi-schema.json                          |  2 +-
>  subprojects/libvhost-user/libvhost-user.c     | 19 ++++++++---
>  target/m68k/{qregs.def => qregs.h.inc}        |  0
>  target/m68k/translate.c                       |  4 +--
>  .../tcg/{insn-data.def => insn-data.h.inc}    |  2 +-
>  .../{insn-format.def => insn-format.h.inc}    |  0
>  target/s390x/tcg/translate.c                  | 10 +++---
>  target/tricore/{csfr.def => csfr.h.inc}       |  0
>  target/tricore/translate.c                    |  4 +--
>  tests/qtest/libqtest.h                        |  2 +-
>  tests/unit/test-io-channel-command.c          | 14 +++-----
>  20 files changed, 60 insertions(+), 55 deletions(-)
>  rename target/m68k/{qregs.def => qregs.h.inc} (100%)
>  rename target/s390x/tcg/{insn-data.def => insn-data.h.inc} (99%)
>  rename target/s390x/tcg/{insn-format.def => insn-format.h.inc} (100%)
>  rename target/tricore/{csfr.def => csfr.h.inc} (100%)
>
> --
> 2.37.3
>
>


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

* Re: [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM)
  2022-11-03 16:17 ` [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Laurent Vivier
@ 2022-11-04 16:16   ` Laurent Vivier
  2022-11-05  9:15     ` Stefan Weil via
  0 siblings, 1 reply; 14+ messages in thread
From: Laurent Vivier @ 2022-11-04 16:16 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, Philippe Mathieu-Daudé

Hi Stefan,

Le 03/11/2022 à 17:17, Laurent Vivier a écrit :
> From: Stefan Weil <sw@weilnetz.de>
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> Message-Id: <20220422070144.1043697-2-sw@weilnetz.de>
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>   subprojects/libvhost-user/libvhost-user.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c
> index ffed4729a3dc..d9a6e3e5560f 100644
> --- a/subprojects/libvhost-user/libvhost-user.c
> +++ b/subprojects/libvhost-user/libvhost-user.c
> @@ -651,7 +651,7 @@ generate_faults(VuDev *dev) {
>   
>           if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, &reg_struct)) {
>               vu_panic(dev, "%s: Failed to userfault region %d "
> -                          "@%p + size:%zx offset: %zx: (ufd=%d)%s\n",
> +                          "@%" PRIx64 " + size:%zx offset: %zx: (ufd=%d)%s\n",
>                        __func__, i,
>                        dev_region->mmap_addr,
>                        dev_region->size, dev_region->mmap_offset,

They all need PRIx64:

typedef struct VuDevRegion {
     /* Guest Physical address. */
     uint64_t gpa;
     /* Memory region size. */
     uint64_t size;
     /* QEMU virtual address (userspace). */
     uint64_t qva;
     /* Starting offset in our mmaped space. */
     uint64_t mmap_offset;
     /* Start address of mmaped space. */
     uint64_t mmap_addr;
} VuDevRegion;

Could you fix your patch?

Thanks,
Laurent


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

* Re: [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM)
  2022-11-04 16:16   ` Laurent Vivier
@ 2022-11-05  9:15     ` Stefan Weil via
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Weil via @ 2022-11-05  9:15 UTC (permalink / raw)
  To: Laurent Vivier, Stefan Hajnoczi
  Cc: qemu-trivial, qemu-devel, Philippe Mathieu-Daudé

Am 04.11.22 um 17:16 schrieb Laurent Vivier:

> Hi Stefan,
>
> Le 03/11/2022 à 17:17, Laurent Vivier a écrit :
>> From: Stefan Weil <sw@weilnetz.de>
>>
>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> Message-Id: <20220422070144.1043697-2-sw@weilnetz.de>
>> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
>> ---
>>   subprojects/libvhost-user/libvhost-user.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/subprojects/libvhost-user/libvhost-user.c 
>> b/subprojects/libvhost-user/libvhost-user.c
>> index ffed4729a3dc..d9a6e3e5560f 100644
>> --- a/subprojects/libvhost-user/libvhost-user.c
>> +++ b/subprojects/libvhost-user/libvhost-user.c
>> @@ -651,7 +651,7 @@ generate_faults(VuDev *dev) {
>>             if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, 
>> &reg_struct)) {
>>               vu_panic(dev, "%s: Failed to userfault region %d "
>> -                          "@%p + size:%zx offset: %zx: (ufd=%d)%s\n",
>> +                          "@%" PRIx64 " + size:%zx offset: %zx: 
>> (ufd=%d)%s\n",
>>                        __func__, i,
>>                        dev_region->mmap_addr,
>>                        dev_region->size, dev_region->mmap_offset,
>
> They all need PRIx64:
>
> typedef struct VuDevRegion {
>     /* Guest Physical address. */
>     uint64_t gpa;
>     /* Memory region size. */
>     uint64_t size;
>     /* QEMU virtual address (userspace). */
>     uint64_t qva;
>     /* Starting offset in our mmaped space. */
>     uint64_t mmap_offset;
>     /* Start address of mmaped space. */
>     uint64_t mmap_addr;
> } VuDevRegion;
>
> Could you fix your patch?


The patch fixes one error ("%p"). The two "%zx" are old errors which I 
did not notice because they are only relevant for platforms with 
sizeof(void *) != sizeof(uint64_t), and 32 bit Windows builds don't 
compile libvhost-user. So we need an additional patch which fixes the 
"%zx" before patch 06/10 which adds the format attribute is applied.

Stefan, I suggest to merge the trivial branch without patch 06/10. That 
should fix the build failure and fixes at least some of the format 
errors. Then a patch which fixes the remaining format errors can be 
applied later together with the omitted patch 06/10.

Regards,

Stefan



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

end of thread, other threads:[~2022-11-05  9:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 16:17 [PULL 00/10] Trivial branch for 7.2 patches Laurent Vivier
2022-11-03 16:17 ` [PULL 01/10] qapi: virtio: Fix the introduced version Laurent Vivier
2022-11-03 16:17 ` [PULL 02/10] Fix some typos in documentation and comments Laurent Vivier
2022-11-03 16:17 ` [PULL 03/10] xen/pt: fix syntax error that causes FTBFS in some configurations Laurent Vivier
2022-11-03 16:17 ` [PULL 04/10] libvhost-user: Fix wrong type of argument to formatting function (reported by LGTM) Laurent Vivier
2022-11-04 16:16   ` Laurent Vivier
2022-11-05  9:15     ` Stefan Weil via
2022-11-03 16:17 ` [PULL 05/10] libvhost-user: Fix format strings Laurent Vivier
2022-11-03 16:17 ` [PULL 06/10] libvhost-user: Add format attribute to local function vu_panic Laurent Vivier
2022-11-03 16:17 ` [PULL 07/10] target/m68k: Rename qregs.def -> qregs.h.inc Laurent Vivier
2022-11-03 16:17 ` [PULL 08/10] target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc Laurent Vivier
2022-11-03 16:17 ` [PULL 09/10] target/tricore: Rename csfr.def -> csfr.h.inc Laurent Vivier
2022-11-03 16:17 ` [PULL 10/10] tests/unit: simpler variable sequence for test-io-channel Laurent Vivier
2022-11-04 14:39 ` [PULL 00/10] Trivial branch for 7.2 patches Stefan Hajnoczi

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.