linux/arch/x86/include/uapi/asm
Guang Zeng be50b2065d kvm: x86: Add support for getting/setting expanded xstate buffer
With KVM_CAP_XSAVE, userspace uses a hardcoded 4KB buffer to get/set
xstate data from/to KVM. This doesn't work when dynamic xfeatures
(e.g. AMX) are exposed to the guest as they require a larger buffer
size.

Introduce a new capability (KVM_CAP_XSAVE2). Userspace VMM gets the
required xstate buffer size via KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2).
KVM_SET_XSAVE is extended to work with both legacy and new capabilities
by doing properly-sized memdup_user() based on the guest fpu container.
KVM_GET_XSAVE is kept for backward-compatible reason. Instead,
KVM_GET_XSAVE2 is introduced under KVM_CAP_XSAVE2 as the preferred
interface for getting xstate buffer (4KB or larger size) from KVM
(Link: https://lkml.org/lkml/2021/12/15/510)

Also, update the api doc with the new KVM_GET_XSAVE2 ioctl.

Signed-off-by: Guang Zeng <guang.zeng@intel.com>
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Signed-off-by: Jing Liu <jing2.liu@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20220105123532.12586-19-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-01-14 13:44:41 -05:00
..
a.out.h
auxvec.h x86/elf: Support a new ELF aux vector AT_MINSIGSTKSZ 2021-05-19 12:18:45 +02:00
bitsperlong.h
boot.h
bootparam.h x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
byteorder.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
debugreg.h x86/traps: Handle #DB for bus lock 2021-03-28 22:52:15 +02:00
e820.h
hw_breakpoint.h
hwcap2.h x86/elf: Use _BITUL() macro in UAPI headers 2021-05-21 11:12:52 +02:00
ist.h
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
kvm_para.h KVM: x86: Make sure KVM_CPUID_FEATURES really are KVM_CPUID_FEATURES 2021-11-11 10:56:21 -05:00
kvm_perf.h
kvm.h kvm: x86: Add support for getting/setting expanded xstate buffer 2022-01-14 13:44:41 -05:00
ldt.h
mce.h x86/mce: Drop bogus comment about mce.kflags 2020-04-17 11:12:21 +02:00
mman.h
msgbuf.h x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
msr.h
mtrr.h
perf_regs.h perf/x86: Disable extended registers for non-supported PMUs 2019-06-24 19:19:23 +02:00
posix_types_32.h
posix_types_64.h
posix_types_x32.h
posix_types.h
prctl.h x86/fpu: Extend fpu_xstate_prctl() with guest permissions 2022-01-07 13:33:03 -05:00
processor-flags.h
ptrace-abi.h
ptrace.h
sembuf.h arch: sembuf.h: make uapi asm/sembuf.h self-contained 2019-12-04 19:44:14 -08:00
setup.h
sgx.h x86/sgx/virt: implement SGX_IOC_VEPC_REMOVE ioctl 2021-10-22 08:32:12 -07:00
shmbuf.h x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
sigcontext32.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
sigcontext.h x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
siginfo.h
signal.h arch: move SA_* definitions to generic headers 2020-11-23 10:31:05 -06:00
stat.h
statfs.h
svm.h KVM: SVM: Software reserved fields 2021-06-17 13:09:37 -04:00
swab.h
ucontext.h
unistd.h x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long" 2020-05-26 16:42:43 +02:00
vm86.h x86/vm86/32: Remove VM86_SCREEN_BITMAP support 2021-01-21 20:08:53 +01:00
vmx.h KVM: VMX: Add basic handling of VM-Exit from SGX enclave 2021-04-20 04:18:54 -04:00
vsyscall.h