[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 10/14] x86/domain_page: drop redundant create_perdomain_mapping() call



On Tue, Sep 8, 2026 at 4:55 PM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 02.09.2026 11:43, George Dunlap wrote:
> > --- a/xen/arch/x86/domain_page.c
> > +++ b/xen/arch/x86/domain_page.c
> > @@ -256,7 +256,7 @@ void unmap_domain_page_irqoff(const void *ptr)
> >      do_unmap_domain_page(ptr, true);
> >  }
> >
> > -int mapcache_domain_init(struct domain *d)
> > +void mapcache_domain_init(struct domain *d)
> >  {
> >      struct mapcache_domain *dcache = &d->arch.pv.mapcache;
> >      unsigned int bitmap_pages;
> > @@ -265,7 +265,7 @@ int mapcache_domain_init(struct domain *d)
> >
> >  #ifdef NDEBUG
> >      if ( !mem_hotplug && max_page <= PFN_DOWN(__pa(HYPERVISOR_VIRT_END - 
> > 1)) )
> > -        return 0;
> > +        return;
> >  #endif
> >
> >      BUILD_BUG_ON(MAPCACHE_VIRT_END + PAGE_SIZE * (3 +
> > @@ -277,9 +277,6 @@ int mapcache_domain_init(struct domain *d)
> >                        (bitmap_pages + 1) * PAGE_SIZE / sizeof(long);
> >
> >      spin_lock_init(&dcache->lock);
> > -
> > -    return create_perdomain_mapping(d, (unsigned long)dcache->inuse,
> > -                                    2 * bitmap_pages + 1, false);
> >  }
>
> At this point rather than removing this, all of what is done ...
>
> >  int mapcache_vcpu_init(struct vcpu *v)
>
> ... in this function (per-domain-mapping-wise) would want moving into
> mapcache_domain_init(). The present arrangement, aiui, is a leftover from
> when d->max_vcpus could change post-domain-creation. Question is - would
> that go against further ASI plans? (Likely the answer is "yes".)

Yes, because soon we'll be introducing per-vCPU mapcaches, which will
very much want their own initialization function.

I can add a line to this effect in v3.

 -George



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.