The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v3 0/8] KVM: x86: Fix emulated MOV DR{4,5} #GP bugs
@ 2026-06-12 23:01 Sean Christopherson
  2026-06-12 23:01 ` [PATCH v3 1/8] KVM: x86: Treat any non-zero return from set_dr() as a faulting condition Sean Christopherson
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Sean Christopherson @ 2026-06-12 23:01 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Carlos López, Maciej W . Rozycki

Carlos' fix for a bug where KVM fails to signal #GP on emulated MOV DR to
DR4 or DR5, plus a pile of follow-up fixes priority goofs (#UD versus #GP,
#GP vs #DB, and #GP versus #VMEXIT on SVM).  The rest are opportunistic
cleanups.

v3:
 - Fix a #UD vs #GP due to CPL>0 bug.
 - Prioritize DR7.GD=1 #DB over CPL>0 #GP on Intel.

v2: https://lore.kernel.org/all/20260603230718.1733483-1-seanjc@google.com

v1: https://lore.kernel.org/all/20260601133320.91479-2-clopez@suse.de

Carlos López (1):
  KVM: x86: Treat any non-zero return from set_dr() as a faulting
    condition

Sean Christopherson (7):
  KVM: x86: Prioritize DR7.GD #DB over #GP due to illegal DR6/7 value
  KVM: x86: Manually check DR4/5 write values to fix SVM intercept
    priority
  KVM: x86: Prioritize #UD on MOV DR over #GP due to non-zero CPL
  KVM: VMX: Prioritize DR7.GD=1 #DB over CPL>0 #GP on Intel
  KVM: x86: Use kvm_dr{6,7}_valid() to check DR{4,5,6,7} write values in
    emulator
  KVM: x86: WARN if MOV DR emulation hits a "too late" #GP
  KVM: x86: Read CR4.DE in emulator if and only if accessing DR4 or DR5

 arch/x86/kvm/emulate.c | 49 +++++++++++++++++++++++++++++++-----------
 arch/x86/kvm/vmx/vmx.c |  6 +++---
 2 files changed, 40 insertions(+), 15 deletions(-)


base-commit: c1f7303302927f9cbf4efedf70f0512cde168c65
-- 
2.54.0.1136.gdb2ca164c4-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-06-15 19:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 23:01 [PATCH v3 0/8] KVM: x86: Fix emulated MOV DR{4,5} #GP bugs Sean Christopherson
2026-06-12 23:01 ` [PATCH v3 1/8] KVM: x86: Treat any non-zero return from set_dr() as a faulting condition Sean Christopherson
2026-06-15 17:46   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 2/8] KVM: x86: Prioritize DR7.GD #DB over #GP due to illegal DR6/7 value Sean Christopherson
2026-06-15 17:51   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 3/8] KVM: x86: Manually check DR4/5 write values to fix SVM intercept priority Sean Christopherson
2026-06-15 18:04   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 4/8] KVM: x86: Prioritize #UD on MOV DR over #GP due to non-zero CPL Sean Christopherson
2026-06-15 18:07   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 5/8] KVM: VMX: Prioritize DR7.GD=1 #DB over CPL>0 #GP on Intel Sean Christopherson
2026-06-15 18:14   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 6/8] KVM: x86: Use kvm_dr{6,7}_valid() to check DR{4,5,6,7} write values in emulator Sean Christopherson
2026-06-15 17:24   ` Jim Mattson
2026-06-12 23:01 ` [PATCH v3 7/8] KVM: x86: WARN if MOV DR emulation hits a "too late" #GP Sean Christopherson
2026-06-15 18:30   ` Jim Mattson
2026-06-15 19:08     ` Sean Christopherson
2026-06-12 23:01 ` [PATCH v3 8/8] KVM: x86: Read CR4.DE in emulator if and only if accessing DR4 or DR5 Sean Christopherson
2026-06-15 17:40   ` Jim Mattson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox