[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 05/25] x86/cpuid: Recalculate a domains CPUID policy when appropriate



>>> On 09.01.17 at 12:03, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domctl.c
> +++ b/xen/arch/x86/domctl.c
> @@ -51,6 +51,30 @@ static int gdbsx_guest_mem_io(domid_t domid, struct 
> xen_domctl_gdbsx_memio *iop)
>  static void update_domain_cpuid_info(struct domain *d,
>                                       const xen_domctl_cpuid_t *ctl)
>  {
> +    struct cpuid_policy *p = d->arch.cpuid;
> +    const struct cpuid_leaf leaf = { ctl->eax, ctl->ebx, ctl->ecx, ctl->edx 
> };
> +
> +    /* Insert ctl data into cpuid_policy. */
> +    if ( ctl->input[0] < ARRAY_SIZE(p->basic.raw) )
> +    {
> +        if ( ctl->input[0] == 7 )
> +        {
> +            if ( ctl->input[1] < ARRAY_SIZE(p->feat.raw) )
> +                p->feat.raw[ctl->input[1]] = leaf;
> +        }
> +        else if ( ctl->input[0] == 0xd )

XSTATE_CPUID again?

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.