From patchwork Mon Nov 13 17:32:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 743467 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1747317wrw; Mon, 13 Nov 2023 09:34:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpnhYlrwnTi6MxYgWlXQChsOckOZCuwYrNQ7nY977EmYZv+6zKqmzU7a6DTgALdjOOYC4A X-Received: by 2002:a05:6358:948f:b0:16b:bf49:906d with SMTP id i15-20020a056358948f00b0016bbf49906dmr8667953rwb.20.1699896857030; Mon, 13 Nov 2023 09:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699896857; cv=none; d=google.com; s=arc-20160816; b=unk6GFn+2x9uoxFmK9cMVVMz+AHx6BYZ9mGkyzEVWX9VK09b89baJ6fZL1NohaUtQ5 /srRsu27xTwasT3fSmrthCMRjOtqpCRNClgKGYWx/tFeEeqS3rEyIuc3hSSVxAE7umHK 06E/BPnhiE9QiP55RPZyND79oqVrjVSzaZbyaPfcjqG5Q60jyJK22iAlJjCYQvoA3mzE WO1hQ65Zg+tVdCy2o55P8oh/FFyj6DsxOt1Inr63ZZY3hpN3dW9slEqVreP3JGyImB5U 0PSDyPBjuYeOPawJPNcndt5X9m3T/1/yV0fprRC2gxVojX/5Aci8Xj4/AaLtlnxgdIRU mabQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lo0lQlUWSBjMt9Vl8JT1SFLp9AI2+HeOXlIlVWGHESw=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=dcAcD1qG8p/i22Eb49oTbugE7BkHwxLhcCrTFdOhh4Y8qJHgdytYecgK5eoVkSpInK OIFoIy2D9lJELC5q+nPRzgOgMdx5PbugeaTL8En5rJCM453XhssZCtwm578ZmEv+7Zce 7kMmaBcWnKqSqnWv+Hd7dsWqXX9Ll2dobl+LurHBgxeO+42Fhy74qXmrnshXzaT1QPw7 uMZ4YUoBz5zPkSrjcbTjJwwuKdPi1vHY/ixLiM1Oel4t3XBXnkm6+obbCDmkXWxkqn6e V+eCZ1CxEQmBaZsY7vYp//gvRdlLnUHrK2C9a5BH2p6RA/JisfLtd66wtok8owRYqqNd eIQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ieR7ZysY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c9-20020ac87dc9000000b004198727ea19si4832180qte.528.2023.11.13.09.34.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Nov 2023 09:34:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ieR7ZysY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2anp-0001Sj-Pz; Mon, 13 Nov 2023 12:32:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2ann-0001SE-Fh for qemu-devel@nongnu.org; Mon, 13 Nov 2023 12:32:47 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2anj-0000v3-Q5 for qemu-devel@nongnu.org; Mon, 13 Nov 2023 12:32:47 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cc938f9612so28898165ad.1 for ; Mon, 13 Nov 2023 09:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699896761; x=1700501561; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lo0lQlUWSBjMt9Vl8JT1SFLp9AI2+HeOXlIlVWGHESw=; b=ieR7ZysYVpogFKfFx/fUMlikQ2yy9HgJ7G4B800slT2knetGrikwZ+Q+rT2OSx/pYY a9xfQDmJUEp/rPjX0Ux0iQVfWOL0mRiQexMzzeFpQhyIKn1b0Dt8dkmOo4tYHZQtUFCC JmSvDM0yBNmvVCcFlX06Hlbhp1aMhT7ZNFTO8XvJpBs4WcnIgzssUldqcL74lwO1sKze dF0WUWV7yOFKmRhFtPodS9uiED9b/c/ZVLadtwT7irBFnAyNsgGskUd10pacA7OB8XnV tKOJtb58QHef190H44JIYh5Q5QVU4GAK8p9tJXBrDNOzS5hhaQJ7g/+Qxs4OuBDPQXgS Rn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699896761; x=1700501561; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lo0lQlUWSBjMt9Vl8JT1SFLp9AI2+HeOXlIlVWGHESw=; b=DmL8uDiJC6Tied3nQ8cVZd7o05rzzsfILSH0Ojzq4bHgdW4/uEesYiIouourN1PJz/ QWzZDXijk0InGPMd6kO9zzn8BcaMSncJyd7U0nZg71U5T3wQFHfKjX6ehMJH+M4/fhKS LRFyXZH0ttVRK5mqjy0Dfqr2eU24Z/tO74+emmwtMUe6j0oMutuEFPLXYxSRu5oghiGL qe3pv+/eImRI80HtQXJCuq3VtjGPfOfF08sjbpYO8cIFGn4L0cdJ20sBTlpP7SH8RYhF g3CtA61r3W4/6Wbpwz1PjqrTkJ6dpoIid2phc9s9InwF2YEcOTvvdC1GZF27S1xafd6i 6q+g== X-Gm-Message-State: AOJu0Yw+wyBh0sQKzX6tJd8L1bLYAxHk27WmgkB4l5NCn4u0EpW0BAK+ EyRdySeHviYunVafZ6suztacnPuDXriGxBJyzY8= X-Received: by 2002:a17:902:8201:b0:1ce:a0b:7314 with SMTP id x1-20020a170902820100b001ce0a0b7314mr215816pln.61.1699896761208; Mon, 13 Nov 2023 09:32:41 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id e6-20020a170902d38600b001c731b62403sm4271910pld.218.2023.11.13.09.32.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 09:32:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 03/12] target/hppa: Use PRIV_P_TO_MMU_IDX in helper_probe Date: Mon, 13 Nov 2023 09:32:28 -0800 Message-Id: <20231113173237.48233-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113173237.48233-1-richard.henderson@linaro.org> References: <20231113173237.48233-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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 Direct privilege level to mmu_idx mapping has been false for some time. Provide the correct value to hppa_get_physical_address. Fixes: fa824d99f9b ("target/hppa: Switch to use MMU indices 11-15") Signed-off-by: Richard Henderson --- target/hppa/op_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index a0e31c0c25..7f607c3afd 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -338,7 +338,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr, #ifdef CONFIG_USER_ONLY return page_check_range(addr, 1, want); #else - int prot, excp; + int prot, excp, mmu_idx; hwaddr phys; trace_hppa_tlb_probe(addr, level, want); @@ -347,7 +347,8 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr, return 0; } - excp = hppa_get_physical_address(env, addr, level, 0, &phys, + mmu_idx = PRIV_P_TO_MMU_IDX(level, env->psw & PSW_P); + excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys, &prot, NULL); if (excp >= 0) { if (env->psw & PSW_Q) {