Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [RFC PATCH v1 00/42] VBS/VSM-on-KVM: VBS integration for KVM VM planes
@ 2026-08-05 11:02 Sriram Nambakam
  2026-08-05 11:02 ` [RFC PATCH v1 01/42] Fix merge issue - Remove duplicate definition for kvm_arch_has_irq_bypass Sriram Nambakam
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: Sriram Nambakam @ 2026-08-05 11:02 UTC (permalink / raw)
  To: kvm; +Cc: linux-kernel

This RFC demonstrates how KVM VM Planes can be used to implement
Virtualization-Based Security (VBS) using Virtual Trust Levels (VTLs).
It provides a concrete implementation for discussion and is intended to
solicit feedback on the architecture, kernel interfaces, and division of
responsibility between KVM, the normal guest kernel, and a secure kernel.

The complete implementation is available in three repositories under the
safe-tee organization:

  Linux and KVM support:
  https://github.com/safe-tee/linux/tree/kvm-planes-v7.2-rc5

  QEMU support:
  https://github.com/safe-tee/qemu/tree/qemu-planes-v11.1.0-rc1

  Build, test, and integration tooling:
  https://github.com/safe-tee/lvbs

Current build and run instructions are maintained in the lvbs repository:

  Build the Plane 0 kernel, Plane 1 secure kernel, VM image, and run QEMU:
  https://github.com/safe-tee/lvbs/blob/main/docs/how-to/how-to-build.md

The VBS core is implemented under security/vbs and exposes a
transport-independent interface through include/linux/vbs.h.  The normal
guest kernel runs in Plane 0 (VTL0) and requests security services from a
higher-trust kernel running in Plane 1 (VTL1).  For KVM VM Planes, these
requests are transported through a shared calling page and a KVM
hypercall-mediated plane switch.

The RFC demonstrates loading and starting the secure kernel, communication
between VTL0 and VTL1, and hypervisor-enforced kernel integrity (HEKI).
The secure plane can protect VTL0 memory independently of VTL0, seal kernel
text and read-only data, participate in module validation and permission
changes, and validate kexec images.

This mail series contains only the 42 VBS and integration patches authored
by me.  It does not duplicate the prerequisite VM Planes patches from Joerg
Roedel and Paolo Bonzini.  The Linux branch linked above contains the full
integrated tree, including their patches and related KVM work from Melody
Wang and Tom Lendacky, used for development and testing.

This is prototype code and is not yet intended for production use.  In
particular, the KVM backend currently routes VTL calls through CPU 0 and
the VM Planes configuration requires a split in-kernel IRQ chip.
Feedback on the overall model, the VBS interface, and how this work should
be split for upstream review would be appreciated.

Acknowledgments
===============

This work stands on top of, and is indebted to, several prior efforts:

  - Joerg Roedel, whose KVM VM Planes tree provides the in-kernel plane
    infrastructure that the VBS/VSM secure plane relies on.

  - Paolo Bonzini, whose "[RFC PATCH 00/29] KVM: VM planes" introduced the
    VM plane concept to KVM as a common in-kernel model for AMD VMPLs,
    Intel TDX partitions, Hyper-V VTLs, and Arm CCA planes.  Joerg Roedel's
    work carries that model forward.
    https://lwn.net/Articles/1016113/

  - The prior Linux VBS (LVBS) and Hypervisor-Enforced Kernel Integrity
    (HEKI) work by James Morris, Thara Gopinath, Wei Liu,
    Madhavan Venkataraman, and Mickaël Salaün, posted as
    "[RFC PATCH v2 00/19] Hypervisor-Enforced Kernel Integrity (HEKI)".
    The kernel-sealing model used here follows their design.

  - James Bottomley and James Morris, for their ongoing work on VSM-on-KVM,
    which informed the design and direction of this series.

Sriram Nambakam (42):
  Fix merge issue - Remove duplicate definition for
    kvm_arch_has_irq_bypass
  Fix compilation
  Fix compile error
  Fix compile errors
  Initial support for VM Planes - Add kernel config for CONFIG_VM_PLANES
    - Parse vm plane config from initrd for plane configuration - Make
    hypercalls to allocate memory for the vm planes.
  Use vcpu count from the plane configuration
  skip processing plane configuration for plane 0 - plane 0 is the boot
    plane
  Add plane config param to specify kernel image format
  Activate the VM Planes through the Hypervisor - Using KVM as the VMM
  allow the command line to be specified for kernels in other planes
  Various changes to support VM Planes.
  Add a Virtualization Based Security (VBS) framework. - Add backends
    for AMD SEV-SNP, Intel TDX, Arm CCA and KVM Planes. - Support VTL on
    Hyper-V in addition to Planes on KVM.
  Add a inter-plane communication mechanism through KVM. - model this to
    use a single page similar to SEV-SNP
  KVM: Add per-plane memory attribute support for cross-plane EPT
    protection
  KVM: x86: Add KVM_HC_VBS_VTL_CALL hypercall for VBS inter-plane calls
  vbs: Add HEKI kernel sealing and fix KVM plane memory attribute guards
  vbs: Add module authentication via VBS/HEKI
  vbs: Add kexec validation and make module auth non-fatal
  Merge branch 'master' into vm-planes
  kvm: x86: fix merged plane API/stat build regressions
  KVM: x86: exit VM planes and VBS hypercalls to userspace
  kexec: block legacy kexec_load when VBS is active
  kvm: x86: fix merged plane API/stat build regressions
  KVM: planes: expose memory-attribute setting to in-kernel callers
  vm_planes: drop unused per-plane vcpu_count
  drivers/virt: add VBS secure-plane park loop
  KVM: planes: add arch-neutral in-kernel plane switch helper
  KVM: x86: add VBS VTL call/return and cross-plane set-mem-attrs
    hypercalls
  init/vm_planes: set up planes from rootfs_initcall and load ELF
    payloads
  security/vbs: run backend probe and HEKI seal at rootfs_initcall
  security/vbs: pin the VTL call hypercall to CPU0
  security/vbs: add secure-plane monitor backend
  drivers/virt: rename VBS park loop to secure_monitor
  x86/realmode: skip the sub-1M trampoline for the VBS secure plane
  KVM: x86: deny normal-plane access to secure-plane memory
  KVM: plane: handle KVM_CHECK_EXTENSION on the plane fd
  KVM: selftests: run plane tests with a split IRQ chip
  kvm: x86: drop obsolete kvm_cache_regs.h
  kvm: arch: finalize plane hooks and kvm_arch_vcpu_create signature
  kvm: x86: use kvm_vcpu scheduling-state accessors and struct stat
    fields
  kvm: x86: finalize per-plane APIC state and CPUID placement
  kvm: planes: reconcile core plane state, UAPI and hypercall exit

-- 
2.55.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2026-08-05 11:04 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 11:02 [RFC PATCH v1 00/42] VBS/VSM-on-KVM: VBS integration for KVM VM planes Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 01/42] Fix merge issue - Remove duplicate definition for kvm_arch_has_irq_bypass Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 02/42] Fix compilation Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 03/42] Fix compile error Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 04/42] Fix compile errors Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 05/42] Initial support for VM Planes - Add kernel config for CONFIG_VM_PLANES - Parse vm plane config from initrd for plane configuration - Make hypercalls to allocate memory for the vm planes Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 06/42] Use vcpu count from the plane configuration Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 07/42] skip processing plane configuration for plane 0 - plane 0 is the boot plane Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 08/42] Add plane config param to specify kernel image format Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 09/42] Activate the VM Planes through the Hypervisor - Using KVM as the VMM Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 10/42] allow the command line to be specified for kernels in other planes Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 11/42] Various changes to support VM Planes Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 12/42] Add a Virtualization Based Security (VBS) framework. - Add backends for AMD SEV-SNP, Intel TDX, Arm CCA and KVM Planes. - Support VTL on Hyper-V in addition to Planes on KVM Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 13/42] Add a inter-plane communication mechanism through KVM. - model this to use a single page similar to SEV-SNP Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 14/42] KVM: Add per-plane memory attribute support for cross-plane EPT protection Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 15/42] KVM: x86: Add KVM_HC_VBS_VTL_CALL hypercall for VBS inter-plane calls Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 16/42] vbs: Add HEKI kernel sealing and fix KVM plane memory attribute guards Sriram Nambakam
2026-08-05 11:02 ` [RFC PATCH v1 17/42] vbs: Add module authentication via VBS/HEKI Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 18/42] vbs: Add kexec validation and make module auth non-fatal Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 19/42] Merge branch 'master' into vm-planes Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 20/42] kvm: x86: fix merged plane API/stat build regressions Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 21/42] KVM: x86: exit VM planes and VBS hypercalls to userspace Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 22/42] kexec: block legacy kexec_load when VBS is active Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 23/42] kvm: x86: fix merged plane API/stat build regressions Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 24/42] KVM: planes: expose memory-attribute setting to in-kernel callers Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 25/42] vm_planes: drop unused per-plane vcpu_count Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 26/42] drivers/virt: add VBS secure-plane park loop Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 27/42] KVM: planes: add arch-neutral in-kernel plane switch helper Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 28/42] KVM: x86: add VBS VTL call/return and cross-plane set-mem-attrs hypercalls Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 29/42] init/vm_planes: set up planes from rootfs_initcall and load ELF payloads Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 30/42] security/vbs: run backend probe and HEKI seal at rootfs_initcall Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 31/42] security/vbs: pin the VTL call hypercall to CPU0 Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 32/42] security/vbs: add secure-plane monitor backend Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 33/42] drivers/virt: rename VBS park loop to secure_monitor Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 34/42] x86/realmode: skip the sub-1M trampoline for the VBS secure plane Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 35/42] KVM: x86: deny normal-plane access to secure-plane memory Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 36/42] KVM: plane: handle KVM_CHECK_EXTENSION on the plane fd Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 37/42] KVM: selftests: run plane tests with a split IRQ chip Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 38/42] kvm: x86: drop obsolete kvm_cache_regs.h Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 39/42] kvm: arch: finalize plane hooks and kvm_arch_vcpu_create signature Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 40/42] kvm: x86: use kvm_vcpu scheduling-state accessors and struct stat fields Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 41/42] kvm: x86: finalize per-plane APIC state and CPUID placement Sriram Nambakam
2026-08-05 11:03 ` [RFC PATCH v1 42/42] kvm: planes: reconcile core plane state, UAPI and hypercall exit Sriram Nambakam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox