On 15.12.2023 15:18, Roger Pau Monne wrote: > The function also supports non-paging domains, and hence it being placed in > p2m.h and named with the paging_ prefix is misleading. > > Move to x86 domain.c and rename to domain_max_paddr_bits(). Moving to a > different header is non trivial, as the function depends on helpers declared > in > p2m.h. There's no performance reason for the function being inline. > > No functional change intended. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com> However, for using it in the next patch either here or there I think the description wants to clarify that ... > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -2552,6 +2552,27 @@ static int __init cf_check init_vcpu_kick_softirq(void) > } > __initcall(init_vcpu_kick_softirq); > > +unsigned int domain_max_paddr_bits(const struct domain *d) > +{ > + unsigned int bits = paging_mode_hap(d) ? hap_paddr_bits : paddr_bits; ... this and ... > + > + if ( paging_mode_external(d) ) ... this just so happen to be okay to use with system domains (i.e. DomIO in particular). Jan