[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 2/2] x86/vpmu: Disable VPMU if guest's CPUID indicates no PMU support
>>> On 22.02.17 at 19:24, <boris.ostrovsky@xxxxxxxxxx> wrote: > When toolstack overrides Intel CPUID leaf 0xa's PMU version with an > invalid value VPMU should not be available to the guest. > > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> with one nit: > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -253,6 +253,20 @@ static int update_domain_cpuid_info(struct domain *d, > } > break; > > + case 0xa: > + if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ) > + break; > + > + /* If PMU version is zero then the guest doesn't have VPMU */ > + if ( p->basic.pmu_version == 0 ) > + { > + struct vcpu *v; > + > + for_each_vcpu( d, v ) If you use blanks immediately inside the parentheses, there should also be one immediately before the opening one. Can be corrected upon commit of course. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |