Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Net5f-0006Kx-QS for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:32 -0500 Received: from [199.232.76.173] (port=50210 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Net5e-0006KT-N6 for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:30 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Net5R-0007EA-Hm for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:29 -0500 Received: from cantor2.suse.de ([195.135.220.15]:43981 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Net5Q-0007Cx-01 for qemu-devel@nongnu.org; Tue, 09 Feb 2010 11:37:16 -0500 From: Alexander Graf Date: Tue, 9 Feb 2010 17:37:09 +0100 Message-Id: <1265733430-9656-10-git-send-email-agraf@suse.de> In-Reply-To: <1265733430-9656-1-git-send-email-agraf@suse.de> References: <1265733430-9656-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 09/10] PPC: Fix large pages List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, aurelien@aurel32.net, mst@redhat.com We were masking 1TB SLB entries on the feature bit of 16 MB pages. Obviously that breaks, so let's just ignore 1TB SLB entries for now and instead do 16MB pages correctly. This fixes PPC64 Linux boot with -m above 256. Signed-off-by: Alexander Graf --- target-ppc/helper.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index a4fae31..cd1c9fe 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -736,14 +736,13 @@ static inline int slb_lookup(CPUPPCState *env, target_ulong eaddr, PRIx32 "\n", __func__, n, slb->tmp64, slb->tmp); if (slb_is_valid(slb)) { /* SLB entry is valid */ + mask = 0xFFFFFFFFF0000000ULL; if (slb->tmp & 0x8) { - /* 1 TB Segment */ - mask = 0xFFFF000000000000ULL; + /* 16 MB PTEs */ if (target_page_bits) - *target_page_bits = 24; // XXX 16M pages? + *target_page_bits = 24; } else { - /* 256MB Segment */ - mask = 0xFFFFFFFFF0000000ULL; + /* 4 KB PTEs */ if (target_page_bits) *target_page_bits = TARGET_PAGE_BITS; } -- 1.6.0.2