Page 1 of 1

Does QEMU support RDRAND x86 instruction?

Posted: Fri Jul 18, 2014 3:46 am
by Roman
If no, does any other VM/emulator support it?

Re: Does QEMU support RDRAND x86 instruction?

Posted: Fri Jul 18, 2014 5:04 am
by hometue
Learn to Google

But assuming you don't understand what the searches mean, it does. Check the VirtIO RNG device for more about this.

Re: Does QEMU support RDRAND x86 instruction?

Posted: Fri Jul 18, 2014 5:20 am
by Icee
hometue wrote:Learn to Google
Actually, it seems you haven't read the link you are suggesting. This is about providing entropy to the virtio device. There is only talk in the TODO section about forwarding the RDRAND instruction to the guest.

The truth is that by looking at the sources of qemu-2.1.0-rc2, specifically the target-i386/translate.c file, it is easy to see that the RDRAND instruction is not even supported in the decoder (line 5199, case 0x1c7). Of the ModR/M group 9, QEMU only supports CMPXCHG8/16B.

So the answer for QEMU is no.

Re: Does QEMU support RDRAND x86 instruction?

Posted: Fri Jul 18, 2014 6:13 am
by hometue
Whoops, I thought it meant that it was done just saying what could be improved. Guess I need to learn to google to :P . In that case try bochs, it was implemented in 2.6.1 (I hope I got it right this time...)