All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/25] Build, memory, i386 patches for 2026-04-23
@ 2026-04-23 10:28 Paolo Bonzini
  2026-04-23 10:28 ` [PULL 01/25] target/i386: fix strList leak in x86_cpu_get_unavailable_features Paolo Bonzini
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:28 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit bb230769b4d01de714bed686161ad39a8f4f3fd1:

  Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2026-04-22 14:30:04 -0400)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 9d46d35abd79b7efd135ff384a4a0d86abf423f1:

  target/i386: emulate: include name of unhandled instruction (2026-04-23 12:27:27 +0200)

----------------------------------------------------------------
* accel/mshv: ioeventfd fixes
* memory: avoid memmove in flatview_simplify()
* first batch of clang-cl support patches for qemu-ga
* target/i386: fix emulator issue
* target/i386: fix strList leak
* target/i386: emulate: include name of unhandled instruction
* target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode
* thread-win32: replace CRITICAL_SECTION with SRWLOCK
* target/i386: fix missing PF_INSTR in SIGSEGV context
* util: actually use in pthread_condattr_setclock
* vapic: restore IRQ polling for non-kernel irqchip backends

----------------------------------------------------------------
Aastha Rawat (2):
      accel/mshv: fix ioeventfd deassignment to forward correct datamatch value
      accel/mshv: return correct errno value from ioeventfd failure

Bin Guo (1):
      memory: Optimize flatview_simplify() to eliminate redundant memmove calls

Kostiantyn Kostiuk (13):
      meson: Use stddef.h instead of unistd.h
      qom: Use g_ascii_strcasecmp instead of strcasecmp
      block: Use glib2 instead of strcasecmp/strncasecmp
      io: Use glib2 instead of strcasecmp/strncasecmp
      target/sparc: Use glib2 instead of strcasecmp/strncasecmp
      target/riscv: Use glib2 instead of strcasecmp/strncasecmp
      target/ppc: Use glib2 instead of strcasecmp/strncasecmp
      target/xtensa: Use glib2 instead of strcasecmp/strncasecmp
      hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
      osdep: Remove unused strings.h
      util: Remove unused dirent.h
      util: Remove unused sys/param.h
      meson: Don't require nm for non-modular builds

Magnus Kulke (1):
      target/i386/mshv: Fix segment regression in MMIO emu

Marc-André Lureau (1):
      target/i386: fix strList leak in x86_cpu_get_unavailable_features

Mohamed Mediouni (1):
      target/i386: emulate: include name of unhandled instruction

Paolo Bonzini (3):
      storage-daemon: use same link arguments as other tools
      target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode
      thread-win32: replace CRITICAL_SECTION with SRWLOCK

Simon Scherer (1):
      target/i386: fix missing PF_INSTR in SIGSEGV context

Stepan Popov (1):
      meson: add missing semicolon in pthread_condattr_setclock test

rickgcn (1):
      hw: i386: vapic: restore IRQ polling for non-kernel irqchip backends

 meson.build                        | 37 ++++++++++++++++++++-----------------
 include/qemu/osdep.h               |  1 -
 accel/mshv/mshv-all.c              | 23 +++++++++++++++++++----
 block/curl.c                       |  4 ++--
 hw/i386/vapic.c                    |  3 +--
 hw/ppc/spapr_caps.c                |  2 +-
 io/channel-websock.c               |  4 ++--
 qom/object.c                       |  4 ++--
 system/memory.c                    | 27 ++++++++++++++-------------
 target/i386/cpu.c                  |  1 +
 target/i386/emulate/x86_emu.c      |  4 ++--
 target/i386/mshv/mshv-cpu.c        | 37 +++++++++++++++++++++++++++++++------
 target/i386/tcg/user/excp_helper.c |  7 ++++---
 target/ppc/kvm.c                   |  2 +-
 target/riscv/monitor.c             |  4 ++--
 target/sparc/cpu.c                 |  8 ++++----
 target/xtensa/xtensa-isa.c         |  4 ++--
 util/path.c                        |  2 --
 util/qemu-thread-win32.c           | 16 ++++++----------
 target/i386/tcg/decode-new.c.inc   | 16 ++++++++++------
 storage-daemon/meson.build         | 16 ++++++++--------
 21 files changed, 132 insertions(+), 90 deletions(-)
-- 
2.53.0



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

* [PULL 01/25] target/i386: fix strList leak in x86_cpu_get_unavailable_features
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
@ 2026-04-23 10:28 ` Paolo Bonzini
  2026-04-23 10:28 ` [PULL 02/25] target/i386: fix missing PF_INSTR in SIGSEGV context Paolo Bonzini
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, qemu-stable

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The result list built by x86_cpu_list_feature_names() was never freed
after being visited, causing a memory leak detected by ASan.
(the getter visitor is VISITOR_OUTPUT kind and doesn't own data)

Fixes: 506174bf8219 ("i386: "unavailable-features" QOM property")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/r/20260413125040.3842686-1-marcandre.lureau@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index c6fd1dc00eb..9d126600c05 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -7842,6 +7842,7 @@ static void x86_cpu_get_unavailable_features(Object *obj, Visitor *v,
 
     x86_cpu_list_feature_names(xc->filtered_features, &result);
     visit_type_strList(v, "unavailable-features", &result, errp);
+    qapi_free_strList(result);
 }
 
 /* Print all cpuid feature names in featureset
-- 
2.53.0



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

* [PULL 02/25] target/i386: fix missing PF_INSTR in SIGSEGV context
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
  2026-04-23 10:28 ` [PULL 01/25] target/i386: fix strList leak in x86_cpu_get_unavailable_features Paolo Bonzini
@ 2026-04-23 10:28 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 03/25] hw: i386: vapic: restore IRQ polling for non-kernel irqchip backends Paolo Bonzini
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Simon Scherer, qemu-stable

From: Simon Scherer <scherer.simon89@gmail.com>

When running linux-user emulation, the SIGSEGV handler does not
correctly set the 4th bit (PF_INSTR) in the error_code variable of
the context argument (context->uc_mcontext.gregs[REG_ERR]).

Because this bit is never set, guest applications cannot distinguish
if a fault was due to missing executable permissions. This patch
ensures that when a page fault occurs during an instruction fetch,
the PF_INSTR flag is properly populated in the signal context.

Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3384
Signed-off-by: Simon Scherer <scherer.simon89@gmail.com>
Link: https://lore.kernel.org/r/20260413115622.160212-1-scherer.simon89@gmail.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/user/excp_helper.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/target/i386/tcg/user/excp_helper.c b/target/i386/tcg/user/excp_helper.c
index 98fab4cbc3f..6c5df5e0e88 100644
--- a/target/i386/tcg/user/excp_helper.c
+++ b/target/i386/tcg/user/excp_helper.c
@@ -36,9 +36,10 @@ void x86_cpu_record_sigsegv(CPUState *cs, vaddr addr,
      * signal and set exception_index to EXCP_INTERRUPT.
      */
     env->cr[2] = addr;
-    env->error_code = ((access_type == MMU_DATA_STORE) << PG_ERROR_W_BIT)
-                    | (maperr ? 0 : PG_ERROR_P_MASK)
-                    | PG_ERROR_U_MASK;
+    env->error_code = (maperr ? 0 : PG_ERROR_P_MASK)
+                    | ((access_type == MMU_DATA_STORE) << PG_ERROR_W_BIT)
+                    | PG_ERROR_U_MASK
+                    | ((access_type == MMU_INST_FETCH) ? PG_ERROR_I_D_MASK : 0);
     cs->exception_index = EXCP0E_PAGE;
 
     /* Disable do_interrupt_user. */
-- 
2.53.0



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

* [PULL 03/25] hw: i386: vapic: restore IRQ polling for non-kernel irqchip backends
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
  2026-04-23 10:28 ` [PULL 01/25] target/i386: fix strList leak in x86_cpu_get_unavailable_features Paolo Bonzini
  2026-04-23 10:28 ` [PULL 02/25] target/i386: fix missing PF_INSTR in SIGSEGV context Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 04/25] meson: Use stddef.h instead of unistd.h Paolo Bonzini
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: rickgcn, qemu-stable

From: rickgcn <rickgcn@gmail.com>

69dfc078 extended vAPIC handling for WHPX with user-mode irqchip, but it
also changed vapic_write() case 4 in a way that excludes TCG from
apic_poll_irq().

Before that change, IRQ polling happened whenever no in-kernel irqchip
was active. After the change, it only happened for KVM or WHPX with a
user-mode irqchip. Under TCG, both kvm_enabled() and whpx_enabled() are
false, so the poll never happens.

This regresses 32-bit Windows XP guests on a Windows host with
-machine pc-i440fx-10.0,accel=tcg, causing a STOP 0x0000000A during boot.

Fix it by making the decision depend on whether KVM or WHPX is using an
in-kernel irqchip, instead of whether either accelerator is enabled.

Fixes: 69dfc078a6f0 ("hw: i386: vapic: enable on WHPX with user-mode irqchip")

Signed-off-by: rickgcn <rickgcn@gmail.com>
Link: https://lore.kernel.org/r/20260418061429.16898-1-rickgcn@gmail.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/vapic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c
index 41e5ca26dfd..1acb9f91b2a 100644
--- a/hw/i386/vapic.c
+++ b/hw/i386/vapic.c
@@ -716,8 +716,7 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
         break;
     default:
     case 4:
-        if ((kvm_enabled() && !kvm_irqchip_in_kernel())
-          || (whpx_enabled() && !whpx_irqchip_in_kernel())) {
+        if (!kvm_irqchip_in_kernel() && !whpx_irqchip_in_kernel()) {
             apic_poll_irq(cpu->apic_state);
         }
         break;
-- 
2.53.0



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

* [PULL 04/25] meson: Use stddef.h instead of unistd.h
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 03/25] hw: i386: vapic: restore IRQ polling for non-kernel irqchip backends Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 05/25] qom: Use g_ascii_strcasecmp instead of strcasecmp Paolo Bonzini
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

POSIX says stddef.h provides size_t, which is the only thing
we care about here. unistd.h can be missing in non-POSIX runtimes,
so include stddef.h instead.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-2-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index ab3e97eb9f4..457491c34e2 100644
--- a/meson.build
+++ b/meson.build
@@ -1068,7 +1068,7 @@ endif
 
 if not cc.compiles('''
   #include <glib.h>
-  #include <unistd.h>
+  #include <stddef.h>
 
   #define QEMU_BUILD_BUG_ON(x) \
   typedef char qemu_build_bug_on[(x)?-1:1] __attribute__((unused));
-- 
2.53.0



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

* [PULL 05/25] qom: Use g_ascii_strcasecmp instead of strcasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (3 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 04/25] meson: Use stddef.h instead of unistd.h Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 06/25] block: Use glib2 instead of strcasecmp/strncasecmp Paolo Bonzini
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here
 (2) we want the comparison on class names to be a plain ASCII
     one, not to do weird things with "I" in Turkish locales,
     so g_ascii_strcasecmp() is better as it's explicit about that

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20260327134401.270186-3-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qom/object.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index ff8ede8a328..e5c0c2f53ed 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1193,8 +1193,8 @@ GSList *object_class_get_list(const char *implements_type,
 
 static gint object_class_cmp(gconstpointer a, gconstpointer b, gpointer d)
 {
-    return strcasecmp(object_class_get_name((ObjectClass *)a),
-                      object_class_get_name((ObjectClass *)b));
+    return g_ascii_strcasecmp(object_class_get_name((ObjectClass *)a),
+                              object_class_get_name((ObjectClass *)b));
 }
 
 GSList *object_class_get_list_sorted(const char *implements_type,
-- 
2.53.0



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

* [PULL 06/25] block: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (4 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 05/25] qom: Use g_ascii_strcasecmp instead of strcasecmp Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 07/25] io: " Paolo Bonzini
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here
 (2) we want the comparison on url prefix and it should be a plain ASCII
     one, not to do weird things with "I" in Turkish locales,
     so g_ascii_strcasecmp() is better as it's explicit about that

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-4-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/curl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/curl.c b/block/curl.c
index 419df78258b..684c677ef71 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -871,8 +871,8 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags,
         goto out;
     }
 
-    if ((!strncasecmp(s->url, "http://", strlen("http://"))
-        || !strncasecmp(s->url, "https://", strlen("https://")))
+    if ((!g_ascii_strncasecmp(s->url, "http://", strlen("http://"))
+        || !g_ascii_strncasecmp(s->url, "https://", strlen("https://")))
         && !s->accept_range) {
         pstrcpy(state->errmsg, CURL_ERROR_SIZE,
                 "Server does not support 'range' (byte ranges).");
-- 
2.53.0



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

* [PULL 07/25] io: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (5 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 06/25] block: Use glib2 instead of strcasecmp/strncasecmp Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 08/25] target/sparc: " Paolo Bonzini
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here
 (2) we want the comparison data in HTTP header and it should be a plain
     ASCII one, not to do weird things with "I" in Turkish locales,
     so g_ascii_strcasecmp() is better as it's explicit about that

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-5-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 io/channel-websock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/channel-websock.c b/io/channel-websock.c
index 9902b014f79..85b22a8822a 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -457,7 +457,7 @@ static void qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
     connectionv = g_strsplit(connection, ",", 0);
     for (i = 0; connectionv != NULL && connectionv[i] != NULL; i++) {
         g_strstrip(connectionv[i]);
-        if (strcasecmp(connectionv[i],
+        if (g_ascii_strcasecmp(connectionv[i],
                        QIO_CHANNEL_WEBSOCK_CONNECTION_UPGRADE) == 0) {
             upgraded = true;
         }
@@ -468,7 +468,7 @@ static void qio_channel_websock_handshake_process(QIOChannelWebsock *ioc,
         goto bad_request;
     }
 
-    if (strcasecmp(upgrade, QIO_CHANNEL_WEBSOCK_UPGRADE_WEBSOCKET) != 0) {
+    if (g_ascii_strcasecmp(upgrade, QIO_CHANNEL_WEBSOCK_UPGRADE_WEBSOCKET) != 0) {
         error_setg(errp, "Incorrect upgrade method '%s'", upgrade);
         goto bad_request;
     }
-- 
2.53.0



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

* [PULL 08/25] target/sparc: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (6 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 07/25] io: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 09/25] target/riscv: " Paolo Bonzini
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here
 (2) we want the comparison on boolean property value to be a plain
     ASCII one, not to do weird things with "I" in Turkish locales,
     so g_ascii_strcasecmp() is better as it's explicit about that

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-7-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/sparc/cpu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index 1493336e7a2..77046104284 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -174,10 +174,10 @@ static void sparc_cpu_parse_features(const char *typename, char *features,
              * TODO: remove minus-override-plus semantics after
              *       warning for a few releases
              */
-            if (!strcasecmp(val, "on") ||
-                !strcasecmp(val, "off") ||
-                !strcasecmp(val, "true") ||
-                !strcasecmp(val, "false")) {
+            if (!g_ascii_strcasecmp(val, "on") ||
+                !g_ascii_strcasecmp(val, "off") ||
+                !g_ascii_strcasecmp(val, "true") ||
+                !g_ascii_strcasecmp(val, "false")) {
                 error_setg(errp, "Boolean properties in format %s=%s"
                                  " are not supported", name, val);
                 return;
-- 
2.53.0



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

* [PULL 09/25] target/riscv: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (7 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 08/25] target/sparc: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 10/25] target/ppc: " Paolo Bonzini
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Chao Liu, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-8-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/riscv/monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/riscv/monitor.c b/target/riscv/monitor.c
index a9d31114442..bca04a7580c 100644
--- a/target/riscv/monitor.c
+++ b/target/riscv/monitor.c
@@ -303,7 +303,7 @@ static bool reg_is_vreg(const char *name)
     }
 
     for (int i = 0; i < 32; i++) {
-        if (strcasecmp(name, riscv_rvv_regnames[i]) == 0) {
+        if (g_ascii_strcasecmp(name, riscv_rvv_regnames[i]) == 0) {
             return true;
         }
     }
@@ -358,7 +358,7 @@ int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval)
             continue;
         }
 
-        if (strcasecmp(csr_ops[csrno].name, name) != 0) {
+        if (g_ascii_strcasecmp(csr_ops[csrno].name, name) != 0) {
             continue;
         }
 
-- 
2.53.0



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

* [PULL 10/25] target/ppc: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (8 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 09/25] target/riscv: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 11/25] target/xtensa: " Paolo Bonzini
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-9-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/ppc/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 41bd03ec2a2..25c28ad089c 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2653,7 +2653,7 @@ static int kvm_ppc_register_host_cpu_type(void)
      */
     dc = DEVICE_CLASS(ppc_cpu_get_family_class(pvr_pcc));
     for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
-        if (strcasecmp(ppc_cpu_aliases[i].alias, dc->desc) == 0) {
+        if (g_ascii_strcasecmp(ppc_cpu_aliases[i].alias, dc->desc) == 0) {
             char *suffix;
 
             ppc_cpu_aliases[i].model = g_strdup(object_class_get_name(oc));
-- 
2.53.0



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

* [PULL 11/25] target/xtensa: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (9 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 10/25] target/ppc: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 12/25] hw/ppc: " Paolo Bonzini
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-10-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/xtensa/xtensa-isa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/xtensa/xtensa-isa.c b/target/xtensa/xtensa-isa.c
index 630b4f9da1b..c564af340fa 100644
--- a/target/xtensa/xtensa-isa.c
+++ b/target/xtensa/xtensa-isa.c
@@ -370,7 +370,7 @@ int xtensa_isa_name_compare(const void *v1, const void *v2)
     xtensa_lookup_entry *e1 = (xtensa_lookup_entry *)v1;
     xtensa_lookup_entry *e2 = (xtensa_lookup_entry *)v2;
 
-    return strcasecmp(e1->key, e2->key);
+    return g_ascii_strcasecmp(e1->key, e2->key);
 }
 
 
@@ -513,7 +513,7 @@ xtensa_format xtensa_format_lookup(xtensa_isa isa, const char *fmtname)
     }
 
     for (fmt = 0; fmt < intisa->num_formats; fmt++) {
-        if (strcasecmp(fmtname, intisa->formats[fmt].name) == 0) {
+        if (g_ascii_strcasecmp(fmtname, intisa->formats[fmt].name) == 0) {
             return fmt;
         }
     }
-- 
2.53.0



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

* [PULL 12/25] hw/ppc: Use glib2 instead of strcasecmp/strncasecmp
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (10 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 11/25] target/xtensa: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 13/25] osdep: Remove unused strings.h Paolo Bonzini
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This is a change in semantics. g_ascii_strcasecmp() doesn't honour
locale but strcasecmp() does. But this is OK for at least one reason:
 (1) QEMU always runs with the C locale so there's not an actual
     behaviour change here

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-11-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/ppc/spapr_caps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 170795ad6ad..f4a26a85b50 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -129,7 +129,7 @@ static void spapr_cap_set_string(Object *obj, Visitor *v, const char *name,
         return;
     }
     for (i = 0; i < cap->possible->num; i++) {
-        if (!strcasecmp(val, cap->possible->vals[i])) {
+        if (!g_ascii_strcasecmp(val, cap->possible->vals[i])) {
             spapr->cmd_line_caps[cap->index] = true;
             spapr->eff.caps[cap->index] = i;
             return;
-- 
2.53.0



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

* [PULL 13/25] osdep: Remove unused strings.h
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (11 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 12/25] hw/ppc: " Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 14/25] util: Remove unused dirent.h Paolo Bonzini
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

We don't use strcasecmp/strncasecmp anymore. Also, we don't
use any other strings.h function. So this include is no more
needed.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-12-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/qemu/osdep.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index f151578b5ce..2f0e61ad6b2 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -114,7 +114,6 @@ QEMU_EXTERN_C int daemon(int, int);
 #include <stdio.h>
 
 #include <string.h>
-#include <strings.h>
 #include <inttypes.h>
 #include <limits.h>
 /* Put unistd.h before time.h as that triggers localtime_r/gmtime_r
-- 
2.53.0



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

* [PULL 14/25] util: Remove unused dirent.h
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (12 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 13/25] osdep: Remove unused strings.h Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 15/25] util: Remove unused sys/param.h Paolo Bonzini
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

This one is OK to drop, because the rewrite of path.c in
commit f3a8bdc1d5b26 removed the uses of the dirent.h functions.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Link: https://lore.kernel.org/r/20260327134401.270186-13-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/path.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/util/path.c b/util/path.c
index 8e174eb4364..72a255890e5 100644
--- a/util/path.c
+++ b/util/path.c
@@ -5,7 +5,6 @@
 */
 #include "qemu/osdep.h"
 #include <sys/param.h>
-#include <dirent.h>
 #include "qemu/cutils.h"
 #include "qemu/path.h"
 #include "qemu/thread.h"
-- 
2.53.0



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

* [PULL 15/25] util: Remove unused sys/param.h
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (13 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 14/25] util: Remove unused dirent.h Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 16/25] storage-daemon: use same link arguments as other tools Paolo Bonzini
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk, Peter Maydell

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

We dropped the use of PATH_MAX in commit f3a8bdc1d5b26 (which
basically completely rewrote the path handling).
Now we don't need any sys/param.h defines.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20260327134401.270186-14-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/path.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/util/path.c b/util/path.c
index 72a255890e5..e1565894d20 100644
--- a/util/path.c
+++ b/util/path.c
@@ -4,7 +4,6 @@
    The assumption is that this area does not change.
 */
 #include "qemu/osdep.h"
-#include <sys/param.h>
 #include "qemu/cutils.h"
 #include "qemu/path.h"
 #include "qemu/thread.h"
-- 
2.53.0



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

* [PULL 16/25] storage-daemon: use same link arguments as other tools
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (14 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 15/25] util: Remove unused sys/param.h Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 17/25] meson: Don't require nm for non-modular builds Paolo Bonzini
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20260327134401.270186-15-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build                |  8 ++++----
 storage-daemon/meson.build | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/meson.build b/meson.build
index 457491c34e2..09cdd317699 100644
--- a/meson.build
+++ b/meson.build
@@ -4505,15 +4505,15 @@ if xkbcommon.found()
 endif
 
 if have_tools
-  link_args = enable_modules ? ['@block.syms'] : []
+  tools_link_args = enable_modules ? ['@block.syms'] : []
   qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
-             link_args: link_args, link_depends: block_syms,
+             link_args: tools_link_args, link_depends: block_syms,
              dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
   qemu_io = executable('qemu-io', files('qemu-io.c'),
-             link_args: link_args, link_depends: block_syms,
+             link_args: tools_link_args, link_depends: block_syms,
              dependencies: [block, qemuutil], install: true)
   qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
-               link_args: link_args, link_depends: block_syms,
+               link_args: tools_link_args, link_depends: block_syms,
                dependencies: [blockdev, qemuutil, selinux],
                install: true)
 
diff --git a/storage-daemon/meson.build b/storage-daemon/meson.build
index 5e61a9d1bdf..fc088cbea7f 100644
--- a/storage-daemon/meson.build
+++ b/storage-daemon/meson.build
@@ -1,14 +1,14 @@
+assert(have_tools)
+
 qsd_ss = ss.source_set()
 qsd_ss.add(files('qemu-storage-daemon.c'))
 qsd_ss.add(blockdev, chardev, qmp, qom, qemuutil)
 
 subdir('qapi')
 
-if have_tools
-  qsd_ss = qsd_ss.apply({})
-  qsd = executable('qemu-storage-daemon',
-                   qsd_ss.sources(),
-                   link_args: '@block.syms', link_depends: block_syms,
-                   dependencies: qsd_ss.dependencies(),
-                   install: true)
-endif
+qsd_ss = qsd_ss.apply({})
+qsd = executable('qemu-storage-daemon',
+                 qsd_ss.sources(),
+                 link_args: tools_link_args, link_depends: block_syms,
+                 dependencies: qsd_ss.dependencies(),
+                 install: true)
-- 
2.53.0



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

* [PULL 17/25] meson: Don't require nm for non-modular builds
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (15 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 16/25] storage-daemon: use same link arguments as other tools Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 18/25] target/i386/mshv: Fix segment regression in MMIO emu Paolo Bonzini
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk

From: Kostiantyn Kostiuk <kkostiuk@redhat.com>

In the MSVC build environment, nm is missing; at the same time,
scripts/undefsym.py exits with code 0 at the beginning
for non-modular builds.

So, this change is harmless because it already didn't do anything
in non-modular builds, but remove the additional tool requirements.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20260327134401.270186-16-kkostiuk@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/meson.build b/meson.build
index 09cdd317699..a962b181e64 100644
--- a/meson.build
+++ b/meson.build
@@ -3906,6 +3906,9 @@ modinfo_generate = find_program('scripts/modinfo-generate.py')
 modinfo_files = []
 audio_modinfo_files = []
 
+block_syms = []
+qemu_syms = []
+
 block_mods = []
 system_mods = []
 emulator_modules = []
@@ -4021,18 +4024,18 @@ if enable_modules
   if emulator_modules.length() > 0
     alias_target('modules', emulator_modules)
   endif
-endif
 
-nm = find_program('nm')
-undefsym = find_program('scripts/undefsym.py')
-block_syms = custom_target('block.syms', output: 'block.syms',
-                             input: [libqemuutil, block_mods],
-                             capture: true,
-                             command: [undefsym, nm, '@INPUT@'])
-qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
-                             input: [libqemuutil, system_mods],
-                             capture: true,
-                             command: [undefsym, nm, '@INPUT@'])
+  nm = find_program('nm')
+  undefsym = find_program('scripts/undefsym.py')
+  block_syms = custom_target('block.syms', output: 'block.syms',
+                              input: [libqemuutil, block_mods],
+                              capture: true,
+                              command: [undefsym, nm, '@INPUT@'])
+  qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
+                              input: [libqemuutil, system_mods],
+                              capture: true,
+                              command: [undefsym, nm, '@INPUT@'])
+endif
 
 authz_ss = authz_ss.apply({})
 libauthz = static_library('authz', authz_ss.sources() + genh,
-- 
2.53.0



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

* [PULL 18/25] target/i386/mshv: Fix segment regression in MMIO emu
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (16 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 17/25] meson: Don't require nm for non-modular builds Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 19/25] accel/mshv: fix ioeventfd deassignment to forward correct datamatch value Paolo Bonzini
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Magnus Kulke, Mohamed Mediouni

From: Magnus Kulke <magnuskulke@linux.microsoft.com>

When the segmentation code has been reworked, there is now an
unconditional call to emul_ops->read_segment_descriptor(). The MSHV impl
was delegating this to x86_read_segement_descriptor(), which read from
the GDT in guest memory. This fails for selector.idx == 0 and when no
GDT is set up (which is the case in real mode).

In the fix we change the MSHV impl to fill segment descriptor from
SegmentCache, that was populated from the hypervisor by mshv_load_regs()
before instruction emulation.

Fixes: 09442d98ab (target/i386: emulate: segmentation rework)

Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260410142652.367541-1-magnuskulke@linux.microsoft.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/mshv/mshv-cpu.c | 37 +++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c
index 2bc978deb25..4ed6e7548f6 100644
--- a/target/i386/mshv/mshv-cpu.c
+++ b/target/i386/mshv/mshv-cpu.c
@@ -1552,17 +1552,42 @@ static void read_segment_descriptor(CPUState *cpu,
                                     struct x86_segment_descriptor *desc,
                                     enum X86Seg seg_idx)
 {
-    bool ret;
     X86CPU *x86_cpu = X86_CPU(cpu);
     CPUX86State *env = &x86_cpu->env;
     SegmentCache *seg = &env->segs[seg_idx];
-    x86_segment_selector sel = { .sel = seg->selector & 0xFFFF };
+    uint32_t limit;
 
-    ret = x86_read_segment_descriptor(cpu, desc, sel);
-    if (ret == false) {
-        error_report("failed to read segment descriptor");
-        abort();
+    memset(desc, 0, sizeof(struct x86_segment_descriptor));
+
+    desc->type = (seg->flags & DESC_TYPE_MASK) >> DESC_TYPE_SHIFT;
+    desc->s    = (seg->flags & DESC_S_MASK)    >> DESC_S_SHIFT;
+    desc->dpl  = (seg->flags & DESC_DPL_MASK)  >> DESC_DPL_SHIFT;
+    desc->p    = (seg->flags & DESC_P_MASK)    >> DESC_P_SHIFT;
+    desc->avl  = (seg->flags & DESC_AVL_MASK)  >> DESC_AVL_SHIFT;
+    desc->l    = (seg->flags & DESC_L_MASK)    >> DESC_L_SHIFT;
+    desc->db   = (seg->flags & DESC_B_MASK)    >> DESC_B_SHIFT;
+    desc->g    = (seg->flags & DESC_G_MASK)    >> DESC_G_SHIFT;
+
+    /*
+     * SegmentCache stores the hypervisor-provided value verbatim (populated by
+     * mshv_load_regs). We need to convert it to format expected by the
+     * instruction emulator. We can have a limit value > 0xfffff with
+     * granularity of 0 (byte granularity), which is not representable
+     * in real x86_segment_descriptor. In this case we set granularity to 1
+     * (4k granularity) and shift the limit accordingly.
+     *
+     * This quirk has been adopted from "whpx_segment_to_x86_description()"
+     */
+
+    if (!desc->g && seg->limit <= 0xfffff) {
+        limit = seg->limit;
+    } else {
+        limit = seg->limit >> 12;
+        desc->g = 1;
     }
+
+    x86_set_segment_limit(desc, limit);
+    x86_set_segment_base(desc, seg->base);
 }
 
 static const struct x86_emul_ops mshv_x86_emul_ops = {
-- 
2.53.0



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

* [PULL 19/25] accel/mshv: fix ioeventfd deassignment to forward correct datamatch value
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (17 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 18/25] target/i386/mshv: Fix segment regression in MMIO emu Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 20/25] accel/mshv: return correct errno value from ioeventfd failure Paolo Bonzini
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aastha Rawat, Magnus Kulke

From: Aastha Rawat <aastharawat@linux.microsoft.com>

unregister_ioevent() is not forwarding the datamatch (queue index) to
the mshv driver, causing only the first VirtIO-MMIO queue to be
deassigned correctly. Subsequent queues fail with `-ENOENT`, triggering
a fatal abort().

This failure was discovered while booting arm64 EDK2 firmware with mshv
accel.

Signed-off-by: Aastha Rawat <aastharawat@linux.microsoft.com>
Reviewed-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Link: https://lore.kernel.org/r/20260409-fix_ioevent-v1-1-053b810ae6fb@linux.microsoft.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/mshv/mshv-all.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
index d4cc7f53715..e1a8d62f8d2 100644
--- a/accel/mshv/mshv-all.c
+++ b/accel/mshv/mshv-all.c
@@ -278,13 +278,22 @@ static int ioeventfd(int vm_fd, int event_fd, uint64_t addr, Datamatch dm,
     return ioctl(vm_fd, MSHV_IOEVENTFD, &args);
 }
 
-static int unregister_ioevent(int vm_fd, int event_fd, uint64_t mmio_addr)
+static int unregister_ioevent(int vm_fd, int event_fd, uint64_t mmio_addr,
+                              uint64_t data, uint32_t len, bool data_match)
 {
     uint32_t flags = 0;
     Datamatch dm = {0};
 
     flags |= BIT(MSHV_IOEVENTFD_BIT_DEASSIGN);
-    dm.tag = DATAMATCH_NONE;
+    if (!data_match) {
+        dm.tag = DATAMATCH_NONE;
+    } else if (len == sizeof(uint64_t)) {
+        dm.tag = DATAMATCH_U64;
+        dm.value.u64 = data;
+    } else {
+        dm.tag = DATAMATCH_U32;
+        dm.value.u32 = data;
+    }
 
     return ioeventfd(vm_fd, event_fd, mmio_addr, dm, flags);
 }
@@ -337,11 +346,12 @@ static void mem_ioeventfd_del(MemoryListener *listener,
     int fd = event_notifier_get_fd(e);
     int ret;
     uint64_t addr = section->offset_within_address_space;
+    uint64_t len = int128_get64(section->size);
 
     trace_mshv_mem_ioeventfd_del(section->offset_within_address_space,
                                  int128_get64(section->size), data);
 
-    ret = unregister_ioevent(mshv_state->vm, fd, addr);
+    ret = unregister_ioevent(mshv_state->vm, fd, addr, data, len, match_data);
     if (ret < 0) {
         error_report("Failed to unregister ioeventfd: %s (%d)", strerror(-ret),
                      -ret);
-- 
2.53.0



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

* [PULL 20/25] accel/mshv: return correct errno value from ioeventfd failure
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (18 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 19/25] accel/mshv: fix ioeventfd deassignment to forward correct datamatch value Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 21/25] target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode Paolo Bonzini
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Aastha Rawat, Magnus Kulke

From: Aastha Rawat <aastharawat@linux.microsoft.com>

Returning the raw ioctl return value results in misleading error
message. Ensure that actual failure reason is propagated by returning
-errno for ioeventfd failure.

Signed-off-by: Aastha Rawat <aastharawat@linux.microsoft.com>
Reviewed-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Link: https://lore.kernel.org/r/20260409-fix_ioevent-v1-2-053b810ae6fb@linux.microsoft.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/mshv/mshv-all.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
index e1a8d62f8d2..58af674bd99 100644
--- a/accel/mshv/mshv-all.c
+++ b/accel/mshv/mshv-all.c
@@ -275,7 +275,12 @@ static int ioeventfd(int vm_fd, int event_fd, uint64_t addr, Datamatch dm,
         }
     }
 
-    return ioctl(vm_fd, MSHV_IOEVENTFD, &args);
+    int ret = ioctl(vm_fd, MSHV_IOEVENTFD, &args);
+    if (ret < 0) {
+        return -errno;
+    }
+
+    return ret;
 }
 
 static int unregister_ioevent(int vm_fd, int event_fd, uint64_t mmio_addr,
-- 
2.53.0



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

* [PULL 21/25] target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (19 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 20/25] accel/mshv: return correct errno value from ioeventfd failure Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 22/25] thread-win32: replace CRITICAL_SECTION with SRWLOCK Paolo Bonzini
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Richard Henderson

Table A-4 of the SDM shows

                    F0                     F1
--------------------------------------------------------
     NP           MOVBE Gy,My           MOVBE My,Gy
     66           MOVBE Gw,Mw           MOVBW Mw,Gw
     F2           CRC32 Gd,Eb           CRC32 Gd,Ey
  66+F2           CRC32 Gd,Eb           CRC32 Gd,Ew

However, this is incorrect.  Both MOVBE and (for 0xF1) CRC32
take Gv, Ev or Mv operands.  In 16-bit mode therefore the
operand is of 16-bit size without prefix and 32-bit mode
with 0x66 (the data size override).

For example, with NASM you get:

                                 bits 16
   67 0F 38 F0 02                movbe ax, [edx]
   66 67 0F 38 F0 02             movbe eax, [edx]

   67 F2 0F 38 F1 02             crc32 ax, word [edx]
   66 67 F2 0F 38 F1 02          crc32 eax, dword [edx]

versus

                                 bits 32
   66 0F 38 F0 02                movbe ax, [edx]
   0F 38 F0 02                   movbe eax, [edx]

   66 F2 0F 38 F1 02             crc32 eax, word [edx]
   F2 0F 38 F1 02                crc32 eax, dword [edx]

The instruction is listed correctly in the APX documentation
as "SCALABLE" (which means it has v-size operands).

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/decode-new.c.inc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index bc105aab9ea..c8b5bd6ad26 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -875,19 +875,23 @@ static const X86OpEntry opcodes_0F38_00toEF[240] = {
 
 /* five rows for no prefix, 66, F3, F2, 66+F2  */
 static const X86OpEntry opcodes_0F38_F0toFF[16][5] = {
+    /*
+     * MOVBE and CRC32 are incorrectly listed as always doing 32-bit operation
+     * without prefix and 16-bit operation with 0x66.
+     */
     [0] = {
-        X86_OP_ENTRYwr(MOVBE, G,y, M,y, cpuid(MOVBE)),
-        X86_OP_ENTRYwr(MOVBE, G,w, M,w, cpuid(MOVBE)),
+        X86_OP_ENTRYwr(MOVBE, G,v, M,v, cpuid(MOVBE)),
+        X86_OP_ENTRYwr(MOVBE, G,v, M,v, cpuid(MOVBE)),
         {},
         X86_OP_ENTRY2(CRC32, G,d, E,b, cpuid(SSE42)),
         X86_OP_ENTRY2(CRC32, G,d, E,b, cpuid(SSE42)),
     },
     [1] = {
-        X86_OP_ENTRYwr(MOVBE, M,y, G,y, cpuid(MOVBE)),
-        X86_OP_ENTRYwr(MOVBE, M,w, G,w, cpuid(MOVBE)),
+        X86_OP_ENTRYwr(MOVBE, M,v, G,v, cpuid(MOVBE)),
+        X86_OP_ENTRYwr(MOVBE, M,v, G,v, cpuid(MOVBE)),
         {},
-        X86_OP_ENTRY2(CRC32, G,d, E,y, cpuid(SSE42)),
-        X86_OP_ENTRY2(CRC32, G,d, E,w, cpuid(SSE42)),
+        X86_OP_ENTRY2(CRC32, G,d, E,v, cpuid(SSE42)),
+        X86_OP_ENTRY2(CRC32, G,d, E,v, cpuid(SSE42)),
     },
     [2] = {
         X86_OP_ENTRY3(ANDN, G,y, B,y, E,y, vex13 cpuid(BMI1)),
-- 
2.53.0



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

* [PULL 22/25] thread-win32: replace CRITICAL_SECTION with SRWLOCK
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (20 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 21/25] target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 23/25] meson: add missing semicolon in pthread_condattr_setclock test Paolo Bonzini
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kostiantyn Kostiuk

SRWLOCK is a much cheaper primitive than CRITICAL_SECTION, which
basically exists only as a legacy API.  The SRWLOCK is a single word
in memory and it is cheaper to just initialize it always.

Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/qemu-thread-win32.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/util/qemu-thread-win32.c b/util/qemu-thread-win32.c
index 272afc33856..3037732a6fe 100644
--- a/util/qemu-thread-win32.c
+++ b/util/qemu-thread-win32.c
@@ -242,7 +242,7 @@ struct QemuThreadData {
     /* Only used for joinable threads. */
     bool              exited;
     void             *ret;
-    CRITICAL_SECTION  cs;
+    SRWLOCK           lock;
 };
 
 static bool atexit_registered;
@@ -295,9 +295,9 @@ void qemu_thread_exit(void *arg)
     notifier_list_notify(&data->exit, NULL);
     if (data->mode == QEMU_THREAD_JOINABLE) {
         data->ret = arg;
-        EnterCriticalSection(&data->cs);
+        AcquireSRWLockExclusive(&data->lock);
         data->exited = true;
-        LeaveCriticalSection(&data->cs);
+        ReleaseSRWLockExclusive(&data->lock);
     } else {
         g_free(data);
     }
@@ -328,7 +328,6 @@ void *qemu_thread_join(QemuThread *thread)
         CloseHandle(handle);
     }
     ret = data->ret;
-    DeleteCriticalSection(&data->cs);
     g_free(data);
     return ret;
 }
@@ -357,6 +356,7 @@ void qemu_thread_create(QemuThread *thread, const char *name,
     struct QemuThreadData *data;
 
     data = g_malloc(sizeof *data);
+    InitializeSRWLock(&data->lock);
     data->start_routine = start_routine;
     data->arg = arg;
     data->mode = mode;
@@ -364,10 +364,6 @@ void qemu_thread_create(QemuThread *thread, const char *name,
     data->name = g_strdup(name);
     notifier_list_init(&data->exit);
 
-    if (data->mode != QEMU_THREAD_DETACHED) {
-        InitializeCriticalSection(&data->cs);
-    }
-
     hThread = (HANDLE) _beginthreadex(NULL, 0, win32_start_routine,
                                       data, 0, &thread->tid);
     if (!hThread) {
@@ -406,14 +402,14 @@ HANDLE qemu_thread_get_handle(QemuThread *thread)
         return NULL;
     }
 
-    EnterCriticalSection(&data->cs);
+    AcquireSRWLockExclusive(&data->lock);
     if (!data->exited) {
         handle = OpenThread(SYNCHRONIZE | THREAD_SUSPEND_RESUME |
                             THREAD_SET_CONTEXT, FALSE, thread->tid);
     } else {
         handle = NULL;
     }
-    LeaveCriticalSection(&data->cs);
+    ReleaseSRWLockExclusive(&data->lock);
     return handle;
 }
 
-- 
2.53.0



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

* [PULL 23/25] meson: add missing semicolon in pthread_condattr_setclock test
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (21 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 22/25] thread-win32: replace CRITICAL_SECTION with SRWLOCK Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 24/25] memory: Optimize flatview_simplify() to eliminate redundant memmove calls Paolo Bonzini
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stepan Popov, Alex Bennée, Marc-André Lureau

From: Stepan Popov <Stepan.Popov@kaspersky.com>

The test code was missing a semicolon after the pthread_condattr_t
variable declaration.

Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: 657ac98b58c ("thread-posix: use monotonic clock for QemuCond and QemuSemaphore", 2022-02-22)
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/r/20260330131406.87080-1-Stepan.Popov@kaspersky.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index a962b181e64..096303f021c 100644
--- a/meson.build
+++ b/meson.build
@@ -2890,7 +2890,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
 
   int main(void)
   {
-    pthread_condattr_t attr
+    pthread_condattr_t attr;
     pthread_condattr_init(&attr);
     pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
     return 0;
-- 
2.53.0



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

* [PULL 24/25] memory: Optimize flatview_simplify() to eliminate redundant memmove calls
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (22 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 23/25] meson: add missing semicolon in pthread_condattr_setclock test Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-23 10:29 ` [PULL 25/25] target/i386: emulate: include name of unhandled instruction Paolo Bonzini
  2026-04-25 12:30 ` [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Stefan Hajnoczi
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Bin Guo

From: Bin Guo <guobin@linux.alibaba.com>

The original flatview_simplify() implementation uses memmove() to shift
array elements after each merge operation, resulting in O(n²) time
complexity in the worst case. This is inefficient for VMs with large
memory topologies containing hundreds of MemoryRegions.

Replace the memmove-based approach with a two-pointer in-place compression
algorithm that achieves O(n) time complexity. The new algorithm uses a
write pointer i and a read pointer j, where i ≤ j is always maintained.
This invariant ensures we never overwrite unprocessed data, making memmove
unnecessary.

Signed-off-by: Bin Guo <guobin@linux.alibaba.com>
Link: https://lore.kernel.org/r/20260331060731.82641-1-guobin@linux.alibaba.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 system/memory.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/system/memory.c b/system/memory.c
index 56f3225b21a..0ff066c3484 100644
--- a/system/memory.c
+++ b/system/memory.c
@@ -336,24 +336,25 @@ static bool can_merge(FlatRange *r1, FlatRange *r2)
 /* Attempt to simplify a view by merging adjacent ranges */
 static void flatview_simplify(FlatView *view)
 {
-    unsigned i, j, k;
+    unsigned i, j;
+
+    if (view->nr <= 1) {
+        return;
+    }
 
     i = 0;
-    while (i < view->nr) {
-        j = i + 1;
-        while (j < view->nr
-               && can_merge(&view->ranges[j-1], &view->ranges[j])) {
+    for (j = 1; j < view->nr; j++) {
+        if (can_merge(&view->ranges[i], &view->ranges[j])) {
             int128_addto(&view->ranges[i].addr.size, view->ranges[j].addr.size);
-            ++j;
+            memory_region_unref(view->ranges[j].mr);
+        } else {
+            i++;
+            if (i != j) {
+                view->ranges[i] = view->ranges[j];
+            }
         }
-        ++i;
-        for (k = i; k < j; k++) {
-            memory_region_unref(view->ranges[k].mr);
-        }
-        memmove(&view->ranges[i], &view->ranges[j],
-                (view->nr - j) * sizeof(view->ranges[j]));
-        view->nr -= j - i;
     }
+    view->nr = i + 1;
 }
 
 static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)
-- 
2.53.0



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

* [PULL 25/25] target/i386: emulate: include name of unhandled instruction
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (23 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 24/25] memory: Optimize flatview_simplify() to eliminate redundant memmove calls Paolo Bonzini
@ 2026-04-23 10:29 ` Paolo Bonzini
  2026-04-25 12:30 ` [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Stefan Hajnoczi
  25 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2026-04-23 10:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mohamed Mediouni

From: Mohamed Mediouni <mohamed@unpredictable.fr>

Instead of just the command number, include the instruction name to make debugging easier.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260407141809.16862-2-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/emulate/x86_emu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c
index 55b1a68eb6c..c2da1a133f3 100644
--- a/target/i386/emulate/x86_emu.c
+++ b/target/i386/emulate/x86_emu.c
@@ -1399,8 +1399,8 @@ static void init_cmd_handler(void)
 bool exec_instruction(CPUX86State *env, struct x86_decode *ins)
 {
     if (!_cmd_handler[ins->cmd].handler) {
-        printf("Unimplemented handler (" TARGET_FMT_lx ") for %d (%x %x)\n",
-                env->eip,
+        printf("Unimplemented handler (" TARGET_FMT_lx ") for %s - %d (%x %x)\n",
+                env->eip, decode_cmd_to_string(ins->cmd),
                 ins->cmd, ins->opcode[0],
                 ins->opcode_len > 1 ? ins->opcode[1] : 0);
         env->eip += ins->len;
-- 
2.53.0



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

* Re: [PULL 00/25] Build, memory, i386 patches for 2026-04-23
  2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
                   ` (24 preceding siblings ...)
  2026-04-23 10:29 ` [PULL 25/25] target/i386: emulate: include name of unhandled instruction Paolo Bonzini
@ 2026-04-25 12:30 ` Stefan Hajnoczi
  25 siblings, 0 replies; 27+ messages in thread
From: Stefan Hajnoczi @ 2026-04-25 12:30 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2026-04-25 20:00 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 10:28 [PULL 00/25] Build, memory, i386 patches for 2026-04-23 Paolo Bonzini
2026-04-23 10:28 ` [PULL 01/25] target/i386: fix strList leak in x86_cpu_get_unavailable_features Paolo Bonzini
2026-04-23 10:28 ` [PULL 02/25] target/i386: fix missing PF_INSTR in SIGSEGV context Paolo Bonzini
2026-04-23 10:29 ` [PULL 03/25] hw: i386: vapic: restore IRQ polling for non-kernel irqchip backends Paolo Bonzini
2026-04-23 10:29 ` [PULL 04/25] meson: Use stddef.h instead of unistd.h Paolo Bonzini
2026-04-23 10:29 ` [PULL 05/25] qom: Use g_ascii_strcasecmp instead of strcasecmp Paolo Bonzini
2026-04-23 10:29 ` [PULL 06/25] block: Use glib2 instead of strcasecmp/strncasecmp Paolo Bonzini
2026-04-23 10:29 ` [PULL 07/25] io: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 08/25] target/sparc: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 09/25] target/riscv: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 10/25] target/ppc: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 11/25] target/xtensa: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 12/25] hw/ppc: " Paolo Bonzini
2026-04-23 10:29 ` [PULL 13/25] osdep: Remove unused strings.h Paolo Bonzini
2026-04-23 10:29 ` [PULL 14/25] util: Remove unused dirent.h Paolo Bonzini
2026-04-23 10:29 ` [PULL 15/25] util: Remove unused sys/param.h Paolo Bonzini
2026-04-23 10:29 ` [PULL 16/25] storage-daemon: use same link arguments as other tools Paolo Bonzini
2026-04-23 10:29 ` [PULL 17/25] meson: Don't require nm for non-modular builds Paolo Bonzini
2026-04-23 10:29 ` [PULL 18/25] target/i386/mshv: Fix segment regression in MMIO emu Paolo Bonzini
2026-04-23 10:29 ` [PULL 19/25] accel/mshv: fix ioeventfd deassignment to forward correct datamatch value Paolo Bonzini
2026-04-23 10:29 ` [PULL 20/25] accel/mshv: return correct errno value from ioeventfd failure Paolo Bonzini
2026-04-23 10:29 ` [PULL 21/25] target/i386/tcg: fix decoding of MOVBE and CRC32 in 16-bit mode Paolo Bonzini
2026-04-23 10:29 ` [PULL 22/25] thread-win32: replace CRITICAL_SECTION with SRWLOCK Paolo Bonzini
2026-04-23 10:29 ` [PULL 23/25] meson: add missing semicolon in pthread_condattr_setclock test Paolo Bonzini
2026-04-23 10:29 ` [PULL 24/25] memory: Optimize flatview_simplify() to eliminate redundant memmove calls Paolo Bonzini
2026-04-23 10:29 ` [PULL 25/25] target/i386: emulate: include name of unhandled instruction Paolo Bonzini
2026-04-25 12:30 ` [PULL 00/25] Build, memory, i386 patches for 2026-04-23 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.