aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2008-04-30 11:59:04 -0400
committerAvi Kivity <avi@qumranet.com>2008-05-04 07:44:47 -0400
commitb4f14abd95cd8d42f08438f1c4ec3eafe41054ee (patch)
tree1a76ef8cd16ece3ee99c78d07795e5d779b9912b /arch/x86/kvm
parentece15babfa514e06118f62f4df2c757d6209f4f0 (diff)
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')
-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)
3022 3022
3023 kvm_x86_ops->decache_regs(vcpu); 3023 kvm_x86_ops->decache_regs(vcpu);
3024 3024
3025 vcpu->arch.exception.pending = false;
3026
3025 vcpu_put(vcpu); 3027 vcpu_put(vcpu);
3026 3028
3027 return 0; 3029 return 0;