[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 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.

> @@ -1037,7 +1037,8 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
>                         ret, d->domain_id, mfn, mfn_end);
>          }
>          /* Do this unconditionally to cover errors on above failure paths. */
> -        memory_type_changed(d);
> +     if ( is_hvm_domain(d) )

Hard tab (not that it matters much with the above).

Jan



_______________________________________________
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®.