Re: [PATCH v2 2/9] KVM: x86: Set guest DR6 by kvm_queue_exception_p() in instruction emulation
From: Sean Christopherson
Date: Mon May 11 2026 - 11:27:03 EST
On Mon, May 11, 2026, Sean Christopherson wrote:
> On Thu, Dec 18, 2025, Hou Wenlong wrote:
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index ab298bfa7d9f..f33ce947633e 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -8925,7 +8925,9 @@ static void inject_emulated_exception(struct kvm_vcpu *vcpu)
> > {
> > struct x86_exception *ex = &vcpu->arch.emulate_ctxt->exception;
> >
> > - if (ex->vector == PF_VECTOR)
> > + if (ex->vector == DB_VECTOR)
> > + kvm_queue_exception_e(vcpu, DB_VECTOR, ex->dr6);
>
> This should be kvm_queue_exception_p(). I also think pivoting on DB_VECTOR is
> the wrong approach.
Gah, never mind, didn't look at the next patch.