On 04.12.2023 10:39, Oleksii wrote: > On Mon, 2023-12-04 at 09:41 +0100, Jan Beulich wrote: >> On 01.12.2023 21:48, Oleksii Kurochko wrote: >>> Ifdef-ing inclusion of <asm/grant_table.h> allows to avoid >>> generation of empty <asm/grant_table.h> for cases when >>> CONFIG_GRANT_TABLE is not enabled. >>> >>> The following changes were done for Arm: >>> <asm/grant_table.h> should be included directly because it contains >>> gnttab_dom0_frames() macros which is unique for Arm and is used in >>> arch/arm/domain_build.c. >>> <asm/grant_table.h> is #ifdef-ed with CONFIG_GRANT_TABLE in >>> <xen/grant_table.h> so in case of !CONFIG_GRANT_TABLE >>> gnttab_dom0_frames >>> won't be available for use in arch/arm/domain_build.c. >>> >>> Suggested-by: Jan Beulich <jbeul...@suse.com> >> >> Not really, no: In particular ... >> >>> --- a/xen/common/Kconfig >>> +++ b/xen/common/Kconfig >>> @@ -15,6 +15,7 @@ config CORE_PARKING >>> config GRANT_TABLE >>> bool "Grant table support" if EXPERT >>> default y >>> + depends on ARM || X86 >> >> ... this I explicitly said I consider wrong to add. > Then I misunderstood you. > > What about to do the same as with MEM_ACCESS config and introduce > HAS_GRANT_TABLE?
That's an option, provided (and I put that under question before) there realistically can be ports which don't mean to support grant tables. You mentioned that things are fine for the dom0less setup you're testing, but I don't think a fully-functional Xen port makes sense to only support dom0less. But of course I'm willing to hear arguments to the contrary. > Or would it be better just update "depends on" to !RISCV && !PPC? Definitely not. Jan