Message ID | 20181012170553.209685-1-jmattson@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | kvm: x86: #DF only has an error code in protected mode | expand |
On Fri, Oct 12, 2018 at 10:05:53AM -0700, Jim Mattson wrote: > Exceptions do not have error codes in real-address mode. > > Fixes: 3fd28fce76563 ("KVM: x86: make double/triple fault promotion generic to all exceptions") > Signed-off-by: Jim Mattson <jmattson@google.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ca717737347e..4ab569171ad1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -452,7 +452,7 @@ static void kvm_multiple_exception(struct kvm_vcpu *vcpu, */ vcpu->arch.exception.pending = true; vcpu->arch.exception.injected = false; - vcpu->arch.exception.has_error_code = true; + vcpu->arch.exception.has_error_code = is_protmode(vcpu); vcpu->arch.exception.nr = DF_VECTOR; vcpu->arch.exception.error_code = 0; } else
Exceptions do not have error codes in real-address mode. Fixes: 3fd28fce76563 ("KVM: x86: make double/triple fault promotion generic to all exceptions") Signed-off-by: Jim Mattson <jmattson@google.com> --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)