[PATCH] kvm: x86: #DF only has an error code in protected mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.19.0.605.g01d371f741-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux