From nobody Thu Oct 30 23:14:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1758146192; cv=none; d=zohomail.com; s=zohoarc; b=VEFT0qHjRwm2ApCmhJ4ONwKeMvRjYbCf+MdUjQBBAz6KgtI/lCxW1hJqY4Nk8bAZwj6lNuH+SdeMMv8i6aV3hw5mloaNeNN7JSw7OP/iNdaHnOvijHR0+C8gEXBr0giEcczoxt2h+weY1qmzAO7NUaIw/AtRGnMU0bVp+nRHegs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758146192; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Q+LjsUjHhvVbZESumoiysJfqjc0SNUhGIIys/BFmCGk=; b=Sk08tYSJAcsD/0HtsS2SJLehTVRrvd+SBDZgRmDCsI+WpcDMwsLdsuhhj+y9xUfe6G5zAj/aC9ZR8qKakix/zN1yF2tahQXqIVUbq4lP8k9nLpyGr+qi8VlOfoVLeHqwwlZGvLalUh3SE7dHmF8YHlBFXEVzvi3J3anfpa1f/4E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1758146192401137.4224531597888; Wed, 17 Sep 2025 14:56:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1125589.1467553 (Exim 4.92) (envelope-from ) id 1uz08E-00010s-Ez; Wed, 17 Sep 2025 21:56:06 +0000 Received: by outflank-mailman (output) from mailman id 1125589.1467553; Wed, 17 Sep 2025 21:56:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uz08E-0000zg-96; Wed, 17 Sep 2025 21:56:06 +0000 Received: by outflank-mailman (input) for mailman id 1125589; Wed, 17 Sep 2025 21:56:04 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uz08C-0007Lt-EW for xen-devel@lists.xenproject.org; Wed, 17 Sep 2025 21:56:04 +0000 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [2607:f8b0:4864:20::636]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 19f4cffd-9411-11f0-9809-7dc792cee155; Wed, 17 Sep 2025 23:56:02 +0200 (CEST) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-267f0fe72a1so1859475ad.2 for ; Wed, 17 Sep 2025 14:56:02 -0700 (PDT) Received: from fedora ([149.199.65.200]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-26980053da4sm5538095ad.20.2025.09.17.14.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Sep 2025 14:56:00 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 19f4cffd-9411-11f0-9809-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758146161; x=1758750961; darn=lists.xenproject.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=Q+LjsUjHhvVbZESumoiysJfqjc0SNUhGIIys/BFmCGk=; b=Rb9Bxxa75/hl3ERzSiyFdmDc6UaMxadvnL0g0kFkTPtBkNVsjwaoj46a20MFhK4mfP vt5WJEqX7qWydFIn0XinYLaumMsOGJc9zFo6rtsMKBgR6qkkiyBTq8P79gtUn7MVD9oX 1a+n3BjsJLlXJiw1wJIp4bCfhpXbP6zMROEpJb/3tTpoySHRKQHKUkjp33CYtmAUnPDW yR70f1YbL7XO2mfbZYoxGjtbIyEmT2Jn+WMydR4Gw11aBrSCYX0KB4pR30f7iLUV47zP mtZdZuKU2mBHX5ZR2Hh/QumW8j141M5l20ONCDiKM6ROQ6e2XE/CJd7E7jYxjUffixH2 fh0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758146161; x=1758750961; 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=Q+LjsUjHhvVbZESumoiysJfqjc0SNUhGIIys/BFmCGk=; b=LBywySMLMnafwVPXMgRWdNx5Dd2+eZJcquTPxHJ6mnBRF52C6yPIcSe+cUTa6mmq8A pdOl1PS3D3cuxkwbXdKSjkN+3k3ONRDQYY+/m7xVp562zFueNG5TXbodOHqFmRQIjFQU k67fTjfEVGqqEEKvY+Iv0cIQX61LNkXVF2oR1yikfO0F2kGsnUP2VJUvTmYXWpZLQmoh ExBKAir7xQ09Dp1Z9vimfW8CM7ckOPm9OJv3zNrZDDfMtsUtQkHfaXguSrToXHG2iOaR ZuqvuHmyS9i4E5KafnRHXVz+cu8LfrXkgzUaVYLQoQIqZIggCtyjeQhEJUlkpjt/XVo9 CAiw== X-Gm-Message-State: AOJu0Yz3HPtT/06UIDOydrRcpwiT/i5DnYj3tv/q3yFTYwXN8Efab+d/ hCQ40oNWWIWlZI79o8FseaP3n+SZ+i+BaLnvOmVhJlC4BFp8CuyxcI4bEyqhaQUH58I= X-Gm-Gg: ASbGncsSTrAGTXPWWdWo4iDtA4lOp9CY5yZRAstRp3FiOecWKwUvZwg33XS0z2INFuA zilyNqQJ4rsWk2lkDUYVMtVisKvnWTx6PTomKz9K3OTEjmyKUS1FUKmC5PEuqaRvN1ZS/5Cya0x 2EoRmRpa/wFjsMpGqQrq01jGvHQQo+wKx8VGRK596z9ZHCGZiC2HvfaQHbvymUTMeHtlrdX1EB2 8IaNooXkvA9t7VAJ6avvn+fWMc21oqs3oPR/GSAQBX+q7Vqck7U7e9CayD2BPlMhckYCiLEp/XE e1BhIK91YKTj6BXcxGFt5jTic3m9Isk0njZ+b4qcUnDqAVqJvBp9dVvrZkMawm+yza7rEwixMkS ZCmTQRxnY8G4/kbwAR1Vs63VRBlG7srV/hOFvESgtBVDa X-Google-Smtp-Source: AGHT+IGNPLadatCVRmi8Phsax/VmTFL+UZNvj6wraEgXA5r4ZJ+TzygZwFd7i7FiUN3kSaK5SnrXFA== X-Received: by 2002:a17:902:fc86:b0:264:70e9:dcb1 with SMTP id d9443c01a7336-26813cfc1edmr43504565ad.56.1758146161001; Wed, 17 Sep 2025 14:56:01 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Jan Beulich Subject: [PATCH v4 08/18] xen/dom0less: abstract Arm-specific p2m type name for device MMIO mappings Date: Wed, 17 Sep 2025 23:55:28 +0200 Message-ID: X-Mailer: git-send-email 2.51.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1758146193673116600 Introduce arch_dt_passthrough_p2m_type() and use it instead of `p2m_mmio_direct_dev` to avoid leaking Arm-specific naming into common Xen code, such as dom0less passthrough property handling. This helps reduce platform-specific terminology in shared logic and improves clarity for future non-Arm ports (e.g. RISC-V or PowerPC). No functional changes =E2=80=94 the definition is preserved via a static in= line function for Arm. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in V4: - Introduce arch_dt_passthrough_p2m_type() instead of re-defining of p2m_mmio_direct. --- Changes in V3: - New patch. --- xen/arch/arm/include/asm/p2m.h | 5 +++++ xen/common/device-tree/dom0less-build.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h index ef98bc5f4d..010ce8c9eb 100644 --- a/xen/arch/arm/include/asm/p2m.h +++ b/xen/arch/arm/include/asm/p2m.h @@ -137,6 +137,11 @@ typedef enum { p2m_max_real_type, /* Types after this won't be store in the p2m */ } p2m_type_t; =20 +static inline p2m_type_t arch_dt_passthrough_p2m_type(void) +{ + return p2m_mmio_direct_dev; +} + /* We use bitmaps and mask to handle groups of types */ #define p2m_to_mask(_t) (1UL << (_t)) =20 diff --git a/xen/common/device-tree/dom0less-build.c b/xen/common/device-tr= ee/dom0less-build.c index 9fd004c42a..8214a6639f 100644 --- a/xen/common/device-tree/dom0less-build.c +++ b/xen/common/device-tree/dom0less-build.c @@ -185,7 +185,7 @@ static int __init handle_passthrough_prop(struct kernel= _info *kinfo, gaddr_to_gfn(gstart), PFN_DOWN(size), maddr_to_mfn(mstart), - p2m_mmio_direct_dev); + arch_dt_passthrough_p2m_type()); if ( res < 0 ) { printk(XENLOG_ERR --=20 2.51.0