mirror-linux/Documentation
Yang Weijiang 9d6812d415 KVM: x86: Enable guest SSP read/write interface with new uAPIs
Add a KVM-defined ONE_REG register, KVM_REG_GUEST_SSP, to let userspace
save and restore the guest's Shadow Stack Pointer (SSP).  On both Intel
and AMD, SSP is a hardware register that can only be accessed by software
via dedicated ISA (e.g. RDSSP) or via VMCS/VMCB fields (used by hardware
to context switch SSP at entry/exit).  As a result, SSP doesn't fit in
any of KVM's existing interfaces for saving/restoring state.

Internally, treat SSP as a fake/synthetic MSR, as the semantics of writes
to SSP follow that of several other Shadow Stack MSRs, e.g. the PLx_SSP
MSRs.  Use a translation layer to hide the KVM-internal MSR index so that
the arbitrary index doesn't become ABI, e.g. so that KVM can rework its
implementation as needed, so long as the ONE_REG ABI is maintained.

Explicitly reject accesses to SSP if the vCPU doesn't have Shadow Stack
support to avoid running afoul of ignore_msrs, which unfortunately applies
to host-initiated accesses (which is a discussion for another day).  I.e.
ensure consistent behavior for KVM-defined registers irrespective of
ignore_msrs.

Link: https://lore.kernel.org/all/aca9d389-f11e-4811-90cf-d98e345a5cc2@intel.com
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
Tested-by: Mathias Krause <minipli@grsecurity.net>
Tested-by: John Allen <john.allen@amd.com>
Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-14-seanjc@google.com
Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
2025-09-23 09:10:33 -07:00
..
ABI blk-wbt: doc: Update the doc of the wbt_lat_usec interface 2025-08-11 10:21:38 -06:00
PCI selftests: pci_endpoint: Add doorbell test case 2025-07-24 16:51:47 -05:00
RCU rcu: Document concurrent quiescent state reporting for offline CPUs 2025-07-22 17:10:50 +05:30
accel
accounting delaytop: enhance error logging and add PSI feature description 2025-08-02 12:01:41 -07:00
admin-guide - Remove a transitional asm/cpuid.h header which was added only as 2025-08-17 06:53:15 -07:00
arch It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
block
bpf
cdrom cdrom: Call cdrom_mrw_exit from cdrom_release function 2025-07-22 19:10:17 -06:00
core-api Significant patch series in this pull request: 2025-08-05 16:02:07 +03:00
cpu-freq
crypto
dev-tools Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
devicetree Including fixes from Netfilter and IPsec. 2025-08-14 07:14:30 -07:00
doc-guide
driver-api cxl for v6.17 2025-08-01 15:47:06 -07:00
edac
fault-injection docs: fault-injection: drop reference to md-faulty 2025-07-24 08:31:46 -06:00
fb
features
filesystems f2fs-for-6.17-rc1 2025-08-04 16:27:21 -07:00
firmware-guide Merge branch 'acpi-misc' 2025-07-22 17:12:57 +02:00
firmware_class
fpga
gpu drm for 6.17-rc1 2025-07-30 19:26:49 -07:00
hid
hwmon hwmon updates for v6.17 2025-07-31 13:34:06 -07:00
i2c
iio
images
infiniband
input Input: Add and document BTN_GRIP* 2025-07-27 01:41:20 -07:00
isdn
kbuild docs: kconfig: add alldefconfig to the all*configs 2025-07-26 15:31:29 +09:00
kernel-hacking
leds
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices
mm Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
netlabel
netlink netlink: specs: ethtool: fix module EEPROM input/output arguments 2025-07-31 10:57:02 -07:00
networking docs: Fix name for net.ipv4.udp_child_hash_entries 2025-08-12 13:03:13 +02:00
nvdimm
nvme
pcmcia
peci
power Merge branches 'pm-runtime' and 'pm-powercap' 2025-07-22 18:01:15 +02:00
process It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
rust
scheduler sched_ext: Changes for v6.17 2025-07-31 16:29:46 -07:00
scsi
security hardening updates for v6.17-rc1 2025-07-28 17:16:12 -07:00
sound
sphinx sphinx: kernel_abi: fix performance regression with O=<dir> 2025-07-24 08:36:17 -06:00
sphinx-static
spi
staging
sunrpc/xdr
target
tee
timers
tools tracing tools changes for 6.17: 2025-08-01 10:23:13 -07:00
trace tracing changes for 6.17 2025-08-01 10:29:36 -07:00
translations Summary of significant series in this pull request: 2025-07-31 14:57:54 -07:00
usb It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
userspace-api Input updates for v6.17-rc0 2025-08-07 07:40:01 +03:00
virt KVM: x86: Enable guest SSP read/write interface with new uAPIs 2025-09-23 09:10:33 -07:00
w1
watchdog
wmi
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py
docutils.conf
index.rst
memory-barriers.txt
subsystem-apis.rst