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

Re: [Xen-devel] [PATCH 3/4] x86: don't use FPU instructions when there is no FPU



>>> On 14.10.15 at 16:30, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 14/10/15 14:31, Jan Beulich wrote:
>> --- a/xen/include/asm-x86/cpufeature.h
>> +++ b/xen/include/asm-x86/cpufeature.h
>> @@ -170,6 +170,7 @@
>>  #define CPUID5_ECX_EXTENSIONS_SUPPORTED 0x1
>>  #define CPUID5_ECX_INTERRUPT_BREAK      0x2
>>  
>> +#define cpu_has_fpu         boot_cpu_has(X86_FEATURE_FPU)
> 
> This distinguishes only between an onboard fpu or an original x87
> co-processor.  It does not represent the presence or absence of an fpu.

That's a very odd statement with off-chip FPUs having disappeared
with the Pentium. We don't care about x87 co-processors at all in Xen.

> Looking at the Xeon Phi documentation
> (http://download-software.intel.com/sites/default/files/forum/278102/327364001en.pdf),
> it has this feature bit set, although it does have MMX clear.
> 
> Interestingly however, a Phi's default MXCSR value ix 0x20000h and will
> #GP at any attempt to clear bit 21, which means fpu_init() will
> unconditionally blow up on such a system.

"... one of the many things ..."

> I am not aware of a bit which signifies the absence of FPU
> capabilities.  Until there is, I don't think changes along these lines
> are a safe way to go.

See above; I continue to think this is the right thing at this point.
Going forward we'll have to see whether co-processors re-appear.

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®.