All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] KVM-PR is broken with current QEMU
@ 2016-09-20 11:44 Thomas Huth
  2016-09-20 12:24 ` Cédric Le Goater
  2016-09-20 21:45 ` [Qemu-devel] " Benjamin Herrenschmidt
  0 siblings, 2 replies; 14+ messages in thread
From: Thomas Huth @ 2016-09-20 11:44 UTC (permalink / raw)
  To: qemu-ppc
  Cc: QEMU Developers, Cédric Le Goater, David Gibson,
	Benjamin Herrenschmidt

 Hi,

when I try to run my guest in KVM-PR mode, current QEMU refuses to start:

  $ sudo qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=PR \
                           -nographic -vga none -cpu POWER8
  qemu: fatal: Unknown MMU model 851972

... followed by a useless register dump. I've bisected the issue, and it
seems like the problem has been introduced by this commit here:

  commit 4322e8ced5aaac7191958f09622d199fe61e2d87
  ppc: Fix 64K pages support in full emulation

Seems like KVM PR is using the "degraded" ISA variants (without the 1TB
segments), but the new POWERPC_MMU_64K flag has not been added to those.
Has this been done on purpose, or was this just by accident?
I can make KVM PR working again with the following patch:

diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h
index 2864105..36694cb 100644
--- a/target-ppc/cpu-qom.h
+++ b/target-ppc/cpu-qom.h
@@ -81,6 +81,7 @@ enum powerpc_mmu_t {
                              | POWERPC_MMU_AMR | 0x00000003,
     /* Architecture 2.06 "degraded" (no 1T segments)           */
     POWERPC_MMU_2_06a      = POWERPC_MMU_64 | POWERPC_MMU_AMR
+                             | POWERPC_MMU_64K
                              | 0x00000003,
     /* Architecture 2.07 variant                               */
     POWERPC_MMU_2_07       = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
@@ -88,6 +89,7 @@ enum powerpc_mmu_t {
                              | POWERPC_MMU_AMR | 0x00000004,
     /* Architecture 2.07 "degraded" (no 1T segments)           */
     POWERPC_MMU_2_07a      = POWERPC_MMU_64 | POWERPC_MMU_AMR
+                             | POWERPC_MMU_64K
                              | 0x00000004,
 };

However, not sure whether this is the right fix ... Cédric, Ben, any ideas?

 Thomas

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

end of thread, other threads:[~2016-09-22  9:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 11:44 [Qemu-devel] KVM-PR is broken with current QEMU Thomas Huth
2016-09-20 12:24 ` Cédric Le Goater
2016-09-20 14:04   ` [Qemu-devel] [Qemu-ppc] " Cédric Le Goater
2016-09-20 14:24     ` Thomas Huth
2016-09-20 14:39       ` Cédric Le Goater
2016-09-21  8:22         ` Thomas Huth
2016-09-22  1:57           ` David Gibson
2016-09-22  5:30             ` Thomas Huth
2016-09-22  7:18               ` Thomas Huth
2016-09-22  9:46                 ` Cédric Le Goater
2016-09-22  9:57                 ` Anton Blanchard
2016-09-20 21:45 ` [Qemu-devel] " Benjamin Herrenschmidt
2016-09-21  7:45   ` Thomas Huth
2016-09-22  6:25   ` Thomas Huth

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.