Re: [PATCH v3 2/8] KVM: x86: Prioritize DR7.GD #DB over #GP due to illegal DR6/7 value
From: Jim Mattson
Date: Mon Jun 15 2026 - 13:51:38 EST
On Fri, Jun 12, 2026 at 4:01 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> When emulating a MOV DR, specifically a write to DR6 or DR7, treat a #DB
> due to DR7.GD (General Detect) as higher priority than a #GP due to an
> illegal value. While neither Intel's SDM nor AMD's APM says anything
> about the relative priority, empirical testing on Intel and AMD shows that
> the #DB has higher priority. And for VMX, where the instruction intercept
> has priority over *all* exceptions, KVM already treats the #DB as having
> higher priority.
>
> Cc: Maciej W. Rozycki <macro@xxxxxxxxxxx>
> Fixes: 3b88e41a4134 ("KVM: SVM: Add intercept check for accessing dr registers")
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>