Skip to content

Commit

Permalink
KVM: x86: No error-code on real-mode exceptions
Browse files Browse the repository at this point in the history
Real-mode exceptions do not deliver error code. As can be seen in Intel SDM
volume 2, real-mode exceptions do not have parentheses, which indicate
error-code.  To avoid significant changes of the code, the error code is
"removed" during exception queueing.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
anadav authored and bonzini committed Nov 7, 2014
1 parent 5b38ab8 commit 3ffb246
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ static void kvm_multiple_exception(struct kvm_vcpu *vcpu,

if (!vcpu->arch.exception.pending) {
queue:
if (has_error && !is_protmode(vcpu))
has_error = false;
vcpu->arch.exception.pending = true;
vcpu->arch.exception.has_error_code = has_error;
vcpu->arch.exception.nr = nr;
Expand Down

0 comments on commit 3ffb246

Please sign in to comment.