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

   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
This CPU does not support AVX.

   Nothing I see says that OSXSAVE implies that AVX instructions are
   implemented and working.  According to:
   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.

This does not fail on Linux, FreeBSD, OpenBSD, etc.  It does fail on
NetBSD.  Let me be clear: To see this AVX error, one needs a computer
with AVX hardware.

I've reproduced this on an Intel haswell system, an AMD bulldozer
system, and an AMD piledriver system.  All these systems run some
version of NetBSD 7.0 as Dom0, either a prerelease or the release.

I've also reproduced it under NetBSD 6.1.x and NetBSD 7.0 in a DomU.  On
the same machines, Linux and FreeBSD DomUs run the testcase fine.

Attachment: osxsave.c
Description: Binary data


Please encrypt, key id 0xC8601622

Home | Main Index | Thread Index | Old Index