Skip to content

AMX support for KVM

Paolo Bonzini kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v6 Latest21 patches 13 repliesIn review

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21x86/fpu: Extend fpu_xstate_prctl() with guest permissionsarch/x86/include/asm/fpu/api.h arch/x86/include/asm/fpu/types.h arch/x86/include/uapi/asm/prctl.h +4 more+80 -280 replies
2/21x86/fpu: Prepare guest FPU for dynamically enabled FPU featuresarch/x86/include/asm/fpu/types.h arch/x86/kernel/fpu/core.c+38 -10 replies
3/21kvm: x86: Fix xstate_required_size() to follow XSTATE alignment rulearch/x86/kvm/cpuid.c+5 -10 replies
4/21kvm: x86: Exclude unpermitted xfeatures at KVM_GET_SUPPORTED_CPUIDDocumentation/virt/kvm/api.rst arch/x86/kvm/cpuid.c+10 -32 replies
5/21x86/fpu: Make XFD initialization in __fpstate_reset() a function argumentarch/x86/kernel/fpu/core.c+6 -58 replies
6/21x86/fpu: Add guest support to xfd_enable_feature()arch/x86/kernel/fpu/xstate.c arch/x86/kernel/fpu/xstate.h+60 -390 replies
7/21x86/fpu: Provide fpu_enable_guest_xfd_features() for KVMarch/x86/include/asm/fpu/api.h arch/x86/kernel/fpu/core.c+23 -01 reply
8/21kvm: x86: Enable dynamic xfeatures at KVM_SET_CPUID2arch/x86/kvm/cpuid.c+29 -130 replies
9/21x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulationarch/x86/include/asm/fpu/api.h arch/x86/kernel/fpu/core.c+18 -00 replies
10/21kvm: x86: Add emulation for IA32_XFDarch/x86/kvm/x86.c+27 -00 replies
11/21x86/fpu: Prepare xfd_err in struct fpu_guestarch/x86/include/asm/fpu/types.h+5 -00 replies
12/21kvm: x86: Intercept #NM for saving IA32_XFD_ERRarch/x86/kvm/vmx/vmcs.h arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+59 -00 replies
13/21kvm: x86: Emulate IA32_XFD_ERR for guestarch/x86/kvm/x86.c+20 -10 replies
14/21kvm: x86: Disable RDMSR interception of IA32_XFD_ERRarch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+7 -10 replies
15/21kvm: x86: Add XCR0 support for Intel AMXarch/x86/kvm/x86.c+6 -10 replies
16/21kvm: x86: Add CPUID support for Intel AMXarch/x86/include/asm/cpufeatures.h arch/x86/kvm/cpuid.c+27 -20 replies
17/21x86/fpu: Add uabi_size to guest_fpuarch/x86/include/asm/fpu/types.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/xstate.c+7 -00 replies
18/21kvm: x86: Add support for getting/setting expanded xstate bufferDocumentation/virt/kvm/api.rst arch/x86/include/uapi/asm/kvm.h arch/x86/kvm/cpuid.c +3 more+106 -50 replies
19/21kvm: selftests: Add support for KVM_CAP_XSAVE2tools/arch/x86/include/uapi/asm/kvm.h tools/include/uapi/linux/kvm.h tools/testing/selftests/kvm/include/kvm_util_base.h +7 more+130 -82 replies
20/21x86/fpu: Provide fpu_sync_guest_vmexit_xfd_state()arch/x86/include/asm/fpu/api.h arch/x86/kernel/fpu/core.c+26 -00 replies
21/21kvm: x86: Disable interception for IA32_XFD on demandarch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h +1 more+29 -60 replies

Reviews trailers per patch

1 of 21 patches has a Reviewed-by or Acked-by.

PatchPaolo Bonzini
1/21
2/21
3/21
4/21
5/21
6/21
7/21R-b
8/21
9/21
10/21
11/21
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 00/21] AMX support for KVM

These are the final patches that I am committing. They are the same as v5 except for some cosmetic changes in patch 7 that remove the need for the IS_ENABLED(CONFIG_X86_64) check, and a rebase on top of kvm/next.

Paolo

Guang Zeng (1):
kvm: x86: Add support for getting/setting expanded xstate buffer

Jing Liu (11):
kvm: x86: Fix xstate_required_size() to follow XSTATE alignment rule
kvm: x86: Exclude unpermitted xfeatures at KVM_GET_SUPPORTED_CPUID x86/fpu: Make XFD initialization in __fpstate_reset() a function
argument
kvm: x86: Enable dynamic xfeatures at KVM_SET_CPUID2
kvm: x86: Add emulation for IA32_XFD
x86/fpu: Prepare xfd_err in struct fpu_guest
kvm: x86: Intercept #NM for saving IA32_XFD_ERR
kvm: x86: Emulate IA32_XFD_ERR for guest
kvm: x86: Disable RDMSR interception of IA32_XFD_ERR
kvm: x86: Add XCR0 support for Intel AMX
kvm: x86: Add CPUID support for Intel AMX

Kevin Tian (2):
x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulation
kvm: x86: Disable interception for IA32_XFD on demand

Sean Christopherson (1):
x86/fpu: Provide fpu_enable_guest_xfd_features() for KVM

Thomas Gleixner (5):
x86/fpu: Extend fpu_xstate_prctl() with guest permissions x86/fpu: Prepare guest FPU for dynamically enabled FPU features x86/fpu: Add guest support to xfd_enable_feature() x86/fpu: Add uabi_size to guest_fpu
x86/fpu: Provide fpu_sync_guest_vmexit_xfd_state()

Wei Wang (1):
kvm: selftests: Add support for KVM_CAP_XSAVE2

 Documentation/virt/kvm/api.rst                |  46 +++++-
 arch/x86/include/asm/cpufeatures.h            |   2 +
 arch/x86/include/asm/fpu/api.h                |  11 ++
 arch/x86/include/asm/fpu/types.h              |  32 ++++
 arch/x86/include/asm/kvm_host.h               |   1 +
 arch/x86/include/uapi/asm/kvm.h               |  16 +-
 arch/x86/include/uapi/asm/prctl.h             |  26 ++--
 arch/x86/kernel/fpu/core.c                    |  99 +++++++++++-
 arch/x86/kernel/fpu/xstate.c                  | 147 +++++++++++-------
 arch/x86/kernel/fpu/xstate.h                  |  19 ++-
 arch/x86/kernel/process.c                     |   2 +
 arch/x86/kvm/cpuid.c                          |  86 +++++++---
 arch/x86/kvm/cpuid.h                          |   2 +
 arch/x86/kvm/vmx/vmcs.h                       |   5 +
 arch/x86/kvm/vmx/vmx.c                        |  68 ++++++++
 arch/x86/kvm/vmx/vmx.h                        |   2 +-
 arch/x86/kvm/x86.c                            | 112 ++++++++++++-
 include/uapi/linux/kvm.h                      |   4 +
 tools/arch/x86/include/uapi/asm/kvm.h         |  16 +-
 tools/include/uapi/linux/kvm.h                |   3 +
 .../selftests/kvm/include/kvm_util_base.h     |   2 +
 .../selftests/kvm/include/x86_64/processor.h  |  10 ++
 tools/testing/selftests/kvm/lib/kvm_util.c    |  32 ++++
 .../selftests/kvm/lib/x86_64/processor.c      |  67 +++++++-
 .../testing/selftests/kvm/x86_64/evmcs_test.c |   2 +-
 tools/testing/selftests/kvm/x86_64/smm_test.c |   2 +-
 .../testing/selftests/kvm/x86_64/state_test.c |   2 +-
 .../kvm/x86_64/vmx_preemption_timer_test.c    |   2 +-
 28 files changed, 711 insertions(+), 107 deletions(-)
Signature · 1 line
2.31.1