Skip to contentSkip to conversation

Trivial patches for 2025-10-05

GIT PULL Applied Michael Tokarev 2 participants 10 messages Oct 5, 2025 – Oct 6, 2025

lore
Share & tools
lore
#0 lore raw

The following changes since commit bd6aa0d1e59d71218c3eee055bc8d222c6e1a628:

Merge tag 'staging-pull-request' of https://gitlab.com/peterx/qemu into staging (2025-10-04 09:10:58 -0700)

are available in the Git repository at:

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

for you to fetch changes up to 0af5926a0feb0b69a127f5c24eaa605408fed2ec:

system/runstate: remove duplicate in runstate transitions (2025-10-05 09:46:06 +0300)

----------------------------------------------------------------
trivial patches for 2025-10-05

Just a bunch of tiny fixes everywhere.

----------------------------------------------------------------
Filip Hejsek (1):
ui/gtk: Fix callback function signature

Marco Cavenati (1):
system/runstate: remove duplicate in runstate transitions

Michael Tokarev (1):
vhost-user-test: remove trailing newlines in g_test_message() calls

Peter Maydell (1):
docs/specs/spdm.rst: Fix typo in x86_64 architecture name

ShengYi Hung (2):
hid: fix incorrect return value for hid
wdt_i6300esb: fix incorrect mask for interrupt type

SillyZ (1):
hw/net/can: Remove redundant status bit setting in can_sja1000

nanliu (1):
docs/devel: Correct uefi-vars-x64 device name

 docs/devel/uefi-vars.rst      |  4 ++--
 docs/specs/spdm.rst           |  2 +-
 hw/input/hid.c                |  1 +
 hw/net/can/can_sja1000.c      |  1 -
 hw/watchdog/wdt_i6300esb.c    |  2 +-
 system/runstate.c             |  4 +---
 tests/qtest/vhost-user-test.c | 14 +++++++-------
 ui/gtk.c                      |  4 ++--
 8 files changed, 15 insertions(+), 17 deletions(-)
#1 lore raw

[PULL 1/8] ui/gtk: Fix callback function signature

From: Filip Hejsek <[email protected]>

The correct type for opaque pointer is gpointer, not gpointer * (which is a pointer to a pointer).

---
 ui/gtk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ui/gtk.c +2 -2
index 9a08cadc88..48571bedbf 100644
@@ -766,9 +766,9 @@ static gboolean gd_render_event(GtkGLArea *area, GdkGLContext *context,
 }
 
 static void gd_resize_event(GtkGLArea *area,
-                            gint width, gint height, gpointer *opaque)
+                            gint width, gint height, gpointer opaque)
 {
-    VirtualConsole *vc = (void *)opaque;
+    VirtualConsole *vc = opaque;
     double pw = width, ph = height;
     double sx = vc->gfx.scale_x, sy = vc->gfx.scale_y;
     GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(area));
Signature · 1 line
2.47.3
#2 lore raw

[PULL 3/8] vhost-user-test: remove trailing newlines in g_test_message() calls

In reply to Michael Tokarev
Fixes c9a1ea9c52 Revert "tests/qtest: use qos_printf instead of g_test_message"
---
 tests/qtest/vhost-user-test.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
tests/qtest/vhost-user-test.c +7 -7
index 6ec4ec2d5a..609ff24059 100644
@@ -391,7 +391,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
          * We don't need to do anything here, the remote is just
          * letting us know it is in charge. Just log it.
          */
-        g_test_message("set_owner: start of session\n");
+        g_test_message("set_owner: start of session");
         break;
 
     case VHOST_USER_GET_PROTOCOL_FEATURES:
@@ -417,7 +417,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
          * the remote end to send this. There is no handshake reply so
          * just log the details for debugging.
          */
-        g_test_message("set_protocol_features: 0x%"PRIx64 "\n", msg.payload.u64);
+        g_test_message("set_protocol_features: 0x%"PRIx64, msg.payload.u64);
         break;
 
         /*
@@ -425,11 +425,11 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
          * address of the vrings but we can simply report them.
          */
     case VHOST_USER_SET_VRING_NUM:
-        g_test_message("set_vring_num: %d/%d\n",
+        g_test_message("set_vring_num: %d/%d",
                    msg.payload.state.index, msg.payload.state.num);
         break;
     case VHOST_USER_SET_VRING_ADDR:
-        g_test_message("set_vring_addr: 0x%"PRIx64"/0x%"PRIx64"/0x%"PRIx64"\n",
+        g_test_message("set_vring_addr: 0x%"PRIx64"/0x%"PRIx64"/0x%"PRIx64,
                    msg.payload.addr.avail_user_addr,
                    msg.payload.addr.desc_user_addr,
                    msg.payload.addr.used_user_addr);
@@ -462,7 +462,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
     case VHOST_USER_SET_VRING_CALL:
         /* consume the fd */
         if (!qemu_chr_fe_get_msgfds(chr, &fd, 1) && fd < 0) {
-            g_test_message("call fd: %d, do not set non-blocking\n", fd);
+            g_test_message("call fd: %d, do not set non-blocking", fd);
             break;
         }
         /*
@@ -507,12 +507,12 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
          * fully functioning vhost-user we would enable/disable the
          * vring monitoring.
          */
-        g_test_message("set_vring(%d)=%s\n", msg.payload.state.index,
+        g_test_message("set_vring(%d)=%s", msg.payload.state.index,
                    msg.payload.state.num ? "enabled" : "disabled");
         break;
 
     default:
-        g_test_message("vhost-user: un-handled message: %d\n", msg.request);
+        g_test_message("vhost-user: un-handled message: %d", msg.request);
         break;
     }
 
Signature · 1 line
2.47.3
#3 lore raw

[PULL 8/8] system/runstate: remove duplicate in runstate transitions

In reply to Michael Tokarev

From: Marco Cavenati <[email protected]>

Remove duplicate entry PRELAUNCH->INMIGRATE from runstate_transitions_def. Move PRELAUNCH->SUSPENDED entry with all the other PRELAUNCH->XXX entries.

---
 system/runstate.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
system/runstate.c +1 -3
index 6178b0091a..32467aa882 100644
@@ -76,9 +76,6 @@ typedef struct {
 } RunStateTransition;
 
 static const RunStateTransition runstate_transitions_def[] = {
-    { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
-    { RUN_STATE_PRELAUNCH, RUN_STATE_SUSPENDED },
-
     { RUN_STATE_DEBUG, RUN_STATE_RUNNING },
     { RUN_STATE_DEBUG, RUN_STATE_FINISH_MIGRATE },
     { RUN_STATE_DEBUG, RUN_STATE_PRELAUNCH },
@@ -118,6 +115,7 @@ static const RunStateTransition runstate_transitions_def[] = {
     { RUN_STATE_PRELAUNCH, RUN_STATE_RUNNING },
     { RUN_STATE_PRELAUNCH, RUN_STATE_FINISH_MIGRATE },
     { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
+    { RUN_STATE_PRELAUNCH, RUN_STATE_SUSPENDED },
 
     { RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
     { RUN_STATE_FINISH_MIGRATE, RUN_STATE_PAUSED },
Signature · 1 line
2.47.3
#4 lore raw

[PULL 6/8] docs/devel: Correct uefi-vars-x64 device name

In reply to Michael Tokarev

From: nanliu <[email protected]>

The documentation for UEFI variable storage in uefi-vars.rst incorrectly listed the device name as uefi-vars-x86.

The correct device name as implemented in the source code is uefi-vars-x64.

This commit updates the documentation to use the correct name, aligning it with the implementation.

---
 docs/devel/uefi-vars.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
docs/devel/uefi-vars.rst +2 -2
index 0151a26a0a..b4013b5d12 100644
@@ -34,7 +34,7 @@ configures the shared buffer location and size, and traps to the host
 to process the requests.
 
 The ``uefi-vars`` device implements the UEFI virtual device.  It comes
-in ``uefi-vars-x86`` and ``uefi-vars-sysbus`` flavours.  The device
+in ``uefi-vars-x64`` and ``uefi-vars-sysbus`` flavours.  The device
 reimplements the handlers needed, specifically
 ``EfiSmmVariableProtocol`` and ``VarCheckPolicyLibMmiHandler``.  It
 also consumes events (``EfiEndOfDxeEventGroup``,
@@ -57,7 +57,7 @@ usage on x86_64
 .. code::
 
    qemu-system-x86_64 \
-      -device uefi-vars-x86,jsonfile=/path/to/vars.json
+      -device uefi-vars-x64,jsonfile=/path/to/vars.json
 
 usage on aarch64
 ----------------
Signature · 1 line
2.47.3
#5 lore raw

[PULL 7/8] docs/specs/spdm.rst: Fix typo in x86_64 architecture name

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The spdm.rst docs call the 64-bit x86 architecture "x64-64". This is a typo; correct it to our canonical name for the architecture, "x86_64".

---
 docs/specs/spdm.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/specs/spdm.rst +1 -1
index f7de080ff0..0e3ad25bc6 100644
@@ -102,7 +102,7 @@ Then you can add this to your QEMU command line:
 
 At which point QEMU will try to connect to the SPDM server.
 
-Note that if using x64-64 you will want to use the q35 machine instead
+Note that if using x86_64 you will want to use the q35 machine instead
 of the default. So the entire QEMU command might look like this
 
 .. code-block:: shell
Signature · 1 line
2.47.3
#6 lore raw

[PULL 5/8] wdt_i6300esb: fix incorrect mask for interrupt type

In reply to Michael Tokarev

From: ShengYi Hung <[email protected]>

According to Intel 6300ESB Controller Hub Datasheet 14.4.15, the interrupt type mask should be 0x03 (0b11) instead of 0x11. In the original implementation, when we want to disable all interrupt by setting the value to 0x03, we will get 0x01 which is incorrect when we want to read the value again. However, there is no problem when considering the correct behavior since 0x01 is reserved and unused just like 0x03. This patch is just a fix to return the register value.

---
 hw/watchdog/wdt_i6300esb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/watchdog/wdt_i6300esb.c +1 -1
index bb8a2766b6..3aa01b8d68 100644
@@ -55,7 +55,7 @@
 /* Config register bits */
 #define ESB_WDT_REBOOT  (0x01 << 5)   /* Enable reboot on timeout          */
 #define ESB_WDT_FREQ    (0x01 << 2)   /* Decrement frequency               */
-#define ESB_WDT_INTTYPE (0x11 << 0)   /* Interrupt type on timer1 timeout  */
+#define ESB_WDT_INTTYPE (0x03 << 0)   /* Interrupt type on timer1 timeout  */
 
 /* Reload register bits */
 #define ESB_WDT_RELOAD  (0x01 << 8)    /* prevent timeout                   */
Signature · 1 line
2.47.3
#7 lore raw

[PULL 2/8] hw/net/can: Remove redundant status bit setting in can_sja1000

In reply to Michael Tokarev

From: SillyZ <[email protected]>

In PeliCAN mode reception, the RBS (Receive Buffer Status) bit is set twice at line 842 and 845 with identical operations:
s->status_pel |= 0x01;
s->status_pel |= (1 << 0);

Between these two operations, only interrupt_pel is modified and status_pel bit 4 is cleared, neither affecting bit 0. The second operation is redundant.

This cleanup aligns PeliCAN mode with BasicCAN mode, which correctly sets this bit only once (line 883).

---
 hw/net/can/can_sja1000.c | 1 -
 1 file changed, 1 deletion(-)
hw/net/can/can_sja1000.c +0 -1
index 5b6ba9df6c..6b08e977a1 100644
@@ -842,7 +842,6 @@ ssize_t can_sja_receive(CanBusClientState *client, const qemu_can_frame *frames,
         s->status_pel |= 0x01; /* Set the Receive Buffer Status. DS-p23 */
         s->interrupt_pel |= 0x01;
         s->status_pel &= ~(1 << 4);
-        s->status_pel |= (1 << 0);
         can_sja_update_pel_irq(s);
     } else { /* BasicCAN mode */
 
Signature · 1 line
2.47.3
#8 lore raw

[PULL 4/8] hid: fix incorrect return value for hid

In reply to Michael Tokarev

From: ShengYi Hung <[email protected]>

The return value of hid_keyboard_write is used to set the packet's actual_length and pass to xhci directly to allow guest know how many byte actually processed. Therefore, return 1 to indicate a successful transfer or it will be considered as a wrong xfer.

---
 hw/input/hid.c | 1 +
 1 file changed, 1 insertion(+)
hw/input/hid.c +1 -0
index 76bedc1844..de24cd0ef0 100644
@@ -478,6 +478,7 @@ int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len)
             ledstate |= QEMU_CAPS_LOCK_LED;
         }
         kbd_put_ledstate(ledstate);
+        return 1;
     }
     return 0;
 }
Signature · 1 line
2.47.3
#9 lore raw
In reply to Michael Tokarev
Quoted 8 lines · Michael Tokarev

The following changes since commit bd6aa0d1e59d71218c3eee055bc8d222c6e1a628:

   Merge tag 'staging-pull-request' ofhttps://gitlab.com/peterx/qemu into staging (2025-10-04 09:10:58 -0700)

are available in the Git repository at:

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

Quoted 8 lines

for you to fetch changes up to 0af5926a0feb0b69a127f5c24eaa605408fed2ec:

   system/runstate: remove duplicate in runstate transitions (2025-10-05 09:46:06 +0300)

----------------------------------------------------------------
trivial patches for 2025-10-05

Just a bunch of tiny fixes everywhere.

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

r~