nestedsvm: fix lazy fpu switching causing a triple fault
authorChristoph Egger <Christoph.Egger@amd.com>
Fri, 28 Oct 2011 16:23:51 +0000 (17:23 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Fri, 28 Oct 2011 16:23:51 +0000 (17:23 +0100)
commit7a409c302ddef68956bca506e8369586d781547c
treeb60740145fed67f38ca65d52b80235411592358e
parent273295145a0d8ed8256c847cded959e8a4bb3f79
nestedsvm: fix lazy fpu switching causing a triple fault

Fix FPU switching uncovered with Hyper-V: Do FPU switching always on
the n1 vmcb rather doing it on the current active vmcb.  The FPU state
between n1 and n2 vmcb is already synced in the vmrun and vmexit
emulation.

This fixes the situation where the n2 vmcb had the #NM intercept bit
set but the virtual vmcb did not.  That means it was believed the l1
guest can handle an #NM intercept but was actually wrong.

The result were three #GP's with error code 0x11 in the l1 guest.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/svm/svm.c