From nobody Sat Nov 15 23:55:33 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=1746111494; cv=none; d=zohomail.com; s=zohoarc; b=Nubr4s9XDD2v9fLqHfU6A4pwb9K6Mpi/Fi3uVPcZvw3jtapCl/nWkuXgJRG1m1Qthqgj9gC0YCB28J1gFlBHBa6M4qSqSJHxfqdudHXd34p3tkUthlyCZ6x7+v5HoYddjIKlG84YkNT8ArUEj86OumhsLp30HWAUyPBgvTP82Ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746111494; h=Content-Transfer-Encoding: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:Cc; bh=EmF5AKGTNJn4wCHiHLWI2Bve9d/Bi6dFsapJqoMpZyA=; b=lGpFoDxaEvtLZ9mOZngXioLSiVRgR4yrCFomMLyS1VrZeZGPnDk7t9IeznsgShs6ixnzXy7jOmva/Nh+ZtXwCVeJglzNfMUzd2bC/r1uWA6XfEYmDdknZDwhzdrOH39v7mvxRhFYnT1hs1YFypv1+Ql/hAbHmBnBShDWm7mopJU= 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 1746111494538811.1294748390422; Thu, 1 May 2025 07:58:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAVK2-0005i1-OP; Thu, 01 May 2025 10:55:34 -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 1uAVJx-0005fj-Dc for qemu-devel@nongnu.org; Thu, 01 May 2025 10:55:29 -0400 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 1uAVJv-0005T3-L3 for qemu-devel@nongnu.org; Thu, 01 May 2025 10:55:29 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22928d629faso10450615ad.3 for ; Thu, 01 May 2025 07:55:27 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e0bb0e770sm7644415ad.92.2025.05.01.07.55.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 07:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746111326; x=1746716126; 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=EmF5AKGTNJn4wCHiHLWI2Bve9d/Bi6dFsapJqoMpZyA=; b=rbgZhXm7GbP07vxR0Ywywa3MVq4wUFUntDAJQ/Muck6oHL17rRhAr8XGQbKXGxVrQK Jf4OEANWWW14rxQZSHEiPmQTKGJJA6zrO5ZRf/ZvzLuU+pPG32CaL1wxVDX6EPE0wbQ9 T9dpgW/3TlYRUDZENvgZilnGriPc9y3A+9Z9hI4Dv2ZFFZUCWAnXgVsVaE9oGzdpjyM7 gc5ZxPO/oQjOO0kRzmy1ZRcfTvp5qm392Ci9W/iMCtG1Rq6XtlaQXvWDOo5sQT8ynTlQ R+u9qESOwAzQ6k7DIMosY8XCwwiyGG8LGj06RU8RBUMhuO50ZI4EM9rm+IjSjLdnBQbh Q5Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746111326; x=1746716126; 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=EmF5AKGTNJn4wCHiHLWI2Bve9d/Bi6dFsapJqoMpZyA=; b=LqXejr0u+8ygh/XpmPIRfN+NFreInqhPv34X1C7Epos/gt94LlAXcAbFObSfHN8Pb1 51foRsURF5xAg2z0kIjej4buZiKuhwxHWWCjax7KWTwszJ5R8a95I3+PhY92qYhSEn/C wmJdvK+IHe83IJBO3QaZ5qqBCVOkmaR970Stm0lWe3v0lzTqyEoYsqmS49iKrH1XjCzk OwnsU2aIwU8VNdBa4SesdQZ1v1WMD3VkOsw4RmgxOaeeagaKdZdGQkBh/ZTzrbAyH/TT pFxQktwUAuX0eU5sak4gmpdZ+1QTW6/sQY9ddPEFm1byXPAQHNHFTJ88YLipN2To2KE9 dXbg== X-Gm-Message-State: AOJu0Yx43HOeOSpMWEBvUfqO82tHdXWobnEkjgPdrQpHqRUK/CaSe+pr GEeAKErSvK2kBvkIWXZxHGhCSvwPJfXNzhSGmZIq9/azo8TZRYbkzLZEqd7yD1GnQEC8AbEGF2x 3 X-Gm-Gg: ASbGncsoOAtbt5wbG32xPV7b2gZUXiwns2iOBJz85jYhkC3ilscnNAJxgdyB9k6OJpr blLTTxJTRqpSr0ANFLIbsIx8kTNRDhS8+SOTvzse+8acc9c+PZQXjWPDOnSQNm1oCd+KXxr2h1v cwEAYUNakSDD0PG8YQuvs0z6SxQ/sRIf3/IKkQno+x4WIDR4pYT+JMhvdCMsZ4zbEr2x8XDSCpE WHOMEJc7Wb2ZiZ/vEeMZDQTz7Nvg+JiL9uw1Q/pBtDNd9+XkNy01qvXnbP2pEj+okP+NHxqOkpO VD2dX5URkzRzLFikBOe98aNRDCDuralafLPNBUYMlMZtbcMC/IRhrqoFiFdWsDKoDLEaG9ZYcI4 = X-Google-Smtp-Source: AGHT+IE6SAH9kbTgkJ+jnw7yhNzoK54Oul71yEAnPeV5LHiXnQreS+IiT8t0t54yhIdpBeXZwiuVcw== X-Received: by 2002:a17:903:1a6b:b0:224:2a6d:55ae with SMTP id d9443c01a7336-22e0863b023mr47358415ad.48.1746111326043; Thu, 01 May 2025 07:55:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/11] include/user: Use vaddr in guest-host.h Date: Thu, 1 May 2025 07:55:15 -0700 Message-ID: <20250501145520.2695073-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250501145520.2695073-1-richard.henderson@linaro.org> References: <20250501145520.2695073-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::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 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: 1746111496683019100 Content-Type: text/plain; charset="utf-8" Replace abi_ptr and abi_ulong with vaddr. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/user/guest-host.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/user/guest-host.h b/include/user/guest-host.h index 8e10d36948..0656f2e356 100644 --- a/include/user/guest-host.h +++ b/include/user/guest-host.h @@ -8,7 +8,7 @@ #ifndef USER_GUEST_HOST_H #define USER_GUEST_HOST_H =20 -#include "user/abitypes.h" +#include "exec/vaddr.h" #include "user/guest-base.h" #include "cpu.h" =20 @@ -30,29 +30,29 @@ extern unsigned long reserved_va; extern unsigned long guest_addr_max; =20 #ifndef TARGET_TAGGED_ADDRESSES -static inline abi_ptr cpu_untagged_addr(CPUState *cs, abi_ptr x) +static inline vaddr cpu_untagged_addr(CPUState *cs, vaddr x) { return x; } #endif =20 /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ -static inline void *g2h_untagged(abi_ptr x) +static inline void *g2h_untagged(vaddr x) { return (void *)((uintptr_t)(x) + guest_base); } =20 -static inline void *g2h(CPUState *cs, abi_ptr x) +static inline void *g2h(CPUState *cs, vaddr x) { return g2h_untagged(cpu_untagged_addr(cs, x)); } =20 -static inline bool guest_addr_valid_untagged(abi_ulong x) +static inline bool guest_addr_valid_untagged(vaddr x) { return x <=3D guest_addr_max; } =20 -static inline bool guest_range_valid_untagged(abi_ulong start, abi_ulong l= en) +static inline bool guest_range_valid_untagged(vaddr start, vaddr len) { return len - 1 <=3D guest_addr_max && start <=3D guest_addr_max - len = + 1; } @@ -62,7 +62,7 @@ static inline bool guest_range_valid_untagged(abi_ulong s= tart, abi_ulong len) =20 #define h2g_nocheck(x) ({ \ uintptr_t __ret =3D (uintptr_t)(x) - guest_base; \ - (abi_ptr)__ret; \ + (vaddr)__ret; \ }) =20 #define h2g(x) ({ \ --=20 2.43.0