From nobody Sat Nov 15 20:50:00 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1748420540; cv=none; d=zohomail.com; s=zohoarc; b=jdF5eTKsgBFdS1q4XDvdY9wjlDzxTVcwTshuX0MTVZQzw7h313I7qr78mQJjMQKqoeq6+ncqlKaTccVfaeoyiEi7pndIHLZA1tcVjAk0QM6qKSpRfPE+zBsav3w0R8A4PnuNCiIW6pqwR16/yt74BmIxZMYnfq191i+WGN5iV3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748420540; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Nm/j60D6ziFgBnhIXDXZVa7Si2QjgX9S2ztuPc0u2vE=; b=mr3ojOxp115HT++pYEZTV34vYa0MKeTgTu1JrTJTc8bH4PZsDpA93YLMiW6mFAzCTG/PYB/6cl/gwFTe/3o80PQpt4M2QvN/9VRHKRD9A7gW+ftyvGE4SNk2QXm1w6VPry5bGT/DgyaInrzlfbno6JGDmRadg1WNGaK0hkk37HU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1748420539986585.8055636130134; Wed, 28 May 2025 01:22:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKBz8-00043a-GU; Wed, 28 May 2025 04:18:02 -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 1uKBwS-0008Qa-0N for qemu-devel@nongnu.org; Wed, 28 May 2025 04:15:19 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uKBwE-0005IM-Ke for qemu-devel@nongnu.org; Wed, 28 May 2025 04:15:14 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-442d146a1aaso48842305e9.1 for ; Wed, 28 May 2025 01:14:44 -0700 (PDT) Received: from stoup.. ([195.53.115.74]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4500e1d85b5sm13178645e9.32.2025.05.28.01.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 May 2025 01:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748420083; x=1749024883; 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=Nm/j60D6ziFgBnhIXDXZVa7Si2QjgX9S2ztuPc0u2vE=; b=FtHXS52YnzCstCfQxMgdM1fmBqAIhJSn2bOWSpKi8GE/Ur33ZOknpWxtlwj60HdvwV +poL2YoqgRs+0t3+M+aiOBnJqUwcxVMfMCnk1D98Fr+p5M0AxH7BxTOa3UnhYXniNMgj KqpfL4PLzpoQ06aNZTTwIWOxz4B1w/pb0n1x2DUJYdDk5Ax/yKQgG8oHyHbxDh+uYON0 wTVYqrPsmiAlnRfl18K5xstsw61l9t4DRkuvQ/FwEZs4YAcCfOQ+O1mStzsOdZLVPYpz 2SEzw/fAPn+iV9xpz3RPyR3RrojEdH3AzLlAzTzRctFIAjol4nQ9q+miKI6CWrvIvmBc cBRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748420083; x=1749024883; 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=Nm/j60D6ziFgBnhIXDXZVa7Si2QjgX9S2ztuPc0u2vE=; b=viTSVSbvukrZqniSqOiTA45gYzQq++uG7Ex9xP5wfnVHpunKAjhHllj8sLX1NmAzgf nPuzb3J9XZLqj1KnB1mZyLtcK4UoBQDAyyCS6793fkGi96xELFKFkVBATzsXrR41Oq3A DyI8yWtwepssIrkFjpl71E9pXDu41DBZh9j4gWQzfUuPgcJdOq2PUd8IlsjvfLlwhIrb EKtu8TdXcOHGnoG1Yec4mB0Atc4C6KOGSLoIkFCCdKjDWPMmKwIfH2mo3MbvHhe01RT3 /fn04xAiMaLXJZQ6ccT1eOmqBkzzK5Kigtn1nWGooVDPn1UHOVxSMRzEkLU96/zq79eK AAgw== X-Gm-Message-State: AOJu0YxP2sa7D+dl86hEGRGOwTO+osfSOhXHlLDiAOM7tVPdX3vseTBP VzmAMbpi+O9HRrWf2OiV1WYmcf1f77r5IVHElHi+ndEpEdCDiHq/g9+MjLSzUwi5CzNXvUqwnrg 1/7PB0rUlyw== X-Gm-Gg: ASbGncujP294fRxHYbuniTGEVosx5Wa9GlR8BwZI1j+YvfuGP1flGtrDp5/ic2quXzl s1YVP6Q2yiV5uuK6RARMywHRlBOwOyNvQGJiAHDlvU2QlnVC4C3stRdLsYE4BBOVAG5PB/ba6uF ICA4V5hRHYBLlEK0be7Lg/BKjzbX+Ga274uRkQeTgNmmx6ty2TJjDAlepIYjY/G4yUP7S8OLcrN qU8OTf1027+uFNGl0w1oDCQPrPlMyYNSvRYAtqSazkow4KbT96dG+a3633mL2dFIRnsAih4bKJT ci5zE89mVv1GeSfk+CiYRK88GGvLzwKqkDMdDVClKOLWJ1rofzexGKPQ X-Google-Smtp-Source: AGHT+IFAkl/abVcmKTlqkgaAISu+po8UQWREYerEiNHXUPTr/9VwF7mkqpuWMh7st05gkUR9oQfijQ== X-Received: by 2002:a05:600c:820a:b0:43d:762:e0c4 with SMTP id 5b1f17b1804b1-44c959b79fdmr146138375e9.27.1748420082678; Wed, 28 May 2025 01:14:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , Bibo Mao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 22/28] target/loongarch: Fill in TCGCPUOps.pointer_wrap Date: Wed, 28 May 2025 09:14:04 +0100 Message-ID: <20250528081410.157251-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250528081410.157251-1-richard.henderson@linaro.org> References: <20250528081410.157251-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1748420540826116600 Check va32 state. Reviewed-by: Song Gao Reviewed-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- target/loongarch/cpu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index f7535d1be7..abad84c054 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -334,6 +334,12 @@ static bool loongarch_cpu_exec_interrupt(CPUState *cs,= int interrupt_request) } return false; } + +static vaddr loongarch_pointer_wrap(CPUState *cs, int mmu_idx, + vaddr result, vaddr base) +{ + return is_va32(cpu_env(cs)) ? (uint32_t)result : result; +} #endif =20 static TCGTBCPUState loongarch_get_tb_cpu_state(CPUState *cs) @@ -889,6 +895,7 @@ static const TCGCPUOps loongarch_tcg_ops =3D { =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D loongarch_cpu_tlb_fill, + .pointer_wrap =3D loongarch_pointer_wrap, .cpu_exec_interrupt =3D loongarch_cpu_exec_interrupt, .cpu_exec_halt =3D loongarch_cpu_has_work, .cpu_exec_reset =3D cpu_reset, --=20 2.43.0