[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 08.02.18 at 11:23, <sergey.dyasli@xxxxxxxxxx> 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);
>  
>  bool __init probe_cpuid_faulting(void)
>  {
> +     struct msr_domain_policy *dp = &raw_msr_domain_policy;

Unless you foresee the variable to be needed for further things
here, could this be moved into the more narrow scope it's used in
please?

>       uint64_t val;
> +     int rc;
>  
> -     if (rdmsr_safe(MSR_INTEL_PLATFORM_INFO, val) ||
> +     if ((rc = rdmsr_safe(MSR_INTEL_PLATFORM_INFO, val)) == 0)
> +     {
> +             dp->plaform_info.available = true;
> +             if (val & MSR_PLATFORM_INFO_CPUID_FAULTING)
> +                     dp->plaform_info.cpuid_faulting = true;
> +     }
> +
> +     if (rc ||
>           !(val & MSR_PLATFORM_INFO_CPUID_FAULTING) ||
>           rdmsr_safe(MSR_INTEL_MISC_FEATURES_ENABLES,
>                      this_cpu(msr_misc_features)))

Below here we have

                setup_clear_cpu_cap(X86_FEATURE_CPUID_FAULTING);

Shouldn't this be reflected in the host policy?

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