2012-11-24 03:49:31

by Yuhong Bao

[permalink] [raw]
Subject: RE: [tip:x86/smap] x86-32: Start out eflags and cr4 clean

> + * Specifically, cr4 exists if and only if CPUID exists,
> + * which in turn exists if and only if EFLAGS.ID exists.
This may be true for *Intel* 486 CPUs as VME was implemented at the same time as CPUID, but I am not sure that it is true for AMD 486 CPUs.

Yuhong Bao -


2012-11-24 05:06:28

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [tip:x86/smap] x86-32: Start out eflags and cr4 clean

On 11/23/2012 07:49 PM, Yuhong Bao wrote:
>> + * Specifically, cr4 exists if and only if CPUID exists,
>> + * which in turn exists if and only if EFLAGS.ID exists.
> This may be true for *Intel* 486 CPUs as VME was implemented at the same time as CPUID, but I am not sure that it is true for AMD 486 CPUs.
>
> Yuhong Bao

That is the architecture; if you know of a counterexample speak up. "I
am not sure" doesn't count.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.