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

Re: [Xen-devel] [PATCH 1/2] xen: Introduce an xmemdup() helper



>>> On 09.07.18 at 12:29, <andrew.cooper3@xxxxxxxxxx> wrote:
> ... and use it in place of the opencoded instances.
> 
> For consistency, restructure init_domain_cpuid_policy() to be like
> init_{domain,vcpu}_msr_policy() by operating on the local pointer where
> possible.
> 
> No change in behaviour.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

I think it would be nice to mention the const related restriction, to
make clear we would want that to be working, but we can't find a
solution at the moment.

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

with a cosmetic issue taken care of:

> --- a/xen/arch/x86/cpuid.c
> +++ b/xen/arch/x86/cpuid.c
> @@ -703,16 +703,17 @@ void recalculate_cpuid_policy(struct domain *d)
>  
>  int init_domain_cpuid_policy(struct domain *d)
>  {
> -    d->arch.cpuid = xmalloc(struct cpuid_policy);
> +    struct cpuid_policy *p =
> +        xmemdup(is_pv_domain(d) ? & pv_max_cpuid_policy

Stray blank (same below in the MSR equivalent).

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