|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 04/11] xen: introduce domain-layout.h with common domain_use_host_layout()
On 5/4/26 2:59 PM, Jan Beulich wrote: On 28.04.2026 16:33, 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]. [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>With the SPDX tag added as indicated by Luca: Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Thanks. One further minor remark:--- /dev/null +++ b/xen/include/xen/domain-layout.h @@ -0,0 +1,27 @@ +#ifndef __XEN_DOMAIN_LAYOUT_H__ +#define __XEN_DOMAIN_LAYOUT_H__ + +#include <xen/domain.h>This isn't really needed. It is ...+#include <xen/paging.h> +#include <xen/sched.h>... included by this one anyway (pretty much unavoidably right now, I guess). Then it will be needed to re-order them. Do you want to put the comment above xen/sched.h: /** Ensure xen/sched.h is included before xen/paging.h, since paging.h depends * on xen/domain.h, which is pulled in via sched.h. */ #include <xen/sched.h> #include <xen/paging.h> or just add this to commit message instead? ~ Oleksii Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |