>>> On 22.02.17 at 19:24, <boris.ostrov...@oracle.com> 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.ostrov...@oracle.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to