[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 42/45] ppc/kvm: Mark 64kB page size support as disabl
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 42/45] ppc/kvm: Mark 64kB page size support as disabled if not available |
Date: |
Fri, 23 Sep 2016 17:15:18 +1000 |
From: Thomas Huth <address@hidden>
QEMU currently refuses to start with KVM-PR and only prints out
qemu: fatal: Unknown MMU model 851972
when being started there. This is because commit 4322e8ced5aaac719
("ppc: Fix 64K pages support in full emulation") introduced a new
POWERPC_MMU_64K bit to indicate support for this page size, but
it never gets cleared on KVM-PR if the host kernel does not support
this. Thus we've got to turn off this bit in the mmu_model for KVM-PR.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target-ppc/kvm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index c89991c..a18d4d5 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -428,6 +428,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
CPUPPCState *env = &cpu->env;
long rampagesize;
int iq, ik, jq, jk;
+ bool has_64k_pages = false;
/* We only handle page sizes for 64-bit server guests for now */
if (!(env->mmu_model & POWERPC_MMU_64)) {
@@ -471,6 +472,9 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
ksps->enc[jk].page_shift)) {
continue;
}
+ if (ksps->enc[jk].page_shift == 16) {
+ has_64k_pages = true;
+ }
qsps->enc[jq].page_shift = ksps->enc[jk].page_shift;
qsps->enc[jq].pte_enc = ksps->enc[jk].pte_enc;
if (++jq >= PPC_PAGE_SIZES_MAX_SZ) {
@@ -485,6 +489,9 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)
if (!(smmu_info.flags & KVM_PPC_1T_SEGMENTS)) {
env->mmu_model &= ~POWERPC_MMU_1TSEG;
}
+ if (!has_64k_pages) {
+ env->mmu_model &= ~POWERPC_MMU_64K;
+ }
}
#else /* defined (TARGET_PPC64) */
--
2.7.4
- [Qemu-devel] [PULL 29/45] target-ppc: move out stqcx impementation, (continued)
- [Qemu-devel] [PULL 29/45] target-ppc: move out stqcx impementation, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 28/45] target-ppc: consolidate load with reservation, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 27/45] target-ppc: convert st[16, 32, 64]r to use new macro, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 31/45] target-ppc: add xxspltib instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 30/45] target-ppc: consolidate store conditional, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 07/45] target-ppc: add vector permute right indexed instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 33/45] target-ppc: add stxsi[bh]x instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 36/45] target-ppc: add TLB_NEED_LOCAL_FLUSH flag, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 35/45] spapr: Introduce sPAPRCPUCoreClass, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 26/45] target-ppc: convert st64 to use new macro, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 42/45] ppc/kvm: Mark 64kB page size support as disabled if not available,
David Gibson <=
- [Qemu-devel] [PULL 32/45] target-ppc: add lxsi[bw]zx instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 43/45] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 40/45] ppc/xics: account correct irq status, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 06/45] target-ppc: add vector bit permute doubleword instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 08/45] ppc: Fix signal delivery in ppc-user and ppc64-user, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 14/45] adb.c: add support for QKeyCode, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 34/45] target-ppc: implement darn instruction, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 39/45] Enable H_CLEAR_MOD and H_CLEAR_REF hypercalls on KVM/PPC64., David Gibson, 2016/09/23
- [Qemu-devel] [PULL 38/45] target-ppc: tlbie/tlbivax should have global effect, David Gibson, 2016/09/23
- [Qemu-devel] [PULL 10/45] libqos: define SPAPR libqos functions, David Gibson, 2016/09/23