On Tue Jul 16, 2024 at 6:06 PM BST, Alejandro Vallejo wrote:
> On Mon May 13, 2024 at 2:40 PM BST, Elias El Yandouzi wrote:
> > From: Wei Liu <wei.l...@citrix.com>
> >
> > It is going to be needed by HVM and idle domain as well, because without
> > the direct map, both need a mapcache to map pages.
> >
> > This commit lifts the mapcache variable up and initialise it a bit earlier
> > for PV and HVM domains.
> >
> > Signed-off-by: Wei Liu <wei.l...@citrix.com>
> > Signed-off-by: Wei Wang <wa...@amazon.de>
> > Signed-off-by: Hongyan Xia <hongy...@amazon.com>
> > Signed-off-by: Julien Grall <jgr...@amazon.com>
> >
> > diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> > index 20e83cf38b..507d704f16 100644
> > --- a/xen/arch/x86/domain.c
> > +++ b/xen/arch/x86/domain.c
> > @@ -851,6 +851,8 @@ int arch_domain_create(struct domain *d,
> >  
> >      psr_domain_init(d);
> >  
> > +    mapcache_domain_init(d);
> > +
>
> I think this is missing free_perdomain_mappings() in the error case. (error
> handling is already committed).
>
> Can't the callee jump to a "fail" label and do free_perdomain_mappings()
> internally?
>
> Cheers,
> Alejandro

Bah, ignore this. They are freed in the "fail" label at the end.

Cheers,
Alejandro

Reply via email to