On 04.05.2023 09:44, Roger Pau Monné wrote: > On Wed, May 03, 2023 at 05:33:05PM +0200, Jan Beulich wrote: >> --- a/xen/include/xen/sched.h >> +++ b/xen/include/xen/sched.h >> @@ -438,12 +438,14 @@ struct domain >> >> struct grant_table *grant_table; >> >> +#ifdef CONFIG_HAS_PIRQ >> /* >> * Interrupt to event-channel mappings and other per-guest-pirq data. >> * Protected by the domain's event-channel spinlock. >> */ >> struct radix_tree_root pirq_tree; >> unsigned int nr_pirqs; >> +#endif > > Won't it be cleaner to just move this into arch_domain and avoid a > bunch of the ifdefary? As the initialization of the fields would be > moved to arch_domain_create() also.
That's hard to decide without knowing what e.g. RISC-V is going to want. Taking (past) IA-64 into consideration - that would likely have wanted to select this new HAS_PIRQ, and hence keeping these pieces where they are imo makes sense. I did actually consider that alternative, albeit just briefly. If that ... > Maybe we would want to introduce some kind of arch-specific event > channel handler so that the bind PIRQ hypercall could be handled > there? ... and hence this was the route to take, I suppose I would simply drop this patch and revert the 2nd one to what it was before (merely addressing the review comment on Arm's arch_hwdom_irqs()). That's simply more intrusive a change than I'm willing to make right here. Jan