[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 04/11] xen: introduce domain-layout.h with common domain_use_host_layout()
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Thu, 7 May 2026 09:29:21 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=gmail.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+kuVMe6Rh+0uG0YF+9e1lDO+8hhhS1LiWXvuS+5qEQc=; b=n1eTg7N6OS+8kaK4Btfj2KjCY7VO71UHI56R/We6iQVocTqcA5V+3wT1H2WJVMBG0dywCsrSaghXyUpDoSLlttmYZshKqlN5kqTj3Q9FeT0BMTbMAmYod3zC/LLx1ZzlOdqdoOR9pwCc5E5AXVA0ZPIxq4p68C2IrWcKKLe15PxhpJSS+N1porwKmnxOUXN6AqjmleBBLts7hYuMuCX1vgFrOcX0n4OAar+SH2KTtwHcsOijS3ePnCB3QtI9aHT/agqpJlMqKaRpj4pEbp7THVLDViSYSJ5I43avA/WQAAlczeVdXZNTZRDIu/UqcuxbWg1GGPfR4o6KIfHNmW2ouw==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+kuVMe6Rh+0uG0YF+9e1lDO+8hhhS1LiWXvuS+5qEQc=; b=moirN43yw8zBB8DXZmDU2PMWcdvMxDXDddGs5GEeYkbz13Xz4eT6HbkKbBah1JDURxB5/Fo+1RSCYYztWzXsggFqPfacW+XjtLEKf6tLpI3WcUoz8ncK6fSV5GYrsNiSQ6qUyR9gkWC0XeEC9ZCdkWfSJjetstmduQxFxPVtmJ83g2+H4ITlhz1ayGyLXggc9wSpw4JMcqzpHlCzzPheqhDCSmdqbP9yFArmRv5y4T/hqg9GGLstEnpKYGeLmjrix5Z3D+T4Mxic8+FZUyGNYETuBmnxoO/FujY/HqmrXVf2YwXFzi2ByzZEIHjc015FpMwFmRmhHde+UzQ+ke2gfg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ywItyRWs8mLjednOxDgi+S9opn5CJZW0rib3Lny9fRJj+sO48qJFw2B2Sja6KrGeIi1l/CzVDDNmyGWvSF5pBzMRh0HIPbur1JXbAE3lycL8VX64To0ffvoBIQV4rzAHL9yMWGqBJQLqH8MT88+7pSfHaitvQV+ld1cnYwIkQ7REEcOm6qJDcGTUN2YINnNwGb7y5oFVRYHRyhoO5oTqJnWLV9cxPn+swAE5WnCbqW601ntO1AVf1PAyCjLWGEsK1dNBznvTPhbmBDvEAMnngEptMkorUfdmHf42SiJ0DdKZF8H7FdfJfzk4mcxa91thcC1lSx3DqScq7LFwsly93A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FMPLd0S0KLVM1tvW1Gh3IXB4iSp2dck9RnHwforfq7RmBqV14BwXba6HvZJbUdAweKpoTDDZEp6Z7FKZMnq9VC0SFykD1m3zAk+y1zp/+AnNnSVmekm2HQb3VktSus9TTiGXsU7lOOoH5qX7+jhd3mKqyE9A2EMdZaXkS2cFcdfaVp9wZnot8NCFHbudjls3xlNXqs7mGv1yfhPjqTGhKAgeTZtDn3085d87DmiASlwpoXQ4R5KrLFrCZlvq5n5tMzqikZ/LxWrIFP6NK9xa8RjRsAIfjuS/pEqnS7cS0B5j6p5OSu0RQ9ZiQ42WthTLh9mXnvADhvEJd08IOar0Tw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
- Delivery-date: Thu, 07 May 2026 09:30:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHc3f/IrjCU4ATePUuKxl1rqHU0O7YCS9SA
- Thread-topic: [PATCH v5 04/11] xen: introduce domain-layout.h with common domain_use_host_layout()
Hi Oleksii,
> On 7 May 2026, at 09:58, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> wrote:
>
> domain_use_host_layout() is not architecture-specific and may be needed
> on x86 [1]. Replace the ARM-specific macro in asm/domain.h with a common
> static inline in a new dedicated header, xen/domain-layout.h.
>
> xen/domain.h would be the natural home, but placing it there would
> require including xen/paging.h (for paging_mode_translate()) and
> xen/sched.h (for is_hardware_domain()), which would introduce circular
> dependencies. A separate header that callers opt into avoids this.
>
> Adjust the implementation to take paging_mode_translate() into account
> so it works correctly for all architectures, including x86. Some extra
> details about implementation [2] and [3].
>
> To avoid the following compilation issue:
>
> In file included from ./include/xen/paging.h:4,
> from ./include/xen/domain-layout.h:6,
> from common/device-tree/domain-build.c:4:
> ./arch/riscv/include/asm/paging.h:17:48: error: 'struct page_info'
> declared inside parameter list will not be visible outside of this
> definition or declaration [-Werror]
> 17 | void paging_free_page(struct domain *d, struct page_info *pg);
>
> add the forward declaration of struct page_info to RISC-V's asm/paging.h.
>
> [1]
> https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2602161038120.359097@ubuntu-linux-20-04-desktop/
> [2]
> https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2602271742400.3148344@ubuntu-linux-20-04-desktop/
> [3]
> https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2602271750190.3148344@ubuntu-linux-20-04-desktop/
>
> Suggested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Cheers,
Luca
|