Richard Henderson <r...@twiddle.net> writes: Yes, and "-cpu Haswell" will enable the BMI extensions. I have used git://repo.or.cz/qemu/rth.git x86-next checked out around 15 January for a while now. The host system is Debian GNU/Linux amd64 and the guest is FreeBSD 9.1 amd64.
I now updated x86-next in order to get support for adox/adcx. The current sources causes a problem inside FreeBSD's sshd. Debugging a bit reveals that it gets a SIGFPE at a 'div' instruction inside /lib/libcrypto.so.6's BN_div function. The instruction is correct in raising SIGFPE (or whatever the instruction-level counterpart is called), since the dividend / divisor is too large to fit a 64-bit quotient (or said differently: the high word in rdx is >= than the divisor [in r13]). I have not tracked down why execution leads to these invalid operands. I cannot therefore state with any certainty that this is a bug in the qemu variant used. -- Torbjörn