OSDN Git Service

KVM: X86: Set RTM for DB_VECTOR too for KVM_EXIT_DEBUG
authorPeter Xu <peterx@redhat.com>
Tue, 5 May 2020 20:49:58 +0000 (16:49 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 May 2020 10:13:41 +0000 (06:13 -0400)
RTM should always been set even with KVM_EXIT_DEBUG on #DB.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20200505205000.188252-2-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c

index bb5a527..2384a2d 100644 (file)
@@ -4683,7 +4683,7 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
                        kvm_queue_exception_p(vcpu, DB_VECTOR, dr6);
                        return 1;
                }
-               kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1;
+               kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1 | DR6_RTM;
                kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7);
                /* fall through */
        case BP_VECTOR: