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

Re: [Xen-devel] [PATCH] xc_cpuid_x86.c: No need to mask NX twice



>>> On 08.09.14 at 16:43, <alfred.z.song@xxxxxxxxx> wrote:
> On Mon, Sep 8, 2014 at 4:48 PM, z <alfred.z.song@xxxxxxxxx> wrote:
>> On Mon, Sep 8, 2014 at 2:59 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>> Looking at the context above I also wonder whether tying RDTSCP
>>> to 64-bit guests is really correct in (at least) the Intel case.
>>>
>>
>> I am not so sure for now, but I will check it later as well:)
> 
> I just checked Intel SDM. It seems you are right. RDTSCP could be used for
> both 64-bit and 32-bit architectures.  Maybe the limit for 64-bit should be
> removed too.
> 
> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
> index 710fd61..e7b50b1 100644
> --- a/tools/libxc/xc_cpuid_x86.c
> +++ b/tools/libxc/xc_cpuid_x86.c
> @@ -193,7 +193,7 @@ static void intel_xc_cpuid_policy(
>          regs[3] &= (bitmaskof(X86_FEATURE_NX) |
>                      bitmaskof(X86_FEATURE_LM) |
>                      (is_pae ? bitmaskof(X86_FEATURE_SYSCALL) : 0) |
> -                    (is_pae ? bitmaskof(X86_FEATURE_RDTSCP) : 0));
> +                    (bitmaskof(X86_FEATURE_RDTSCP));
>          break;
>      }

That's what I though it should look like; the tying of various features
to "is_pae" with your most recent patch is a little strange anyway,
i.e. I'd hope that many of those could get cleaned up just like the
RDTSCP one.

In any even, please submit a format patch for the change above
and feel free to extend the cleanup.

Thanks again, Jan


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


 


Rackspace

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