From nobody Mon Apr 13 05:23:33 2026 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=1770913304; cv=none; d=zohomail.com; s=zohoarc; b=k17D0M9j+LyKj3A4ru+eBeozh66dN68QUJmgXT0IKM+5KwB+agO3mAlripKj4CVDBhwUhUaxqrtwK4E5BMyQ480kTOUGGZ+dzHscdttkZKB8ruBL+MGorj5hvRJWDbSAixqBH+9jHF27EplcTNKIGmUv1EmVP04xjhhHg6ShUmk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770913304; h=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=iqkKpGyCtGDJtDlBv21kLuTz5YLX6vjY9zkGw/p3/7Q=; b=QJX/phTchj9DaQfCTA8ctqnmTePdPg6w8zw6ACTufi/mFCKGCzWLEh2m3YCjmCDWEXtozD+AQlsseh8QMSDkKOr1+LMGWC4mr7sm4zxD6oRR3iLhV71jhZjfyzjsCoIq1wDkygmmjCv7RFtfhOyQtDzzGVUViWGtlOcjRJ/Ix60= 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 1770913304051139.55900914977508; Thu, 12 Feb 2026 08:21:44 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1229478.1535466 (Exim 4.92) (envelope-from ) id 1vqZRU-0007Ef-HJ; Thu, 12 Feb 2026 16:21:24 +0000 Received: by outflank-mailman (output) from mailman id 1229478.1535466; Thu, 12 Feb 2026 16:21:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vqZRU-0007E5-Bf; Thu, 12 Feb 2026 16:21:24 +0000 Received: by outflank-mailman (input) for mailman id 1229478; Thu, 12 Feb 2026 16:21:23 +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 1vqZRT-0006Fi-Su for xen-devel@lists.xenproject.org; Thu, 12 Feb 2026 16:21:23 +0000 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [2a00:1450:4864:20::32b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id de98d959-082e-11f1-9ccf-f158ae23cfc8; Thu, 12 Feb 2026 17:21:22 +0100 (CET) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4834826e555so63095e9.2 for ; Thu, 12 Feb 2026 08:21:22 -0800 (PST) Received: from fedora (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43783e5c635sm13938426f8f.37.2026.02.12.08.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 08:21:21 -0800 (PST) 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: de98d959-082e-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770913281; x=1771518081; 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=iqkKpGyCtGDJtDlBv21kLuTz5YLX6vjY9zkGw/p3/7Q=; b=i25PJeX/McznYKr9yMEgnKbH1u+cqRNWLOkqGkPsceVqbIQgPa4o46zjQSPLWFX43F WkpgpYM+vFHzapHp8mRdbNNpSTXWfjs7V/3SFHkiS+67kkFU5tWrVPE1tNO+yc+awaPv cCb6kVzz8DvWX+b3fNLaoZ+2H7Ca+fffaD2RVEBgaECgtxwaXmJUzohvN/AQv+cBLLgb mwkN3aJOKgAf0k18p07JWRjsNHzGdduqrbJbEgyjDcHT2/xD20AZSBct+rZDiv7EvvDY WZuyMWFHsnvcEgPE61A4/tyZm4pgYDWiZ8AhrLVJzWPUo/k7CYT/kHeT2zmmcOegJvKK UBQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770913281; x=1771518081; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=iqkKpGyCtGDJtDlBv21kLuTz5YLX6vjY9zkGw/p3/7Q=; b=HwLyu9iPaT71gfKRGjUwAfk+qfgzDeO8Tr2MExis3cLHdTbpYV3YfY8q7DgJe5K4JI UouN7lDylYRzEdL4y10PWVaUJVFNeacuIJRhcvm9A/wKS6cn91Ox//AcXJZGGRKitUZ2 PLHYgCYgUohXv5hghautU3eVnFzVbiexBzEYA/nLPvqujSknS/gmf8ANOC+ivUJzsrnI VLICQCeYuXWsIfpEOF+TbC3+F12Uc0IS2mNzSMVPOq200d6n4tgnns4gwiEf14MOMILL +qihmNAwnPrEUhkVKSoWdKwaZ0uGVnPRiVrHuCxK8bf61auOhHfQEnMmQyixoCH429sT zmaQ== X-Gm-Message-State: AOJu0YzZCqiLjUzpJD2jUOWM3Lbu2kkwJuUVk0/kFTewcLUMzMLFsL2f LIKd5FISyAAoduZFaGs8VXSb5f0NR9BamVdBxDp47zbKLlChwL13+sT8F9U48ilw X-Gm-Gg: AZuq6aJQ8edQSgwM4LJfKb/q/I7SM02W+tadraHigiUoDZMBQThUEXUwmKGEDl+mdiF IfXFLaSjgwqLDnO7rWtPNE+pF8U4K0gIkkvD7CU/f8Hdm0xGaEAbzum4VIg41rg5FH9efxAiReU R++PoPo5RuWD/h4oPgw+I+LeM1Vy2XAF58nmBJB8j0ySAmokdLYAqJXST4BOMdMKmrGiNhAXpjd mq6OtEc7FsqGqHQXjeCSCbUkDsu3eO8iZvPMDOOccc+Dq3gjT78Xkzg1QCXTKr4dNlC/Aau3AW4 RQNEfM3mpPtqgzFh4mgQuKh3wALkb/RWdUpN950+MOORz3VW7InklmK7o5M6U2MT8cpL8vZsAhY A70DDikhaPSHRfJPHbuSJKCZsS8Xi2yzJD0RMUxatvVG1dBrTt1fjvxKVSuHyUXmkjDYAjOPkbz EMikPwadcr1nU5QmKg9QezVHRowASoBQwuVG+ig2lLRWbyGlrpbF8exSHY0lb9zrohiw== X-Received: by 2002:a05:600c:35c9:b0:483:43da:6c87 with SMTP id 5b1f17b1804b1-4836571fd5emr54435805e9.33.1770913281356; Thu, 12 Feb 2026 08:21:21 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v1 5/6] xen: move domain_use_host_layout() to common header Date: Thu, 12 Feb 2026 17:21:06 +0100 Message-ID: <678eb53c56bc4f6147feb0bbb6c1319197d0f0df.1770821989.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1770913305202158500 Content-Type: text/plain; charset="utf-8" domain_use_host_layout() is generic enough to be moved to the common header xen/domain.h. Wrap domain_use_host_layout() with "#ifndef domain_use_host_layout" to allow architectures to override it if needed. No functional change. Signed-off-by: Oleksii Kurochko --- xen/arch/arm/include/asm/domain.h | 14 -------------- xen/include/xen/domain.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index 758ad807e461..1a04fe658c97 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -29,20 +29,6 @@ enum domain_type { #define is_64bit_domain(d) (0) #endif =20 -/* - * Is the domain using the host memory layout? - * - * Direct-mapped domain will always have the RAM mapped with GFN =3D=3D MF= N. - * To avoid any trouble finding space, it is easier to force using the - * host memory layout. - * - * The hardware domain will use the host layout regardless of - * direct-mapped because some OS may rely on a specific address ranges - * for the devices. - */ -#define domain_use_host_layout(d) (is_domain_direct_mapped(d) || \ - is_hardware_domain(d)) - struct vtimer { struct vcpu *v; int irq; diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 93c0fd00c1d7..40487825ad91 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -62,6 +62,22 @@ void domid_free(domid_t domid); #define is_domain_direct_mapped(d) ((d)->cdf & CDF_directmap) #define is_domain_using_staticmem(d) ((d)->cdf & CDF_staticmem) =20 +/* + * Is the domain using the host memory layout? + * + * Direct-mapped domain will always have the RAM mapped with GFN =3D=3D MF= N. + * To avoid any trouble finding space, it is easier to force using the + * host memory layout. + * + * The hardware domain will use the host layout regardless of + * direct-mapped because some OS may rely on a specific address ranges + * for the devices. + */ +#ifndef domain_use_host_layout +# define domain_use_host_layout(d) (is_domain_direct_mapped(d) || \ + is_hardware_domain(d)) +#endif + /* * Arch-specifics. */ --=20 2.52.0