[vbox-dev] Lazy FPU Save and Restore in Virtualbox

Vivek Thakkar vivekt.vivek at gmail.com
Mon Sep 4 13:38:31 GMT 2017


Hi,

Can someone help me with my understanding of Lazy FPU Save and restore in
Virtualbox?
I am reading the source in VBox/VMM/VMMRC/CPUMRCA.asm, function
cpumHandleLazyFPUAsm(). It creates a jump table based on X86 CR0 bits EM,
MP and TS.

a) Based on the bits, there are cases where execution of FPU instruction
should generate #NM in guest (e.g. TS=1, EM=0, MP=0). But the code doesn't
seem to generate a trap in Guest in this case. I am not able to understand
why it does that.

b) Secondly, in 2 cases (or in case where FPU is already used by the guest)
where it wants to generate a trap in guest,  it goes to the host to
generate the guest trap. Why can't it forward the #NM trap directly from RC?

Regards,
-Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20170904/de6341bb/attachment.html>


More information about the vbox-dev mailing list