summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorJan Kiszka2008-04-30 17:59:04 +0200
committerAvi Kivity2008-05-04 13:44:47 +0200
commitb4f14abd95cd8d42f08438f1c4ec3eafe41054ee (patch)
tree1a76ef8cd16ece3ee99c78d07795e5d779b9912b /arch/x86/kvm/x86.c
parentKVM: PIT: support mode 4 (diff)
downloadkernel-qcow2-linux-b4f14abd95cd8d42f08438f1c4ec3eafe41054ee.tar.gz
kernel-qcow2-linux-b4f14abd95cd8d42f08438f1c4ec3eafe41054ee.tar.xz
kernel-qcow2-linux-b4f14abd95cd8d42f08438f1c4ec3eafe41054ee.zip
KVM: Avoid spurious execeptions after setting registers
Clear pending exceptions when setting new register values. This avoids spurious exceptions after restoring a vcpu state or after reset-on-triple-fault. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 017daa2561f4..bc224bba1e87 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3022,6 +3022,8 @@ int kvm_arch_vcpu_ioctl_set_regs(struct kvm_vcpu *vcpu, struct kvm_regs *regs)
kvm_x86_ops->decache_regs(vcpu);
+ vcpu->arch.exception.pending = false;
+
vcpu_put(vcpu);
return 0;