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

2018-02-16 Thread Andrew Cooper
On 16/02/18 16:00, Sergey Dyasli wrote: > On Fri, 2018-02-16 at 11:38 +, Andrew Cooper wrote: >> On 16/02/18 11:31, Sergey Dyasli wrote: >>> On Fri, 2018-02-16 at 04:06 -0700, Jan Beulich wrote: >>> On 16.02.18 at 11:33, wrote: > On Thu, 2018-02-15 at 06:33

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

2018-02-16 Thread Sergey Dyasli
On Fri, 2018-02-16 at 11:38 +, Andrew Cooper wrote: > On 16/02/18 11:31, Sergey Dyasli wrote: > > On Fri, 2018-02-16 at 04:06 -0700, Jan Beulich wrote: > > > > > > On 16.02.18 at 11:33, wrote: > > > > > > > > On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: > >

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

2018-02-16 Thread Andrew Cooper
On 16/02/18 11:31, Sergey Dyasli wrote: > On Fri, 2018-02-16 at 04:06 -0700, Jan Beulich wrote: > On 16.02.18 at 11:33, wrote: >>> On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: >>> On 08.02.18 at 11:23, wrote: > uint64_t

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

2018-02-16 Thread Jan Beulich
>>> On 16.02.18 at 12:31, wrote: > On Fri, 2018-02-16 at 04:06 -0700, Jan Beulich wrote: >> > > > On 16.02.18 at 11:33, wrote: >> > >> > On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: >> > > > > > On 08.02.18 at 11:23,

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

2018-02-16 Thread Sergey Dyasli
On Fri, 2018-02-16 at 04:06 -0700, Jan Beulich wrote: > > > > On 16.02.18 at 11:33, wrote: > > > > On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: > > > > > > On 08.02.18 at 11:23, wrote: > > > > > > > > uint64_t val; > > > > +

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

2018-02-16 Thread Jan Beulich
>>> On 16.02.18 at 11:33, wrote: > On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: >> > > > On 08.02.18 at 11:23, wrote: >> >uint64_t val; >> > + int rc; >> > >> > - if (rdmsr_safe(MSR_INTEL_PLATFORM_INFO, val) || >> > + if ((rc

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

2018-02-16 Thread Sergey Dyasli
On Thu, 2018-02-15 at 06:33 -0700, Jan Beulich wrote: > > > > On 08.02.18 at 11:23, wrote: > > > > --- a/xen/arch/x86/cpu/common.c > > +++ b/xen/arch/x86/cpu/common.c > > @@ -118,9 +118,18 @@ void (* __read_mostly ctxt_switch_masking)(const > > struct vcpu *next); > >

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

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

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

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

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

2018-02-08 Thread Andrew Cooper
On 08/02/18 10:23, Sergey Dyasli wrote: > Raw policy contains the actual values from H/W MSRs. Add PLATFORM_INFO > msr to the policy during probe_cpuid_faulting(). > > Host policy might have certain features disabled if Xen decides not > to use them. For now, make Host policy equal to Raw policy.

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

2018-02-08 Thread Sergey Dyasli
Raw policy contains the actual values from H/W MSRs. Add PLATFORM_INFO msr to the policy during probe_cpuid_faulting(). Host policy might have certain features disabled if Xen decides not to use them. For now, make Host policy equal to Raw policy. Signed-off-by: Sergey Dyasli