On 31.07.2025 21:21, dm...@proton.me wrote: > From: Denis Mukhin <dmuk...@ford.com> > > Move IRQ/IOMEM rangesets allocation before arch_domain_create(). > > That guarantees that arch-specific code could access those rangesets to > register traps for emulation. > > It is necessary for those emulators registering trap handlers and ensuring > that emulated IRQs are not shared with the physical IRQs. > > Move dom0_setup_permissions() call right after I/O rangesets are allocated. > > Move pvh_setup_mmcfg() inside dom0_setup_permissions() close to the place > where MMCFG ranges are initialized.
And this is just because you like doing so? I ask because first and foremost I can't make the connection between this and the purpose of this patch. > --- a/xen/arch/x86/dom0_build.c > +++ b/xen/arch/x86/dom0_build.c > @@ -471,6 +471,24 @@ static void __init process_dom0_ioports_disable(struct > domain *dom0) > } > } > > +static void __hwdom_init setup_mmcfg(struct domain *d) Why __hwdom_init when ... > @@ -480,6 +498,14 @@ int __init dom0_setup_permissions(struct domain *d) > if ( pv_shim ) > return 0; > > + /* > + * MMCFG initialization must be performed before setting domain > + * permissions, as the MCFG areas must not be part of the domain IOMEM > + * accessible regions. > + */ > + if ( is_hvm_domain(d) ) > + setup_mmcfg(d); ... the sole caller is __init? Jan