From nobody Fri Dec 19 19:17:19 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=1746392316; cv=none; d=zohomail.com; s=zohoarc; b=F1tSUgvx6pCmbTNzuZuln1S94kDIS/1END1YLBd6io/6kP5aejKmEh6CLSOKvVZLGjcIKz8uzHDwDtjJLoM5ex32Y6tnipNr0NxGb4ed0sc/GXTx35nADtU6qi9ts49FB7zrVVjtza7rCHtdZ5ef4sUlv+ascX5LRhkmLNL5+5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746392316; h=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=aPY0PoTn2GLTyVD137nu2Bjal+slOFwG2h9vUM4KmIE=; b=TIrV7jDY4J1CoOGISFZRkLReLIwQRGFogk0/kRpw/WhKRAoNtdSBLkHjJN07tH9vKyLgh9S8PHv4B4PIwvZGsXrG+I2dBdHUcMjU382cyCCLHQ3uBxHE2tsFPlCZXb5IHXq5IOO/TaSjHsEeVfkrdZGu5qAsQcJbULH17dmkTvg= 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 1746392316141595.3894123499664; Sun, 4 May 2025 13:58:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uBgOz-0008Qk-Nx; Sun, 04 May 2025 16:57:33 -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 1uBgOq-0008Mw-K4 for qemu-devel@nongnu.org; Sun, 04 May 2025 16:57:25 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uBgOo-0006wW-M6 for qemu-devel@nongnu.org; Sun, 04 May 2025 16:57:24 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-af908bb32fdso3246522a12.1 for ; Sun, 04 May 2025 13:57:21 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e150eadfcsm41346425ad.32.2025.05.04.13.57.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 May 2025 13:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746392240; x=1746997040; 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=aPY0PoTn2GLTyVD137nu2Bjal+slOFwG2h9vUM4KmIE=; b=F4R5JOxtbpfF7ypBcQrHJtAKLbtLwN0W7V3t9iVv0ToAyOR8Nyyb/gnDWFpD24Z4hA 9fP6irSGeqCK+07eM5Waig2RC0+MEk8so5Dd5CeiJawaRnCpZ62g8PY/zcMAmRroa2lW v9Pts5wVMU6gFYFO0amMlgOL6JJnG8zIbAcO45gmUZSjaYMNFUxa/e32IWR8pNu4vJcb msWnj291FcMxlVVMY7egKBlZSQwStuWsc0mBfwOmhEvSpUQ1pVIcrd01UG0Lgs8j2mr2 MugRIn8v/l1x39ZvjcVRhA8U1o8Pk4PasJZshy+JrktOdiNJ/+WWD+zH9wRq+oleilPn 5q6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746392240; x=1746997040; 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=aPY0PoTn2GLTyVD137nu2Bjal+slOFwG2h9vUM4KmIE=; b=j3YbRu7qJQhXvZCFYF4ohKBVONlyfSc+hpClBDasXcM4qfs0sfYzol1yr4HrbXaFUW G3zN6j5jyYaOFxtq+me6iug6/PvZuFkB9nhhv5Nhe33PpPLIDZPifL6vt67+Vkqboluh CrWR4xb9t/FEgwgSgbjppgyzxLjn6Ruz5soYUB8BejEVcm+31N9Hfuv/RMDJJgjuPhlY wKBDADuJRoYpLVszrSpqsufDgNc53KFWCU6n7gc8FfVnJSCUMfFsJxEAGyttkV9275Cd h5kUF6KpgmVCG6aEgjnhPVWUHrcZF7/6UnhtRJyehguwPFA7reih29M/qPzgXVoiQaIM Y3kA== X-Gm-Message-State: AOJu0YxcOnOGSfNSyXWlVEBkZcMl8KxnxOVd+jS4SacsyBoQy7N5B/0y PMA/pSERNKk9SrGV7lgjM6V5uwS2OAW9eHD9DGgG30fRnSC8kd3u58Y0mv6j8TFhgLbCqpd+tFs w X-Gm-Gg: ASbGncsV7an4bGkZ3/AxJr3MtNZX4y9AawgPKN8HB/9YMqd6pTEJVs+M/uaolaode9C lWiiohr7AjZbNynT5e5MHGgPF4dfAbEs9j2y/hKEesTA4N/cMuMNdro+7VVLyOMdUu4QZzsRklC tSXFdEsm7VyAOekV6q/XnKiBYA9ZxYA78ITv2A5h4wommkF9HNHcsC0NkU0SDRfBseEoUbppXBl 3PjwYAoJieHEOIiNcJd47UadVXky4vYSqA/hcmVCgT6xsmR++8u2rE7NbySgCctO1ndv1Lnq1xa OiycHgeAgKKCe2Wn/bpvBO8eiTuOhOxp3oBaGPRp/qPa4WCb6Z7oLnyg4v1runNJ1NBs9n5rIqM = X-Google-Smtp-Source: AGHT+IHtEV4aEFP/ycyCWsqtyMtfmjyx0ab1ESgtGmpHjBebBxC1B/dVJz2sc81K4j3b3VEH2xmveA== X-Received: by 2002:a17:903:40d0:b0:216:4676:dfb5 with SMTP id d9443c01a7336-22e100b7209mr173665005ad.21.1746392240567; Sun, 04 May 2025 13:57:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: foss@percivaleng.com, Song Gao , Bibo Mao Subject: [PATCH 06/12] target/loongarch: Fill in TCGCPUOps.pointer_wrap Date: Sun, 4 May 2025 13:57:07 -0700 Message-ID: <20250504205714.3432096-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250504205714.3432096-1-richard.henderson@linaro.org> References: <20250504205714.3432096-1-richard.henderson@linaro.org> MIME-Version: 1.0 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=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1746392317460019000 Content-Type: text/plain; charset="utf-8" Check va32 state. Cc: Song Gao Cc: Bibo Mao Signed-off-by: Richard Henderson Reviewed-by: Bibo Mao Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Song Gao --- 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