Skip to contentSkip to conversation

Trivial patches for 2025-10-29

GIT PULL Applied Michael Tokarev 2 participants 9 messages Oct 29, 2025 Networking

lore
Share & tools
lore
#0 lore raw

The following changes since commit bc831f37398b51dfe65d99a67bcff9352f84a9d2:

Merge tag 'hw-misc-20251028' of https://github.com/philmd/qemu into staging (2025-10-28 11:48:05 +0100)

are available in the Git repository at:

https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches

for you to fetch changes up to 7c7089321670fb51022a1c4493cbcc69aa288a0f:

linux-user: Use correct type for FIBMAP and FIGETBSZ emulation (2025-10-29 11:58:55 +0300)

----------------------------------------------------------------
trivial patches for 2025-10-29

----------------------------------------------------------------
Bastian Blank (1):
linux-user: Use correct type for FIBMAP and FIGETBSZ emulation

Nir Lichtman (1):
docs/system/keys: fix incorrect reset scaling key binding

Peter Maydell (1):
docs/system/sriov.rst: Fix typo in title

Thomas Huth (2):
tests/functional/i386: Remove unused variable from the replay test hw/xen: Avoid non-inclusive language in params.h

Vladimir Sementsov-Ogievskiy (2):
chardev: remove deprecated 'reconnect' option net/stream: remove deprecated 'reconnect' option

 chardev/char-socket.c                 | 24 +++++-------------------
 chardev/char.c                        |  3 ---
 docs/about/deprecated.rst             | 15 ---------------
 docs/about/removed-features.rst       | 22 ++++++++++++++++++++++
 docs/system/keys.rst.inc              |  2 +-
 docs/system/sriov.rst                 |  4 ++--
 include/hw/xen/interface/hvm/params.h |  9 ++-------
 linux-user/ioctls.h                   |  4 ++--
 net/stream.c                          | 20 +++++---------------
 qapi/char.json                        | 14 +-------------
 qapi/net.json                         | 13 +------------
 tests/functional/i386/test_replay.py  |  1 -
 12 files changed, 41 insertions(+), 90 deletions(-)
#1 lore raw

[PULL 1/7] chardev: remove deprecated 'reconnect' option

From: Vladimir Sementsov-Ogievskiy <[email protected]>

It was deprecated in 9.2, time to remove.

Note, that (which become obvious with this commit) we forget to do some checks for reconnect-ms options, for example, it was silently ignored for listening server, instead of error-out. The commit fixes this, as now we use reconnect_ms everywhere.

---
 chardev/char-socket.c           | 24 +++++-------------------
 chardev/char.c                  |  3 ---
 docs/about/deprecated.rst       |  6 ------
 docs/about/removed-features.rst | 12 ++++++++++++
 qapi/char.json                  | 14 +-------------
 5 files changed, 18 insertions(+), 41 deletions(-)
chardev/char-socket.c +5 -19
index cb4ec78ebe..62852e3caf 100644
@@ -1296,9 +1296,9 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
     /* Validate any options which have a dependency on address type */
     switch (addr->type) {
     case SOCKET_ADDRESS_TYPE_FD:
-        if (sock->has_reconnect) {
+        if (sock->has_reconnect_ms) {
             error_setg(errp,
-                       "'reconnect' option is incompatible with "
+                       "'reconnect-ms' option is incompatible with "
                        "'fd' address type");
             return false;
         }
@@ -1342,9 +1342,9 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
 
     /* Validate any options which have a dependency on client vs server */
     if (!sock->has_server || sock->server) {
-        if (sock->has_reconnect) {
+        if (sock->has_reconnect_ms) {
             error_setg(errp,
-                       "'reconnect' option is incompatible with "
+                       "'reconnect-ms' option is incompatible with "
                        "socket in server listen mode");
             return false;
         }
@@ -1361,12 +1361,6 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
         }
     }
 
-    if (sock->has_reconnect_ms && sock->has_reconnect) {
-        error_setg(errp,
-            "'reconnect' and 'reconnect-ms' are mutually exclusive");
-        return false;
-    }
-
     return true;
 }
 
@@ -1384,7 +1378,7 @@ static void qmp_chardev_open_socket(Chardev *chr,
     bool is_tn3270      = sock->has_tn3270  ? sock->tn3270  : false;
     bool is_waitconnect = sock->has_wait    ? sock->wait    : false;
     bool is_websock     = sock->has_websocket ? sock->websocket : false;
-    int64_t reconnect_ms = 0;
+    int64_t reconnect_ms = sock->has_reconnect_ms ? sock->reconnect_ms : 0;
     SocketAddress *addr;
 
     s->is_listen = is_listen;
@@ -1456,12 +1450,6 @@ static void qmp_chardev_open_socket(Chardev *chr,
             return;
         }
     } else {
-        if (sock->has_reconnect) {
-            reconnect_ms = sock->reconnect * 1000ULL;
-        } else if (sock->has_reconnect_ms) {
-            reconnect_ms = sock->reconnect_ms;
-        }
-
         if (qmp_chardev_open_socket_client(chr, reconnect_ms, errp) < 0) {
             return;
         }
@@ -1526,8 +1514,6 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
      */
     sock->has_wait = qemu_opt_find(opts, "wait") || sock->server;
     sock->wait = qemu_opt_get_bool(opts, "wait", true);
-    sock->has_reconnect = qemu_opt_find(opts, "reconnect");
-    sock->reconnect = qemu_opt_get_number(opts, "reconnect", 0);
     sock->has_reconnect_ms = qemu_opt_find(opts, "reconnect-ms");
     sock->reconnect_ms = qemu_opt_get_number(opts, "reconnect-ms", 0);
 
chardev/char.c +0 -3
index bbebd246c3..a43b7e5481 100644
@@ -892,9 +892,6 @@ QemuOptsList qemu_chardev_opts = {
         },{
             .name = "nodelay",
             .type = QEMU_OPT_BOOL,
-        },{
-            .name = "reconnect",
-            .type = QEMU_OPT_NUMBER,
         },{
             .name = "reconnect-ms",
             .type = QEMU_OPT_NUMBER,
docs/about/deprecated.rst +0 -6
index dacf2882e4..aff3f13163 100644
@@ -468,12 +468,6 @@ Backend ``memory`` (since 9.0)
 
 ``memory`` is a deprecated synonym for ``ringbuf``.
 
-``reconnect`` (since 9.2)
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The ``reconnect`` option only allows specifying second granularity timeouts,
-which is not enough for all types of use cases, use ``reconnect-ms`` instead.
-
 
 Net device options
 ''''''''''''''''''
docs/about/removed-features.rst +12 -0
index 53829f59e6..269f6bb654 100644
@@ -1367,4 +1367,16 @@ The ``blacklist`` config file option has been renamed to ``block-rpcs``
 (to be in sync with the renaming of the corresponding command line
 option).
 
+Device options
+--------------
+
+Character device options
+''''''''''''''''''''''''
+
+``reconnect`` (removed in 10.2)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``reconnect`` has been replaced by ``reconnect-ms``, which provides
+better precision.
+
 .. _Intel discontinuance notification: https://www.intel.com/content/www/us/en/content-details/781327/intel-is-discontinuing-ip-ordering-codes-listed-in-pdn2312-for-nios-ii-ip.html
qapi/char.json +1 -13
index f0a53f742c..b07e3bb827 100644
@@ -269,22 +269,11 @@
 # @websocket: enable websocket protocol on server sockets
 #     (default: false) (Since: 3.1)
 #
-# @reconnect: For a client socket, if a socket is disconnected, then
-#     attempt a reconnect after the given number of seconds.  Setting
-#     this to zero disables this function.  The use of this member is
-#     deprecated, use @reconnect-ms instead.  (default: 0) (Since: 2.2)
-#
 # @reconnect-ms: For a client socket, if a socket is disconnected,
 #     then attempt a reconnect after the given number of milliseconds.
-#     Setting this to zero disables this function.  This member is
-#     mutually exclusive with @reconnect.
+#     Setting this to zero disables this function.
 #     (default: 0) (Since: 9.2)
 #
-# Features:
-#
-# @deprecated: Member @reconnect is deprecated.  Use @reconnect-ms
-#     instead.
-#
 # Since: 1.4
 ##
 { 'struct': 'ChardevSocket',
@@ -297,7 +286,6 @@
             '*telnet': 'bool',
             '*tn3270': 'bool',
             '*websocket': 'bool',
-            '*reconnect': { 'type': 'int', 'features': [ 'deprecated' ] },
             '*reconnect-ms': 'int' },
   'base': 'ChardevCommon' }
 
Signature · 1 line
2.47.3
#2 lore raw

[PULL 3/7] docs/system/keys: fix incorrect reset scaling key binding

In reply to Michael Tokarev

From: Nir Lichtman <[email protected]>

Fix incorrect key binding for resetting the graphical frontends scaling

Fixes 15421f7113 "ui/sdl2: fix reset scaling binding to be consistent with gtk"
---
 docs/system/keys.rst.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/system/keys.rst.inc +1 -1
index c28ae1a227..3b5307b775 100644
@@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
   * - :kbd:`Ctrl+Alt+-`
     - Shrink the screen
 
-  * - :kbd:`Ctrl+Alt+u`
+  * - :kbd:`Ctrl+Alt+0`
     - Restore the screen's un-scaled dimensions
 
   * - :kbd:`Ctrl+Alt+n`
Signature · 1 line
2.47.3
#3 lore raw

[PULL 2/7] net/stream: remove deprecated 'reconnect' option

In reply to Michael Tokarev

From: Vladimir Sementsov-Ogievskiy <[email protected]>

It was deprecated in 9.2, time to remove.

---
 docs/about/deprecated.rst       |  9 ---------
 docs/about/removed-features.rst | 10 ++++++++++
 net/stream.c                    | 20 +++++---------------
 qapi/net.json                   | 13 +------------
 4 files changed, 16 insertions(+), 36 deletions(-)
docs/about/deprecated.rst +0 -9
index aff3f13163..bd86c036fb 100644
@@ -469,15 +469,6 @@ Backend ``memory`` (since 9.0)
 ``memory`` is a deprecated synonym for ``ringbuf``.
 
 
-Net device options
-''''''''''''''''''
-
-Stream ``reconnect`` (since 9.2)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The ``reconnect`` option only allows specifying second granularity timeouts,
-which is not enough for all types of use cases, use ``reconnect-ms`` instead.
-
 CPU device properties
 '''''''''''''''''''''
 
docs/about/removed-features.rst +10 -0
index 269f6bb654..88ea0dc4ed 100644
@@ -1379,4 +1379,14 @@ Character device options
 The ``reconnect`` has been replaced by ``reconnect-ms``, which provides
 better precision.
 
+Net device options
+''''''''''''''''''
+
+Stream ``reconnect`` (removed in 10.2)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``reconnect`` has been replaced by ``reconnect-ms``, which provides
+better precision.
+
+
 .. _Intel discontinuance notification: https://www.intel.com/content/www/us/en/content-details/781327/intel-is-discontinuing-ip-ordering-codes-listed-in-pdn2312-for-nios-ii-ip.html
net/stream.c +5 -15
index 94f823a2a7..ea83f4a763 100644
@@ -274,23 +274,13 @@ int net_init_stream(const Netdev *netdev, const char *name,
     sock = &netdev->u.stream;
 
     if (!sock->has_server || !sock->server) {
-        uint32_t reconnect_ms = 0;
-
-        if (sock->has_reconnect && sock->has_reconnect_ms) {
-            error_setg(errp, "'reconnect' and 'reconnect-ms' are mutually "
-                             "exclusive");
-            return -1;
-        } else if (sock->has_reconnect_ms) {
-            reconnect_ms = sock->reconnect_ms;
-        } else if (sock->has_reconnect) {
-            reconnect_ms = sock->reconnect * 1000u;
-        }
-
         return net_stream_client_init(peer, "stream", name, sock->addr,
-                                      reconnect_ms, errp);
+                                      sock->has_reconnect_ms ?
+                                          sock->reconnect_ms : 0,
+                                      errp);
     }
-    if (sock->has_reconnect || sock->has_reconnect_ms) {
-        error_setg(errp, "'reconnect' and 'reconnect-ms' options are "
+    if (sock->has_reconnect_ms) {
+        error_setg(errp, "'reconnect-ms' option is "
                          "incompatible with socket in server mode");
         return -1;
     }
qapi/net.json +1 -12
index 60d196afe5..7f62f8cc39 100644
@@ -770,29 +770,18 @@
 #
 # @server: create server socket (default: false)
 #
-# @reconnect: For a client socket, if a socket is disconnected, then
-#     attempt a reconnect after the given number of seconds.  Setting
-#     this to zero disables this function.  (default: 0) (since 8.0)
-#
 # @reconnect-ms: For a client socket, if a socket is disconnected, then
 #     attempt a reconnect after the given number of milliseconds.  Setting
-#     this to zero disables this function.  This member is mutually
-#     exclusive with @reconnect.  (default: 0) (Since: 9.2)
+#     this to zero disables this function.  (default: 0) (Since: 9.2)
 #
 # Only `SocketAddress` types 'unix', 'inet' and 'fd' are supported.
 #
-# Features:
-#
-# @deprecated: Member @reconnect is deprecated.  Use @reconnect-ms
-#     instead.
-#
 # Since: 7.2
 ##
 { 'struct': 'NetdevStreamOptions',
   'data': {
     'addr':   'SocketAddress',
     '*server': 'bool',
-    '*reconnect': { 'type': 'int', 'features': [ 'deprecated' ] },
     '*reconnect-ms': 'int' } }
 
 ##
Signature · 1 line
2.47.3
#4 lore raw

[PULL 4/7] tests/functional/i386: Remove unused variable from the replay test

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

Remove a left-over from the time when this test was still an avocado-based test.

---
 tests/functional/i386/test_replay.py | 1 -
 1 file changed, 1 deletion(-)
tests/functional/i386/test_replay.py +0 -1
index 7c4c2602da..3a92ecde17 100755
@@ -17,7 +17,6 @@ class I386Replay(ReplayKernelBase):
 
     def test_pc(self):
         self.set_machine('pc')
-        kernel_url = ()
         kernel_path = self.ASSET_KERNEL.fetch()
         kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
         console_pattern = 'VFS: Cannot open root device'
Signature · 1 line
2.47.3
#5 lore raw

[PULL 5/7] docs/system/sriov.rst: Fix typo in title

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

Fix a typo in the title of the sriov.rst document.

---
 docs/system/sriov.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
docs/system/sriov.rst +2 -2
index d12178f3c3..b19e787339 100644
@@ -1,7 +1,7 @@
 .. SPDX-License-Identifier: GPL-2.0-or-later
 
-Compsable SR-IOV device
-=======================
+Composable SR-IOV device
+========================
 
 SR-IOV (Single Root I/O Virtualization) is an optional extended capability of a
 PCI Express device. It allows a single physical function (PF) to appear as
Signature · 1 line
2.47.3
#6 lore raw

[PULL 6/7] hw/xen: Avoid non-inclusive language in params.h

In reply to Michael Tokarev

From: Thomas Huth <[email protected]>

Copy the latest version of Xen's params.h to the QEMU repository:

https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=0291089f6ea81690f37035a124d54c51fa7ba097#patch8

With this patch, we get rid of a non-inclusive word in the comment there.

---
 include/hw/xen/interface/hvm/params.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
include/hw/xen/interface/hvm/params.h +2 -7
index a22b4ed45d..99c40b4287 100644
@@ -246,16 +246,11 @@
 #define HVM_PARAM_VM_GENERATION_ID_ADDR 34
 
 /*
- * Set mode for altp2m:
- *  disabled: don't activate altp2m (default)
+ * Get mode for altp2m:
+ *  disabled: altp2m not active (default)
  *  mixed: allow access to all altp2m ops for both in-guest and external tools
  *  external: allow access to external privileged tools only
  *  limited: guest only has limited access (ie. control VMFUNC and #VE)
- *
- * Note that 'mixed' mode has not been evaluated for safety from a
- * security perspective.  Before using this mode in a
- * security-critical environment, each subop should be evaluated for
- * safety, with unsafe subops blacklisted in XSM.
  */
 #define HVM_PARAM_ALTP2M       35
 #define XEN_ALTP2M_disabled      0
Signature · 1 line
2.47.3
#7 lore raw

[PULL 7/7] linux-user: Use correct type for FIBMAP and FIGETBSZ emulation

In reply to Michael Tokarev

From: Bastian Blank <[email protected]>

Both the FIBMAP and FIGETBSZ ioctl get "int *" (pointer to 32bit integer) as argument, not "long *" as specified in qemu. Using the correct type makes the emulation work in cross endian context.

Both ioctl does not seem to be documented. However the kernel implementation has always used "int *".

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3185

---
 linux-user/ioctls.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/ioctls.h +2 -2
index 3b41128fd7..2f62fd2cb9 100644
@@ -130,7 +130,7 @@
      IOCTL(FDTWADDLE, 0, TYPE_NULL)
      IOCTL(FDEJECT, 0, TYPE_NULL)
 
-     IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_LONG))
+     IOCTL(FIBMAP, IOC_W | IOC_R, MK_PTR(TYPE_INT))
 #ifdef FICLONE
      IOCTL(FICLONE, IOC_W, TYPE_INT)
      IOCTL(FICLONERANGE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_file_clone_range)))
@@ -145,7 +145,7 @@
      IOCTL(FITRIM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_fstrim_range)))
 #endif
 
-     IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_LONG))
+     IOCTL(FIGETBSZ, IOC_R, MK_PTR(TYPE_INT))
 #ifdef CONFIG_FIEMAP
      IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap,
                    MK_PTR(MK_STRUCT(STRUCT_fiemap)))
Signature · 1 line
2.47.3
#8 lore raw
In reply to Michael Tokarev
Quoted 6 lines · Michael Tokarev

The following changes since commit bc831f37398b51dfe65d99a67bcff9352f84a9d2:

   Merge tag 'hw-misc-20251028' ofhttps://github.com/philmd/qemu into staging (2025-10-28 11:48:05 +0100)

are available in the Git repository at:

Quoted 8 lines

https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches

for you to fetch changes up to 7c7089321670fb51022a1c4493cbcc69aa288a0f:

linux-user: Use correct type for FIBMAP and FIGETBSZ emulation (2025-10-29 11:58:55 +0300)

----------------------------------------------------------------
trivial patches for 2025-10-29

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.

r~