From patchwork Thu Jul 24 15:52:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 34231 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6570820C7F for ; Thu, 24 Jul 2014 15:52:47 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at20sf18830095iec.3 for ; Thu, 24 Jul 2014 08:52:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=VzqdoGVewEaFgljRC5NnPe8gLBqCakgcc/L1TdJ5qr0=; b=m1enDv8s3wVttwtsGCoXIliJi23hgCKSinclbndcsEFR8EbosZ6fduq/0rm4hbfLAk MRVBVZbn6x5bNxJ9WuBaEotuHcsFdbCccp8hCU2xNKcqmtGseNgA/TCuOAO1f0hw/AB6 s7UPKryyFcGgeo/MAHstnaYUMP7RnxsepAfotkrMhlefL5JCqnMTqgujBkST9SN9dYoh QhQZNXnBkCTlqfwrmCy5xtgbYeQiVj4SIZeYn7mx8+yiS20i6KFhBz1cFUzTBqMoNvTF NQrHWGYvPucHU8gsTpiMHrbpuEk4HNnrVwqBm940qJzlxS0SpaQb4J15viNPo17//x0m fcQQ== X-Gm-Message-State: ALoCoQmlY4xhpiZJGiD5TAY/71/kKiYjaez1Oh/d6AM8UROFxQ736vWcvODJrhbqx8AMJHv/vSEw X-Received: by 10.42.151.67 with SMTP id d3mr4507494icw.6.1406217166983; Thu, 24 Jul 2014 08:52:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls791423qga.97.gmail; Thu, 24 Jul 2014 08:52:46 -0700 (PDT) X-Received: by 10.220.137.145 with SMTP id w17mr13353950vct.47.1406217166843; Thu, 24 Jul 2014 08:52:46 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id fc5si5439996vec.99.2014.07.24.08.52.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 08:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so5351879vcb.1 for ; Thu, 24 Jul 2014 08:52:45 -0700 (PDT) X-Received: by 10.52.244.81 with SMTP id xe17mr11532892vdc.24.1406217165936; Thu, 24 Jul 2014 08:52:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp376313vcb; Thu, 24 Jul 2014 08:52:45 -0700 (PDT) X-Received: by 10.66.193.69 with SMTP id hm5mr11544723pac.135.1406217164603; Thu, 24 Jul 2014 08:52:44 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id ie3si5467854veb.63.2014.07.24.08.52.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 08:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:50588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XALK0-00018O-4q for patch@linaro.org; Thu, 24 Jul 2014 11:52:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XALJF-0000UJ-CE for qemu-devel@nongnu.org; Thu, 24 Jul 2014 11:52:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XALJA-0008O4-Hh for qemu-devel@nongnu.org; Thu, 24 Jul 2014 11:51:57 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:60876 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XALJA-0008MB-6U for qemu-devel@nongnu.org; Thu, 24 Jul 2014 11:51:52 -0400 Received: from localhost ([127.0.0.1] helo=zen.linaro.local) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1XALRM-00022u-LR; Thu, 24 Jul 2014 18:00:20 +0200 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 24 Jul 2014 16:52:53 +0100 Message-Id: <1406217175-30267-2-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1406217175-30267-1-git-send-email-alex.bennee@linaro.org> References: <1406217175-30267-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 Cc: peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Subject: [Qemu-devel] [PATCH 1/3] target-arm: don't hardcode mask values in arm_cpu_handle_mmu_fault X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Otherwise we break quickly when we change TARGET_PAGE_SIZE. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell diff --git a/target-arm/helper.c b/target-arm/helper.c index a0e57cd..aa5d267 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4029,8 +4029,8 @@ int arm_cpu_handle_mmu_fault(CPUState *cs, vaddr address, &page_size); if (ret == 0) { /* Map a single [sub]page. */ - phys_addr &= ~(hwaddr)0x3ff; - address &= ~(target_ulong)0x3ff; + phys_addr &= TARGET_PAGE_MASK; + address &= TARGET_PAGE_MASK; tlb_set_page(cs, address, phys_addr, prot, mmu_idx, page_size); return 0; }