aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/workqueue.c
diff options
context:
space:
mode:
authorIsaku Yamahata <[email protected]>2025-01-29 09:59:01 +0000
committerPaolo Bonzini <[email protected]>2025-03-14 18:20:54 +0000
commit484612f1a7d7386cec8fc9a3fa9dd45dd39e8b6d (patch)
treee555d39c523e9391cf7055a21e96855a76503285 /rust/helpers/workqueue.c
parentKVM: TDX: Save and restore IA32_DEBUGCTL (diff)
downloadkernel-484612f1a7d7386cec8fc9a3fa9dd45dd39e8b6d.tar.gz
kernel-484612f1a7d7386cec8fc9a3fa9dd45dd39e8b6d.zip
KVM: x86: Add a switch_db_regs flag to handle TDX's auto-switched behavior
Add a flag KVM_DEBUGREG_AUTO_SWITCH to skip saving/restoring guest DRs. TDX-SEAM unconditionally saves/restores guest DRs on TD exit/enter, and resets DRs to architectural INIT state on TD exit. Use the new flag KVM_DEBUGREG_AUTO_SWITCH to indicate that KVM doesn't need to save/restore guest DRs. KVM still needs to restore host DRs after TD exit if there are active breakpoints in the host, which is covered by the existing code. MOV-DR exiting is always cleared for TDX guests, so the handler for DR access is never called, and KVM_DEBUGREG_WONT_EXIT is never set. Add a warning if both KVM_DEBUGREG_WONT_EXIT and KVM_DEBUGREG_AUTO_SWITCH are set. Opportunistically convert the KVM_DEBUGREG_* definitions to use BIT(). Reported-by: Xiaoyao Li <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Co-developed-by: Chao Gao <[email protected]> Signed-off-by: Chao Gao <[email protected]> Signed-off-by: Isaku Yamahata <[email protected]> [binbin: rework changelog] Signed-off-by: Binbin Wu <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions