From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLxHn-0003pG-9X for qemu-devel@nongnu.org; Thu, 12 Feb 2015 12:10:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLxHf-0008Ge-1f for qemu-devel@nongnu.org; Thu, 12 Feb 2015 12:10:43 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:50792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLxHe-0008GC-NO for qemu-devel@nongnu.org; Thu, 12 Feb 2015 12:10:34 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Feb 2015 17:10:34 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 239B917D8042 for ; Thu, 12 Feb 2015 17:10:43 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1CH9l4F9306572 for ; Thu, 12 Feb 2015 17:09:47 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1CH9kX6025352 for ; Thu, 12 Feb 2015 10:09:46 -0700 From: Jens Freimann Date: Thu, 12 Feb 2015 18:09:19 +0100 Message-Id: <1423760982-8474-3-git-send-email-jfrei@linux.vnet.ibm.com> In-Reply-To: <1423760982-8474-1-git-send-email-jfrei@linux.vnet.ibm.com> References: <1423760982-8474-1-git-send-email-jfrei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 02/25] s390x/mmu: Fix the check for the real-space designation bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Alexander Graf , Cornelia Huck Cc: Jens Freimann , qemu-devel@nongnu.org, Thomas Huth From: Thomas Huth The real-space designation bits live in the ASCEs, not in the table entries, so the check must be done before we start walking the MMU table. Signed-off-by: Thomas Huth Signed-off-by: Jens Freimann Reviewed-by: David Hildenbrand --- target-s390x/mmu_helper.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target-s390x/mmu_helper.c b/target-s390x/mmu_helper.c index fc4f7c5..c845cd4 100644 --- a/target-s390x/mmu_helper.c +++ b/target-s390x/mmu_helper.c @@ -180,13 +180,6 @@ static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, return -1; } - if (asce & _ASCE_REAL_SPACE) { - /* direct mapping */ - - *raddr = vaddr; - return 0; - } - origin = asce & _ASCE_ORIGIN; switch (level) { @@ -252,6 +245,12 @@ static int mmu_translate_asc(CPUS390XState *env, target_ulong vaddr, break; } + if (asce & _ASCE_REAL_SPACE) { + /* direct mapping */ + *raddr = vaddr; + return 0; + } + switch (asce & _ASCE_TYPE_MASK) { case _ASCE_TYPE_REGION1: break; -- 2.1.4