OSDN Git Service

nVMX: reset rflags register cache during nested vmentry.
authorGleb Natapov <gleb@redhat.com>
Sun, 28 Jul 2013 15:31:06 +0000 (18:31 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 29 Jul 2013 07:04:22 +0000 (09:04 +0200)
commit63fbf59f8a31548e64cdc3adc5d0997be0486b27
tree4f9325564fea52b19c798724f67497d5c64e8c6a
parentbf640876e21fe603f7f52b0c27d66b7716da0384
nVMX: reset rflags register cache during nested vmentry.

During nested vmentry into vm86 mode a vcpu state is found to be incorrect
because rflags does not have VM flag set since it is read from the cache
and has L1's value instead of L2's. If emulate_invalid_guest_state=1 L0
KVM tries to emulate it, but emulation does not work for nVMX and it
never should happen anyway. Fix that by using vmx_set_rflags() to set
rflags during nested vmentry which takes care of updating register cache.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c