Skip to content

Commit

Permalink
KVM: Avoid spurious execeptions after setting registers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jan-kiszka authored and avikivity committed May 4, 2008
1 parent ece15ba commit b4f14ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86.c
Expand Up @@ -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;
Expand Down

0 comments on commit b4f14ab

Please sign in to comment.