Re: [PATCH v3 3/8] KVM: x86: Manually check DR4/5 write values to fix SVM intercept priority

From: Jim Mattson

Date: Mon Jun 15 2026 - 14:05:54 EST


On Fri, Jun 12, 2026 at 4:02 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Manually (pre)check the values being written to DR4/5, i.e. the DR6/DR7
> aliases, instead of relying on ->set_dr() => kvm_set_dr() to signal a #GP.
> SVM unfortunately prioritizes all exceptions over an instruction intercept,
> i.e. nSVM is relying on the emulator to perform *all* exception checks
> prior to attempting to execute the instruction.
>
> Fixes: 3b88e41a4134 ("KVM: SVM: Add intercept check for accessing dr registers")
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>