From: Alexander Graf <agraf@suse.de>
To: qemu-ppc@nongnu.org
Cc: blauwirbel@gmail.com, anthony@codemonkey.ws,
qemu-devel@nongnu.org, aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH 5/9] PPC: Add MMU type for 2.06 with AMR but no TB pages
Date: Mon, 6 May 2013 17:25:13 +0200 [thread overview]
Message-ID: <1367853917-2015-6-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1367853917-2015-1-git-send-email-agraf@suse.de>
When running -cpu on a POWER7 system with PR KVM, we mask out the 1TB
MMU capability from the MMU type mask, but not the AMR bit.
This leads to us having a new MMU type that we don't check for in our
MMU management functions.
Add the new type, so that we don't have to worry about breakage there.
We're not going to use the TCG MMU management in that case anyway.
The long term fix for this will be to move all these MMU management
functions to class callbacks.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
target-ppc/cpu.h | 3 +++
target-ppc/mmu_helper.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 7cacb56..aa1d013 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -119,6 +119,9 @@ enum powerpc_mmu_t {
/* Architecture 2.06 variant */
POWERPC_MMU_2_06 = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
| POWERPC_MMU_AMR | 0x00000003,
+ /* Architecture 2.06 "degraded" (no 1T segments) */
+ POWERPC_MMU_2_06a = POWERPC_MMU_64 | POWERPC_MMU_AMR
+ | 0x00000003,
/* Architecture 2.06 "degraded" (no 1T segments or AMR) */
POWERPC_MMU_2_06d = POWERPC_MMU_64 | 0x00000003,
#endif /* defined(TARGET_PPC64) */
diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c
index acf0133..68d5415 100644
--- a/target-ppc/mmu_helper.c
+++ b/target-ppc/mmu_helper.c
@@ -1188,6 +1188,7 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env)
#if defined(TARGET_PPC64)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_06:
+ case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_06d:
dump_slb(f, cpu_fprintf, env);
break;
@@ -1324,6 +1325,7 @@ hwaddr cpu_get_phys_page_debug(CPUPPCState *env, target_ulong addr)
#if defined(TARGET_PPC64)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_06:
+ case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_06d:
return ppc_hash64_get_phys_page_debug(env, addr);
#endif
@@ -1815,6 +1817,7 @@ void ppc_tlb_invalidate_all(CPUPPCState *env)
#if defined(TARGET_PPC64)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_06:
+ case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_06d:
#endif /* defined(TARGET_PPC64) */
tlb_flush(env, 1);
@@ -1884,6 +1887,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, target_ulong addr)
#if defined(TARGET_PPC64)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_06:
+ case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_06d:
/* tlbie invalidate TLBs for all segments */
/* XXX: given the fact that there are too many segments to invalidate,
--
1.6.0.2
next prev parent reply other threads:[~2013-05-06 15:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 15:25 [Qemu-devel] [PULL 1.5 0/9] ppc patch queue 2013-05-06 Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 1/9] pseries: Factor out check for out-of-bounds LIOBN Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 2/9] pseries: Fix debug message for out-of-bounds address in H_PUT_TCE Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 3/9] PPC: e500: initialize GPRs as per epapr Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 4/9] pseries: Update SLOF firmware image Alexander Graf
2013-05-06 15:25 ` Alexander Graf [this message]
2013-05-06 15:25 ` [Qemu-devel] [PATCH 6/9] target-ppc: Fix invalid SPR read/write warnings Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 7/9] target-ppc: Add read and write of PPR SPR Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 8/9] PPC: e500: correct params->ram_size with ram_size Alexander Graf
2013-05-06 15:25 ` [Qemu-devel] [PATCH 9/9] spapr_llan: fix device reenabling Alexander Graf
2013-05-06 18:21 ` [Qemu-devel] [PULL 1.5 0/9] ppc patch queue 2013-05-06 Aurelien Jarno
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=1367853917-2015-6-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).