All of lore.kernel.org
 help / color / mirror / Atom feed
From: Misbah Anjum N <misanjum@linux.ibm.com>
To: Ani Sinha <anisinha@redhat.com>, Pbonzini <pbonzini@redhat.com>,
	Qemu Devel <qemu-devel@nongnu.org>,
	Qemu Ppc <qemu-ppc@nongnu.org>
Cc: npiggin@gmail.com, Harsh Prateek Bora <harshpb@linux.ibm.com>,
	vaibhav@linux.ibm.com, sbhat@linux.ibm.com
Subject: Re: [BUG] [powerpc] KVM guest boot failure - hangs on startup after commit 98884e0c
Date: Mon, 06 Apr 2026 14:24:42 +0530	[thread overview]
Message-ID: <ab72cb8395bcc2b1f489c5611bb7c00d@linux.ibm.com> (raw)
In-Reply-To: <DCB3A7E9-412C-402D-A4C9-EA558CD1FE29@redhat.com>

Hi Ani,
I've completed the testing you suggested. Unfortunately, the SMP hang 
still persists with these changes.

Changes made:
As requested, I reverted everything in stubs/kvm.c and the related 
changes in stubs/meson.build, include/system/kvm.h, and 
target/i386/kvm/kvm.c. I also commented out the calls to 
kvm_arch_supports_vmfd_change() and kvm_arch_on_vmfd_change() in 
kvm_reset_vmfd().

Test result:
The issue persists - guests still hang indefinitely during boot when SMP 
is configured.

Git diff:
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index cc5c42ce4d..04b9cbe7c9 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2622,11 +2622,12 @@ static int kvm_reset_vmfd(MachineState *ms)
       * bail if the current architecture does not support VM file
       * descriptor change.
       */
-    if (!kvm_arch_supports_vmfd_change()) {
+    /*if (!kvm_arch_supports_vmfd_change()) {
          error_report("This target architecture does not support KVM VM 
"
                       "file descriptor change.");
          return -EOPNOTSUPP;
      }
+    */

      s = KVM_STATE(ms->accelerator);
      kml = &s->memory_listener;
@@ -2659,10 +2660,10 @@ static int kvm_reset_vmfd(MachineState *ms)
      }
      assert(!err);

-    ret = kvm_arch_on_vmfd_change(ms, s);
+    /*ret = kvm_arch_on_vmfd_change(ms, s);
      if (ret < 0) {
          return ret;
-    }
+    }*/

      if (s->kernel_irqchip_allowed) {
          do_kvm_irqchip_create(s);

diff --git a/include/system/kvm.h b/include/system/kvm.h
index 5fc7251fd9..0dad0079ed 100644
--- a/include/system/kvm.h
+++ b/include/system/kvm.h
@@ -456,8 +456,6 @@ int kvm_physical_memory_addr_from_host(KVMState *s, 
void *ram_addr,

  #endif /* COMPILING_PER_TARGET */

-bool kvm_arch_supports_vmfd_change(void);
-int kvm_arch_on_vmfd_change(MachineState *ms, KVMState *s);

  void kvm_cpu_synchronize_state(CPUState *cpu);

diff --git a/stubs/kvm.c b/stubs/kvm.c
deleted file mode 100644
index 2db61d89a7..0000000000
--- a/stubs/kvm.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * kvm target arch specific stubs
- *
- * Copyright (c) 2026 Red Hat, Inc.
- *
- * Author:
- *   Ani Sinha <anisinha@redhat.com>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-#include "qemu/osdep.h"
-#include "system/kvm.h"
-
-int kvm_arch_on_vmfd_change(MachineState *ms, KVMState *s)
-{
-    abort();
-}
-
-bool kvm_arch_supports_vmfd_change(void)
-{
-    return false;
-}

diff --git a/stubs/meson.build b/stubs/meson.build
index 6ae478bacc..8a07059500 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -74,7 +74,6 @@ if have_system
    if igvm.found()
      stub_ss.add(files('igvm.c'))
    endif
-  stub_ss.add(files('kvm.c'))
    stub_ss.add(files('target-get-monitor-def.c'))
    stub_ss.add(files('target-monitor-defs.c'))
    stub_ss.add(files('win32-kbd-hook.c'))

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 524b5276a6..3dfd9a5974 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -3389,15 +3389,6 @@ static int kvm_vm_enable_energy_msrs(KVMState *s)
      return 0;
  }

-int kvm_arch_on_vmfd_change(MachineState *ms, KVMState *s)
-{
-    abort();
-}
-
-bool kvm_arch_supports_vmfd_change(void)
-{
-    return false;
-}

  int kvm_arch_init(MachineState *ms, KVMState *s)
  {


I've also tested with the latest QEMU build from master, and the issue 
still persists there as well. Could you suggest what additional 
debugging steps I should take to help identify the root cause?

Thanks,
Misbah Anjum N <misanjum@linux.ibm.com>


On 2026-03-18 15:00, Ani Sinha wrote:
> One possible thing to try is:
> 
> Revert everything in stubs/kvm.c and hence changes in
> stubs/meson.build, include/system/kvm.h and in target/i386/kvm/kvm.c
> introduced by 98884e0cc1 .
> You will have to comment out calls to kvm_arch_supports_vmfd_change()
> and kvm_arch_on_vmfd_change() in kvm_reset_vmfd(). Since
> kvm_reset_vmfd() is not called anyway, not should make no difference
> if those calls are commented out.
> 
> Let me know what you get after doing the above.


  reply	other threads:[~2026-04-06  8:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 10:52 [BUG] [powerpc] KVM guest boot failure - hangs on startup after commit 98884e0c Misbah Anjum N
2026-03-09  8:28 ` Misbah Anjum N
2026-03-09 11:04   ` Harsh Prateek Bora
2026-03-09 13:11     ` Ani Sinha
2026-03-09 13:23       ` Ani Sinha
2026-03-10  8:39         ` Misbah Anjum N
2026-03-10  8:54           ` Ani Sinha
2026-03-10  9:08             ` Misbah Anjum N
2026-03-10  9:34               ` Ani Sinha
2026-03-10 10:05                 ` Misbah Anjum N
2026-03-10 10:12                   ` Ani Sinha
2026-03-18  8:19                     ` Misbah Anjum N
2026-03-18  8:39                       ` Ani Sinha
2026-03-18  9:30                         ` Ani Sinha
2026-04-06  8:54                           ` Misbah Anjum N [this message]
2026-04-07  4:09                             ` Ani Sinha
2026-04-07 13:45                               ` Ani Sinha
2026-04-09 16:18                             ` Harsh Prateek Bora
2026-03-09 13:30     ` Ani Sinha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ab72cb8395bcc2b1f489c5611bb7c00d@linux.ibm.com \
    --to=misanjum@linux.ibm.com \
    --cc=anisinha@redhat.com \
    --cc=harshpb@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sbhat@linux.ibm.com \
    --cc=vaibhav@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.