[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 30/31] x86/domctl: Update PV domain cpumasks when setting cpuid policy
>>> On 16.12.15 at 22:24, <andrew.cooper3@xxxxxxxxxx> wrote: > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -77,6 +77,74 @@ static void update_domain_cpuid_info(struct domain *d, > d->arch.x86_model = (ctl->eax >> 4) & 0xf; > if ( d->arch.x86 >= 0x6 ) > d->arch.x86_model |= (ctl->eax >> 12) & 0xf0; > + > + if ( is_pv_domain(d) ) > + { > + uint64_t mask = cpumask_defaults._1cd; > + > + if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ) > + mask &= ((uint64_t)ctl->edx << 32) | ctl->ecx; > + else if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) > + mask &= ((uint64_t)ctl->ecx << 32) | ctl->edx; I'd prefer switch() to be used in cases like this, but anyway Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> notwithstanding possible mechanical adjustments to the patch due to changes to earlier ones. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |