[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>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Wed, 13 May 2026 13:10:08 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- 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=vif5HSQCWb0njHbszUUuI4ehkx1leDPgfdyJ93Fb1iI=; b=h2VGmk2kj/Yz7hM6qg/pzVLjOenhzv/9dIUFw6Ac7dJ6yOYXyEH2ERo1RyUlXOBHrdQa5EDgv5scvOfjqk9tWWwg284XeuscdBATXfmHfAQvabl1eMrqQIVe8XsjAt/gizAXwqvH6VF4tsRp3lvUHTdlCtP2D/98n1911YDF8QmFFKP2K64EVG2x6ioUI8+9kZuGD4ucfgE08bQcSlVGWVspJlZAp0Jan4GSSzWBqBotpWd8dX0ZXdPLalxgWIA3DPm+IY1d8mJ2Q5XakmLpWMUX473pLMnpajLw8SsL3yU4zj8rfqggwXBIMooHBIOlHxnYSwwLKMOTIr2xheAdmg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nunXxu2LKryhW2fkHoAYaCBjBlk1DozfD7kFUd8pfycfGqpA352vzkN51enuouSvM6Hw1aKA/2VIjlWvzQryrVQkjbMeIQxf46x8zL5eyX27Yo91x9Ptq/jxUXj1WkORLtTrWNKumdGR3hs9YkxLQDCU8sFos02/jRWrx349HjvY/DwzrlKGm3jsNW9bikqxnGLP7ZWTqfrQl2E4xRrgbl2rVgxbFOwVlBHRq9bUZn2if4I5tnO087D671P8GP2nRJRT4z2o0g0xSq7BNA0Iu1EvvyZQuIA3L55NzXmGw3DKxHIWoJ0U+aYv04OL+0an+ofhOLyohbnwzW67DA1PgQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@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>, "Luca Fancellu" <luca.fancellu@xxxxxxx>
- Delivery-date: Wed, 13 May 2026 11:10:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07-May-26 10:58, Oleksii Kurochko 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>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|