diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2008-04-30 17:59:04 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-05-04 14:44:47 +0300 |
commit | b4f14abd95cd8d42f08438f1c4ec3eafe41054ee (patch) | |
tree | 1a76ef8cd16ece3ee99c78d07795e5d779b9912b /arch/x86/kvm/x86.c | |
parent | ece15babfa514e06118f62f4df2c757d6209f4f0 (diff) | |
download | lwn-b4f14abd95cd8d42f08438f1c4ec3eafe41054ee.tar.gz lwn-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.c | 2 |
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; |