Skip to content

RFC KVM: guest_memfd(), X86: Common base for SNP and TDX (was KVM: guest memory: Misc enhancement)

[email protected] kvm linux-coco lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 RFC Latest10 patches 14 repliesIn review

Changes in v4 from the cover letter

- The rebased to v11 KVM guest_memfd()
- Introduce KVM_X86_SNP_VM and KVM_x86_TDX_VM
- Newly include a patch to make KVM_MEM_ENC_OP uABI common for SNP and TDX
- include a patch to address IMPLICIT_ACCESS

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10KVM: x86: Add is_vm_type_supported callbackarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/include/uapi/asm/kvm.h +4 more+31 -10 replies
2/10KVM: x86/mmu: Guard against collision with KVM-defined PFERR_IMPLICIT_ACCESSarch/x86/kvm/mmu/mmu.c+11 -00 replies
3/10KVM: x86/mmu: Pass around full 64-bit error code for the KVM page faultarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/mmu_internal.h arch/x86/kvm/mmu/mmutrace.h +1 more+6 -70 replies
4/10KVM: x86: Introduce PFERR_GUEST_ENC_MASK to indicate fault is privatearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/mmu_internal.h+21 -33 replies
5/10KVM: Add new members to struct kvm_gfn_range to operate oninclude/linux/kvm_host.h virt/kvm/guest_mem.c virt/kvm/kvm_main.c+8 -00 replies
6/10KVM: x86: Export the kvm_zap_gfn_range() for the SNP usearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c+2 -20 replies
7/10KVM: x86: Add gmem hook for initializing private memoryarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c+14 -26 replies
8/10KVM: x86: Add gmem hook for invalidating private memoryarch/x86/include/asm/kvm-x86-ops.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/x86.c +2 more+53 -00 replies
9/10KVM: x86: Make struct sev_cmd common for KVM_MEM_ENC_OParch/x86/include/asm/kvm_host.h arch/x86/include/uapi/asm/kvm.h arch/x86/kvm/svm/sev.c +2 more+87 -345 replies
10/10KVM: X86: KVM_MEM_ENC_OP check if unused field (flags, error) is zeroarch/x86/kvm/x86.c+16 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [RFC PATCH v4 00/10] KVM: guest_memfd(), X86: Common base for SNP and TDX (was KVM: guest memory: Misc enhancement)

From: Isaku Yamahata <[email protected]>

Hello. I've updated KVM: guest memory: Misc enhancement patch series based on "[RFC PATCH v11 00/29] KVM: guest_memfd() and per-page attributes" [1]. I changed the subject to represent the patch series better.

The purpose is to get agreement on the common base patches both for SNP [2] and TDX [3]. (And hopefully for other technology to protect guest memory.) Then, SNP and TDX can make progress without stepping on each other.

The main change from the previous version is
- The rebased to v11 KVM guest_memfd()
- Introduce KVM_X86_SNP_VM and KVM_x86_TDX_VM
- Make KVM_MEM_ENC_OP uABI common for SNP and TDX

[1] https://lore.kernel.org/all/[email protected]/

[2] https://lore.kernel.org/lkml/[email protected]/
Add AMD Secure Nested Paging (SEV-SNP) Hypervisor Support

[3] https://lore.kernel.org/all/[email protected]/
KVM TDX basic feature support

Changes:
v4:
- The rebased to v11 KVM guest_memfd()
- Introduce KVM_X86_SNP_VM and KVM_x86_TDX_VM
- Newly include a patch to make KVM_MEM_ENC_OP uABI common for SNP and TDX
- include a patch to address IMPLICIT_ACCESS

v3:
https://lore.kernel.org/all/[email protected]/

v2:
https://lore.kernel.org/all/[email protected]/

v1:
https://lore.kernel.org/all/[email protected]/

Brijesh Singh (1):
KVM: x86: Export the kvm_zap_gfn_range() for the SNP use

Isaku Yamahata (6):
KVM: x86: Add is_vm_type_supported callback
KVM: x86/mmu: Pass around full 64-bit error code for the KVM page
fault
KVM: x86: Introduce PFERR_GUEST_ENC_MASK to indicate fault is private
KVM: Add new members to struct kvm_gfn_range to operate on
KVM: x86: Make struct sev_cmd common for KVM_MEM_ENC_OP
KVM: X86: KVM_MEM_ENC_OP check if unused field (flags, error) is zero

Michael Roth (2):
KVM: x86: Add gmem hook for initializing private memory
KVM: x86: Add gmem hook for invalidating private memory

Sean Christopherson (1):
KVM: x86/mmu: Guard against collision with KVM-defined
PFERR_IMPLICIT_ACCESS

 arch/x86/include/asm/kvm-x86-ops.h |  3 ++
 arch/x86/include/asm/kvm_host.h    | 10 ++++-
 arch/x86/include/uapi/asm/kvm.h    | 35 +++++++++++++++
 arch/x86/kvm/mmu.h                 |  2 -
 arch/x86/kvm/mmu/mmu.c             | 37 +++++++++++++---
 arch/x86/kvm/mmu/mmu_internal.h    | 18 ++++++--
 arch/x86/kvm/mmu/mmutrace.h        |  2 +-
 arch/x86/kvm/mmu/paging_tmpl.h     |  2 +-
 arch/x86/kvm/svm/sev.c             | 68 ++++++++++++++++--------------
 arch/x86/kvm/svm/svm.c             |  7 +++
 arch/x86/kvm/svm/svm.h             |  2 +-
 arch/x86/kvm/vmx/vmx.c             |  7 +++
 arch/x86/kvm/x86.c                 | 50 +++++++++++++++++++++-
 arch/x86/kvm/x86.h                 |  2 +
 include/linux/kvm_host.h           |  5 +++
 virt/kvm/guest_mem.c               | 44 +++++++++++++++++++
 virt/kvm/kvm_main.c                |  4 ++
 17 files changed, 249 insertions(+), 49 deletions(-)

base-commit: bfa3037d828050896ae52f6467b6ca2489ae6fb1
prerequisite-patch-id: 3bd3037b3803e2d84f0ef98bb6c678be44eddd08
prerequisite-patch-id: b474cbf4f0ea21cf945036271f5286017e0efc84
prerequisite-patch-id: bd96a89fafe51956a55fdfc08a3ea2a37a2e55e4
prerequisite-patch-id: f15d178f9000430e0089c546756ab1d8d29341a7
prerequisite-patch-id: 5b34829d7433fa81ed574d724ee476b9cc2e6a50
prerequisite-patch-id: bf75388851ee37a83b37bfa7cb0084f27301f6bc
prerequisite-patch-id: 9d77fb0e8ce8c8c21e22ff3f26bd168eb5446df0
prerequisite-patch-id: 7152514149d4b4525a0057e3460ff78861e162f5
prerequisite-patch-id: a1d688257a210564ebeb23b1eef4b9ad1f5d7be3
prerequisite-patch-id: 0b1e771c370a03e1588ed97ee77cb0493d9304f4
prerequisite-patch-id: 313219882d617e4d4cb226760d1f071f52b3f882
prerequisite-patch-id: a8ebe373e3913fd0e0a55c57f55690f432975ec0
prerequisite-patch-id: 8b06f2333214e355b145113e33c65ade85d7eac4
prerequisite-patch-id: e739dd58995d35b0f888d02a6bf4ea144476f264
prerequisite-patch-id: 0e93d19cb59f3a052a377a56ff0a4399046818aa
prerequisite-patch-id: 4e0839abbfb8885154e278b4b0071a760199ad46
prerequisite-patch-id: be193bb3393ad8a16ea376a530df20a145145259
prerequisite-patch-id: 301dbdf8448175ea609664c890a3694750ecf740
prerequisite-patch-id: ba8e6068bcef7865bb5523065e19edd49fbc02de
prerequisite-patch-id: 81b25d13169b3617c12992dce85613a2730b0e1b
prerequisite-patch-id: b4526dee5b5a95da0a13116ae0c73d4e69efa3c6
prerequisite-patch-id: 8c62bacc52a75d4a9038a3f597fe436c50e07de3
prerequisite-patch-id: 5618d2414a1ef641b4c247b5e28076f67a765b24
prerequisite-patch-id: 022b4620f6ff729eca842192259e986d126e7fa6
prerequisite-patch-id: 73ebc581a3ce9a51167785d273fe69406ccccaed
prerequisite-patch-id: 1225df90aeae430a74354bc5ad0ddf508d0707db
prerequisite-patch-id: 1e38df398ee370ad7e457f4890d6e4457e8a83fa
prerequisite-patch-id: b8812b613f5674351565ea28354e91a756efd56e
prerequisite-patch-id: e231eff2baba07c2de984dd6cf83ad1a31b792b8

Signature · 1 line
2.25.1