Commit 19e6e08
committed
KVM: nVMX: Always forward XSAVES/XRSTORS exits from L2 to L1
Unconditionally forward XSAVES/XRSTORS VM-Exits from L2 to L1, as KVM
doesn't utilize the XSS-bitmap (KVM relies on controlling the XSS value
in hardware to prevent unauthorized access to XSAVES state). KVM always
loads vmcs02 with vmcs12's bitmap, and so any exit _must_ be due to
vmcs12's XSS-bitmap.
Drop the comment about XSS never being non-zero in anticipation of
enabling CET_KERNEL and CET_USER support.
Opportunistically WARN if XSAVES is not enabled for L2, as the CPU is
supposed to generate #UD before checking the XSS-bitmap.
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Chao Gao <chao.gao@intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-25-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent b3744c5 commit 19e6e08
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6570 | 6570 | | |
6571 | 6571 | | |
6572 | 6572 | | |
6573 | | - | |
| 6573 | + | |
| 6574 | + | |
6574 | 6575 | | |
6575 | | - | |
6576 | | - | |
6577 | | - | |
6578 | | - | |
| 6576 | + | |
| 6577 | + | |
| 6578 | + | |
| 6579 | + | |
| 6580 | + | |
6579 | 6581 | | |
6580 | | - | |
| 6582 | + | |
| 6583 | + | |
6581 | 6584 | | |
6582 | 6585 | | |
6583 | 6586 | | |
| |||
0 commit comments