diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2014-11-02 11:54:42 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-07 15:44:02 +0100 |
commit | 3ffb24681cc46f869378a4de54615db8d4ef0daf (patch) | |
tree | ab8ecd59eec31dcd72da208886750743bab684cf /arch/x86/kvm/x86.c | |
parent | 5b38ab877e5bd6c6564f2f23f25e0c3d4768728a (diff) | |
download | op-kernel-dev-3ffb24681cc46f869378a4de54615db8d4ef0daf.zip op-kernel-dev-3ffb24681cc46f869378a4de54615db8d4ef0daf.tar.gz |
KVM: x86: No error-code on real-mode exceptions
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>
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 14c49cf..e885029 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -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; |