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

Re: [Xen-devel] [PATCH v1] x86/msr: add Raw and Host domain policies



On Thu, 2018-02-08 at 11:21 +0000, Roger Pau Monné wrote:
> On Thu, Feb 08, 2018 at 10:23:21AM +0000, Sergey Dyasli wrote:
> > +static void __init calculate_host_policy(void)
> > +{
> > +    struct msr_domain_policy *dp = &host_msr_domain_policy;
> > +
> > +    *dp = raw_msr_domain_policy;
> 
> host_msr_domain_policy = raw_msr_domain_policy;
> 
> Should work AFAICT.

This is a template for the future. The code with *dp is much shorter
than with host_msr_domain_policy.

> 
> > diff --git a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h
> > index 928f1cc454..8401d376c3 100644
> > --- a/xen/include/asm-x86/msr.h
> > +++ b/xen/include/asm-x86/msr.h
> > @@ -220,6 +220,14 @@ struct msr_domain_policy
> >      } plaform_info;
> >  };
> >  
> > +/* RAW msr domain policy: contains the actual values from H/W MSRs */
> > +extern msr_domain_policy raw_msr_domain_policy;
> > +/*
> > + * HOST msr domain policy: features that Xen actually decided to use,
> > + * a subset of RAW policy.
> > + */
> > +extern msr_domain_policy host_msr_domain_policy;
> 
> Aren't you missing a 'struct' here? I don't see any typedef for struct
> msr_domain_policy.

I don't know how I missed this. You are right, 'struct' is mandatory.

-- 
Thanks,
Sergey
_______________________________________________
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®.