kvm, vmx: Really fix lazy FPU on nested guest
kvm, vmx: Really fix lazy FPU on nested guest

Commit e504c9098ed6 (kvm, vmx: Fix lazy FPU on nested guest, 2013-11-13)
highlighted a real problem, but the fix was subtly wrong.

nested_read_cr0 is the CR0 as read by L2, but here we want to look at
the CR0 value reflecting L1's setup.  In other words, L2 might think
that TS=0 (so nested_read_cr0 has the bit clear); but if L1 is actually
running it with TS=1, we should inject the fault into L1.

The effective value of CR0 in L2 is contained in vmcs12->guest_cr0, use
it.

Fixes: e504c9098ed6acd9e1079c5e10e4910724ad429f
Reported-by: Kashyap Chamarty <005b99b234026d47e167244b248f0ff319fdaf16@redhat.com>
Reported-by: Stefan Bader <00beb3b1b08625be3b68f3989c75be8de7f2fd89@canonical.com>
Tested-by: Kashyap Chamarty <005b99b234026d47e167244b248f0ff319fdaf16@redhat.com>
Tested-by: Anthoine Bourgeois <5921cf026cc825e53f0f8c83747a9584de65f38b@bertin.fr>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org
Signed-off-by: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs