NetBSD-Bugs archive

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

Re: kern/50332: AVX instructions don't work but OSXSAVE flag is set



On Tue, Oct 13, 2015 at 09:09:44AM +0200, Torbj?rn Granlund wrote:
>   
>    If this is a bug in NetBSD, it's also a bug on this Linux:
>    
>    Linux eternium 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) x86_64 GNU/Linux
>    
>    on a:
>    
>    model name	: Intel(R) Core(TM)2 Duo CPU     E8600  @ 3.33GHz
>    
>    CPU.
>    
> This CPU does not support AVX.
> 
>    Nothing I see says that OSXSAVE implies that AVX instructions are
>    implemented and working.  According to:
>    
>    https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled/
>    
>    the AVX flag (bit 28) also needs to be asserted.
>    
> The test case demos a real bug, please don't dismiss it because a CPU
> without AVX cannot execute AVX instructions.
> 
> In practice, one of course also tests for AVX.  I modified the testcase
> to do that in order to clarify things.  Attached.

No, there is no reason why you can't have a cpu (and os) that supports xsave
(etc) but doesn't support avx.
You have to look at the bitmap of supported extensions.
IIRC Only the x87 fpu registers are mandatory.

However that probably isn't the issue here.
More likely is that something in xen should stop avx being used,
or xen needs to do something different from bare-metal to support avx.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index