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

Re: [Xen-devel] [PATCH 07/34] x86: only call memory_type_changed for HVM guests



On Mon, Aug 20, 2018 at 05:57:25AM -0600, Jan Beulich wrote:
> >>> On 17.08.18 at 17:12, <wei.liu2@xxxxxxxxxx> wrote:
> > --- a/xen/arch/x86/domctl.c
> > +++ b/xen/arch/x86/domctl.c
> > @@ -416,7 +416,7 @@ long arch_do_domctl(
> >              ret = ioports_permit_access(d, fp, fp + np - 1);
> >          else
> >              ret = ioports_deny_access(d, fp, fp + np - 1);
> > -        if ( !ret )
> > +        if ( !ret && is_hvm_domain(d) )
> >              memory_type_changed(d);
> 
> I think whether to add is_hvm_...() conditionals or whether to introduce
> stubs should be selected based on resulting code churn: In the case
> here this would seem to suggest a static inline stub is on order. Or
> perhaps more generically - if a function already sits solely on is_hvm_...()
> guarded code paths, don't introduce a stub, but otherwise probably
> introducing a stub is preferable over scattering around new is_hvm_...()
> guards.

If there had been dozens of calls to memory_type_changed I would have
added a stub instead. I will switch to using stubs in the next version.

If a function already sits under is_hvm_* no stub will be needed in the
first place, assuming DCE works properly.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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