Files
linux/arch/x86/kvm
Paolo Bonzini 92cb6f3c55 kvm, vmx: Really fix lazy FPU on nested guest
commit 1b385cbdd7 upstream.

Commit e504c9098e (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: e504c9098e
Reported-by: Kashyap Chamarty <kchamart@redhat.com>
Reported-by: Stefan Bader <stefan.bader@canonical.com>
Tested-by: Kashyap Chamarty <kchamart@redhat.com>
Tested-by: Anthoine Bourgeois <bourgeois@bertin.fr>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 22:06:18 -08:00
..
2013-11-07 12:27:46 +02:00
2013-10-30 18:54:39 +01:00
2014-02-06 11:33:51 -08:00
2013-10-30 19:02:03 +01:00
2014-02-06 11:33:51 -08:00
2013-10-30 19:02:03 +01:00
2013-06-27 14:20:51 +03:00
2014-02-06 11:33:51 -08:00