From nobody Wed Feb 11 02:08:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516838221813573.3039570611872; Wed, 24 Jan 2018 15:57:01 -0800 (PST) Received: from localhost ([::1]:55433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeUuZ-00049L-60 for importer@patchew.org; Wed, 24 Jan 2018 18:56:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeURt-000513-L7 for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:27:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeURs-00024i-NB for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:27:21 -0500 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:45854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eeURs-00023f-H1 for qemu-devel@nongnu.org; Wed, 24 Jan 2018 18:27:20 -0500 Received: by mail-pf0-x243.google.com with SMTP id a88so4351197pfe.12 for ; Wed, 24 Jan 2018 15:27:20 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id z19sm9760028pfh.185.2018.01.24.15.27.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2018 15:27:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=N3yFY3KLuN7s5EJ+56CkqrbPrG+d6aGgbHxBlCsk0dI=; b=Kwoc938aukh84nXcM0ZPKBJXC+l+NX8hQZq4L0Q/1XEvZf74IoLpYscSNjgoiD+pL0 o9j4CRnysFUU1hubbN7A3ys2D2OhdKDhRoL51ZbYSuVALz/S17itvgScKfCUvjadxitd IbCBcm6YbTJFZWwyTTEu+X/wVKfmms2a7q2Aw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=N3yFY3KLuN7s5EJ+56CkqrbPrG+d6aGgbHxBlCsk0dI=; b=K/hU/tv5oGEY+BBH/DzLip/ZVpacmJ4+OU4wTyflul35OWa2lGb0MUEggRJhXlUJLo aOTDzwZZPB04JLYfi4uLT+ouFZuA29JP+u1G3ZXRPrwHLQEyfRmUSM8NrcPjrCL616i3 DUYs2oOQds3qUp5HzyERjEfem8ZdboFoA/vT4qTLj4nWbrgLjddzSDRNawcap2+LnmDA C7Jo2gpZXiobzYaOzTXwLgLnwJsiXI9s9diGF27fy1hZ5HScZqBTgHiq7LQXQ2ck48xd U6rCY0cviVMv+rncKAY/wmndSDvYr9dPi8mezIA3g4bK8CYNNpsCmxX+JLGZHXKtcYjA kpHQ== X-Gm-Message-State: AKwxyteiia1UhBPMseHHMI/Ayp/JQrzhrZp6PBTziGvccEBBcc+mmouJ eqCt5L49mClHnBFUU2nChDs4eWZMxzA= X-Google-Smtp-Source: AH8x2254CAjWbypU5lFXmq8jFym3RvpyhzVsKvAYsFmfUBBZUzGKLMkDHGcw0YKgC2AnpDv3pYspIQ== X-Received: by 2002:a17:902:4c88:: with SMTP id b8-v6mr7853207ple.233.1516836439313; Wed, 24 Jan 2018 15:27:19 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 24 Jan 2018 15:26:14 -0800 Message-Id: <20180124232625.30105-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180124232625.30105-1-richard.henderson@linaro.org> References: <20180124232625.30105-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::243 Subject: [Qemu-devel] [PATCH v3 34/45] target/hppa: Use MMU_DEBUG_LOAD when reloading for CR[IIR] X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Bypass any tlb protection checks, as this is not a "real" access to memory per the architecture. Signed-off-by: Richard Henderson --- target/hppa/int_helper.c | 2 +- target/hppa/mem_helper.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index d54d830196..1a9bbe268a 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -156,7 +156,7 @@ void hppa_cpu_do_interrupt(CPUState *cs) =20 vaddr =3D hppa_form_gva_psw(old_psw, iasq_f, vaddr); t =3D hppa_get_physical_address(env, vaddr, 0, - MMU_INST_FETCH, + MMU_DEBUG_LOAD, &paddr, &prot); if (t >=3D 0) { /* We can't re-load the instruction. */ diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 81bcbe45db..4decfca407 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -131,12 +131,21 @@ int hppa_get_physical_address(CPUHPPAState *env, vadd= r addr, int mmu_idx, /* ??? Check PSW_P and ent->access_prot. This can remove PROT_WRITE. = */ =20 /* Map MMUAccessType to QEMU protection. */ - if (ifetch) { - a_prot =3D PROT_EXEC; - } else if (type =3D=3D MMU_DATA_STORE) { - a_prot =3D PROT_WRITE; - } else { + switch (type) { + case MMU_DATA_LOAD: a_prot =3D PROT_READ; + break; + case MMU_DATA_STORE: + a_prot =3D PROT_WRITE; + break; + case MMU_INST_FETCH: + a_prot =3D PROT_EXEC; + break; + case MMU_DEBUG_LOAD: + ret =3D -1; + goto egress; + default: + g_assert_not_reached(); } =20 if (unlikely(!(prot & a_prot))) { --=20 2.14.3