From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOB8U-00019B-4k for qemu-devel@nongnu.org; Wed, 18 Feb 2015 15:22:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOB8K-0001qA-OC for qemu-devel@nongnu.org; Wed, 18 Feb 2015 15:22:18 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:53471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOB8K-0001pq-FG for qemu-devel@nongnu.org; Wed, 18 Feb 2015 15:22:08 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Feb 2015 20:22:07 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 32128219005C for ; Wed, 18 Feb 2015 20:21:59 +0000 (GMT) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1IKM52g5243296 for ; Wed, 18 Feb 2015 20:22:05 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1IKM3fA024307 for ; Wed, 18 Feb 2015 13:22:04 -0700 From: Christian Borntraeger Date: Wed, 18 Feb 2015 21:22:00 +0100 Message-Id: <1424290943-22480-7-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1424290943-22480-1-git-send-email-borntraeger@de.ibm.com> References: <1424290943-22480-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 06/29] s390x/mmu: Fix the check for the real-space designation bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Thomas Huth , qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Cornelia Huck , Richard Henderson 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 Signed-off-by: Christian Borntraeger --- 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; -- 1.9.3