From patchwork Sat Jun 23 00:33:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 166714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AE976B6F9F for ; Sat, 23 Jun 2012 11:37:58 +1000 (EST) Received: from localhost ([::1]:57840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiEJX-0007vT-AT for incoming@patchwork.ozlabs.org; Fri, 22 Jun 2012 20:34:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiEIa-0005Y3-E0 for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiEIY-0007sb-CC for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:33:59 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:50139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiEIY-0007rl-3q for qemu-devel@nongnu.org; Fri, 22 Jun 2012 20:33:58 -0400 Received: by mail-pz0-f45.google.com with SMTP id n2so3053134dad.4 for ; Fri, 22 Jun 2012 17:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=qwPYj9630CQ2375Kw07jJqqMliQa/mZmwLkDgz/J/vM=; b=0T9QE09zp+eMR9e8wWqvdqzRm9yoMu8JM0K2AgeAkCZ+TG7jkI/fg4pK03wTwxi1xN QaIkIn9cTUKUBIk1Mu3BhUy8jT870lO3IlVbAXiwZLgt4UFs4BXIHZrvw9AkpuispStQ 35qnqPdAUh/WqQbSsyuww0uxbk7mnMaJ/yF5EezVY6TGNDBAPtd1tZWIkP9Stxe6g1mq aAXmKkKI4c37ytu6BcqRBt+PGIqEg+HX5g+qXV0zwPj4KW/ESMjfKhiSxkXTd8V17vHD I2xzrJJ3gw+xHWgpAtt6FkLrUvPAjd2BEVSXq/M0cruOB8RY5sb9LkZgV9p8L7G9h83Q 8Pjw== Received: by 10.68.194.105 with SMTP id hv9mr6485867pbc.126.1340411637136; Fri, 22 Jun 2012 17:33:57 -0700 (PDT) Received: from localhost.localdomain ([32.97.110.59]) by mx.google.com with ESMTPS id os1sm630169pbb.49.2012.06.22.17.33.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jun 2012 17:33:56 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Fri, 22 Jun 2012 19:33:07 -0500 Message-Id: <1340411610-22596-4-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1340411610-22596-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1340411610-22596-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH stable-1.1 03/26] target-xtensa: update EXCVADDR in case of page table lookup 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Max Filippov According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, even if the miss is handled entirely by processor hardware. Signed-off-by: Max Filippov Signed-off-by: Blue Swirl --- target-xtensa/helper.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c index 2094227..43a6611 100644 --- a/target-xtensa/helper.c +++ b/target-xtensa/helper.c @@ -516,6 +516,7 @@ static int autorefill_mmu(CPUXtensaState *env, uint32_t vaddr, bool dtlb, *wi = (++env->autorefill_idx) & 0x3; split_tlb_entry_spec_way(env, vaddr, dtlb, &vpn, *wi, ei); xtensa_tlb_set_entry(env, dtlb, *wi, *ei, vpn, pte); + env->sregs[EXCVADDR] = vaddr; qemu_log("%s: autorefill(%08x): %08x -> %08x\n", __func__, vaddr, vpn, pte); }