From patchwork Mon Aug 19 22:51:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 820284 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c8:0:b0:367:895a:4699 with SMTP id m8csp1653352wrb; Mon, 19 Aug 2024 15:53:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0cNbNsHLwinnDdJyjJdi4U/MhTXS4uyRQYu1yRhGfEWz0CzqWJErr3ikDRFy3EcKBIOSLsQ==@linaro.org X-Google-Smtp-Source: AGHT+IElT5esCIiZohwlDMQKz2PaaCS6NuswVyaWJPevw7Xhh68W4hro8OtfUMGzqDDjbj+9JSF2 X-Received: by 2002:a05:6359:6484:b0:1b3:9474:1f80 with SMTP id e5c5f4694b2df-1b3947420edmr1009048055d.1.1724108032999; Mon, 19 Aug 2024 15:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724108032; cv=none; d=google.com; s=arc-20160816; b=bQd0lmRMG3LrEIlYzNkUXj0v4cfrxynFIt5BGBSc49bAvjVIVLRms1UWgjKePRZul7 ygy36oG8+Bd+cwzd4VeM18U5rgyzNtOkHHgVpFz672Z2n7Euyuwvkv1t58lp8DSzu725 H6n9hZ0s7jDn43q6Z7KDwjbqfLW9dOVAWy7z47wanEjSMXb5NtKHTQf0GsqzQ9r5QyAZ LN43H9iVqGvja5p6vYyzNllTMsw8Tmy2+l89D+pH/Q2X/VFcu4mC6EeXq8BNMiPeOOjk /33wZdCkYwBHf4g40z/gSzFpqIAZkRVI1yprH6WfzPfsw4sBmJyfzZ/rec/3YZ7MwSR5 uRmA== 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:cc:to :from:dkim-signature; bh=Es9COWayATyZP7U12SucfNzKx1xwYMI0HkJSQW4xD1k=; fh=qtn8prgQtzf5IzCNvLChUZDElvNECP6ej9YfjQeBz3I=; b=M4AuKdRdcR1l+Bjjvq6qa4ibvHE7DNu7RJy6WemetePNAP60o9Rz2L3sM8d3WoLOEd vFJMlNSi6zz03oHB5T4wJSugeAUDo4D9td/A88VqGu42sjg7gEZc/0lXAb1ycYQ9aWmC yxAcAZrhVtvRayPyCPJytcLXOchNydN+HtCSgzWZyMEt3ZsYPU6NSdxLhFGkByuhXK/c Y1qlZBsuJ/RLHcbq6LEDEKYS5YDx6CmbpzmObEXVYte2p3F5Kixa6sEw/FlnmI5xulXx UB72nbBaDZbbwqQe/WkfndqxPZN/L/lA6IDjWTOsA9LvNOjA0BrEWiEURbqSOXyRCWg3 3qig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m8STNsU3; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a4ff0e5e97si1113873285a.421.2024.08.19.15.53.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2024 15:53:52 -0700 (PDT) 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=m8STNsU3; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBFg-0004c0-Ed; Mon, 19 Aug 2024 18:53:28 -0400 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 1sgBE7-0000X4-N1 for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:54 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBE5-0000gk-6d for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:50 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4280b3a7efaso38042435e9.0 for ; Mon, 19 Aug 2024 15:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107907; x=1724712707; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Es9COWayATyZP7U12SucfNzKx1xwYMI0HkJSQW4xD1k=; b=m8STNsU3p9+JRGwnJx3GppyTYLlx0aaYXQcQGA9d+mLriJYej3mNZMwHUNeKfIw7g1 e8i2CkAgGfyccB8FftBvJ3riauS2mDka/VVJ2uE+3bDxBJIG5XidASx++DKZtrpDnDNQ je/R+xjR1tfgiJL2oUShtJyLDt5b14SN5FzH6bEVeqStn/+H4sPZ5Q/x52C+HAjMUbR1 jpTdsZMYnHSNEObFF4gYolSztBXBfNMHKNNNc9NH8+su4sEhBVyX2QOiPjXXW14Og6JJ rTZyVDy8U/n4CiWFMpnFl3Pk0qMa0+fJyfALACDa7vVV6XaPEt+chJ1yN7GodAu0sHo8 h0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107907; x=1724712707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Es9COWayATyZP7U12SucfNzKx1xwYMI0HkJSQW4xD1k=; b=HtKCTTDqbtvn4DMSVHMoxAYRrr9Ur4C11dOHiSJvoe3YCb2NAMC1ERIfmfEVMOOchN EeVhUFUQQ4WhX8W7SceVWVeQKAtqgAZstWxm9aST582ipCBI8wzVXcfRX+vZ7lp4N1E0 pgnyJDt88u2bPt/fQ6yRkk5f//9waGhg05wC1+DQBuOF76Qt2+m/dt33xdgu3OzNUtwm r7mdTRJ2Cbe1DUDLb534Mw+DSvA4iekSjA1kDFfSCzWiea8I4iNSrLkPmJaXsMWEuTKN opWYFtMTNZJhehfj+wHjq2rkY81N0o5vp0e4XhZ+u9CY4gIER2yaO4/r6PeZ2OneJPaM 2Syg== X-Gm-Message-State: AOJu0Yw4uDgruPKn9m36coUzszOFIk1rRWc1AvD2L2a/KrYShK/SBmyy 2qg3lktH8ILNT3sLvS8IM3GcifhEcPzxt02dkazfGzoB6L4vHAW+re6gpxgKDRxk7OjiaSevPdm r6pY= X-Received: by 2002:a05:600c:a45:b0:426:627e:37af with SMTP id 5b1f17b1804b1-429ed77d75amr74890135e9.3.1724107906636; Mon, 19 Aug 2024 15:51:46 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed79be15sm122097625e9.48.2024.08.19.15.51.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 06/20] target/mips: Load PTE as DATA Date: Tue, 20 Aug 2024 00:51:02 +0200 Message-ID: <20240819225116.17928-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 PTE is not CODE so load it as normal DATA access. Fixes: 074cfcb4da ("Implement hardware page table walker for MIPS32") Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240814090452.2591-4-philmd@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c index 0e94e00a5f..3836137750 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -603,9 +603,9 @@ static bool get_pte(CPUMIPSState *env, uint64_t vaddr, MemOp op, oi = make_memop_idx(op | MO_TE, ptw_mmu_idx); if (op == MO_64) { - *pte = cpu_ldq_code_mmu(env, vaddr, oi, 0); + *pte = cpu_ldq_mmu(env, vaddr, oi, 0); } else { - *pte = cpu_ldl_code_mmu(env, vaddr, oi, 0); + *pte = cpu_ldl_mmu(env, vaddr, oi, 0); } return true;