summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorGleb Natapov2010-03-21 12:08:20 +0100
committerAvi Kivity2010-05-17 11:16:35 +0200
commit482ac18ae293a3a0b1e1eea95c10dcc9ceeb4708 (patch)
tree73e6dde8b669cef33edfd9de2074763b44bb6a1f /arch/x86/kvm/emulate.c
parentKVM: x86: Fix 32-bit build breakage due to typo (diff)
downloadkernel-qcow2-linux-482ac18ae293a3a0b1e1eea95c10dcc9ceeb4708.tar.gz
kernel-qcow2-linux-482ac18ae293a3a0b1e1eea95c10dcc9ceeb4708.tar.xz
kernel-qcow2-linux-482ac18ae293a3a0b1e1eea95c10dcc9ceeb4708.zip
KVM: x86 emulator: commit rflags as part of registers commit
Make sure that rflags is committed only after successful instruction emulation. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index ab3fff5bf7c4..48de4b890055 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2972,6 +2972,7 @@ writeback:
/* Commit shadow register state. */
memcpy(ctxt->vcpu->arch.regs, c->regs, sizeof c->regs);
kvm_rip_write(ctxt->vcpu, c->eip);
+ ops->set_rflags(ctxt->vcpu, ctxt->eflags);
done:
return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0;