]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86: Document a virtualization gap for GIF on AMD CPUs
authorYosry Ahmed <yosry.ahmed@linux.dev>
Thu, 30 Oct 2025 22:37:57 +0000 (22:37 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 13 Nov 2025 21:15:15 +0000 (13:15 -0800)
commit9f4ce4878878cb9694c4284f7a483984d52d4d9a
tree980c61f2ca31fe4442724fd25432774f1594c2e8
parent4da3768e1820cf15cced390242d8789aed34f54d
KVM: x86: Document a virtualization gap for GIF on AMD CPUs

According to the APM Volume #2, Section 15.17, Table 15-10 (24593—Rev.
3.42—March 2024), When "GIF==0", an "Debug exception or trap, due to
breakpoint register match" should be "Ignored and discarded".

KVM lacks any handling of this. Even when vGIF is enabled and vGIF==0,
the CPU does not ignore #DBs and relies on the VMM to do so.

Handling this is possible, but the complexity is unjustified given the
rarity of using HW breakpoints when GIF==0 (e.g. near VMRUN). KVM would
need to intercept the #DB, temporarily disable the breakpoint,
singe-step over the instruction (probably reusing NMI singe-stepping),
and re-enable the breakpoint.

Instead, document this as an erratum.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://patch.msgid.link/20251030223757.2950309-1-yosry.ahmed@linux.dev
Signed-off-by: Sean Christopherson <seanjc@google.com>
Documentation/virt/kvm/x86/errata.rst