Does QEMU support RDRAND x86 instruction?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Does QEMU support RDRAND x86 instruction?

Post by Roman »

If no, does any other VM/emulator support it?
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
hometue
Member
Member
Posts: 100
Joined: Thu Dec 19, 2013 1:40 am
Location: Asia, Singapore

Re: Does QEMU support RDRAND x86 instruction?

Post 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.
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.
Icee
Member
Member
Posts: 100
Joined: Wed Jan 08, 2014 8:41 am
Location: Moscow, Russia

Re: Does QEMU support RDRAND x86 instruction?

Post 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.
User avatar
hometue
Member
Member
Posts: 100
Joined: Thu Dec 19, 2013 1:40 am
Location: Asia, Singapore

Re: Does QEMU support RDRAND x86 instruction?

Post 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...)
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.
Post Reply