RFC VBS/VSM-on-KVM: VBS integration for KVM VM planes
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest42 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/42 | Fix merge issue - Remove duplicate definition for kvm_arch_has_irq_bypassarch/ | +0 | 0 replies | |
| 2/42 | Fix compilationarch/ | +2 | 0 replies | |
| 3/42 | Fix compile errorarch/ | +1 | 0 replies | |
| 4/42 | Fix compile errorsarch/ arch/ | +2 | 0 replies | |
| 5/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.arch/ arch/ include/ +4 more | +506 | 0 replies | |
| 6/42 | Use vcpu count from the plane configurationinclude/ init/ | +25 | 0 replies | |
| 7/42 | skip processing plane configuration for plane 0 - plane 0 is the boot planeinit/ | +4 | 0 replies | |
| 8/42 | Add plane config param to specify kernel image formatinclude/ init/ | +29 | 0 replies | |
| 9/42 | Activate the VM Planes through the Hypervisor - Using KVM as the VMMarch/ arch/ include/ +1 more | +212 | 0 replies | |
| 10/42 | allow the command line to be specified for kernels in other planesinclude/ init/ | +24 | 0 replies | |
| 11/42 | Various changes to support VM Planes.arch/ arch/ arch/ +4 more | +266 | 0 replies | |
| 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.include/ security/ security/ +10 more | +1916 | 0 replies | |
| 13/42 | Add a inter-plane communication mechanism through KVM. - model this to use a single page similar to SEV-SNPsecurity/ | +51 | 0 replies | |
| 14/42 | KVM: Add per-plane memory attribute support for cross-plane EPT protectionarch/ arch/ arch/ +1 more | +62 | 0 replies | |
| 15/42 | KVM: x86: Add KVM_HC_VBS_VTL_CALL hypercall for VBS inter-plane callsarch/ include/ security/ | +6 | 0 replies | |
| 16/42 | vbs: Add HEKI kernel sealing and fix KVM plane memory attribute guardssecurity/ security/ security/ +3 more | +435 | 0 replies | |
| 17/42 | vbs: Add module authentication via VBS/HEKIkernel/ security/ security/ | +178 | 0 replies | |
| 18/42 | vbs: Add kexec validation and make module auth non-fatalkernel/ kernel/ kernel/ +2 more | +67 | 0 replies | |
| 19/42 | Merge branch 'master' into vm-planesarch/ arch/ kernel/ | +3 | 0 replies | |
| 20/42 | kvm: x86: fix merged plane API/stat build regressionsarch/ arch/ arch/ +9 more | +291 | 0 replies | |
| 21/42 | KVM: x86: exit VM planes and VBS hypercalls to userspacearch/ | +6 | 0 replies | |
| 22/42 | kexec: block legacy kexec_load when VBS is activekernel/ | +10 | 0 replies | |
| 23/42 | kvm: x86: fix merged plane API/stat build regressionsinclude/ | +0 | 0 replies | |
| 24/42 | KVM: planes: expose memory-attribute setting to in-kernel callersinclude/ virt/ | +19 | 0 replies | |
| 25/42 | vm_planes: drop unused per-plane vcpu_countinclude/ init/ | +0 | 0 replies | |
| 26/42 | drivers/virt: add VBS secure-plane park loopdrivers/ drivers/ drivers/ | +152 | 0 replies | |
| 27/42 | KVM: planes: add arch-neutral in-kernel plane switch helperarch/ include/ virt/ | +34 | 0 replies | |
| 28/42 | KVM: x86: add VBS VTL call/return and cross-plane set-mem-attrs hypercallsarch/ include/ include/ | +156 | 0 replies | |
| 29/42 | init/vm_planes: set up planes from rootfs_initcall and load ELF payloadsinclude/ init/ init/ +2 more | +54 | 0 replies | |
| 30/42 | security/vbs: run backend probe and HEKI seal at rootfs_initcallsecurity/ security/ security/ | +17 | 0 replies | |
| 31/42 | security/vbs: pin the VTL call hypercall to CPU0security/ | +48 | 0 replies | |
| 32/42 | security/vbs: add secure-plane monitor backendsecurity/ security/ | +267 | 0 replies | |
| 33/42 | drivers/virt: rename VBS park loop to secure_monitordrivers/ drivers/ drivers/ +2 more | +52 | 0 replies | |
| 34/42 | x86/realmode: skip the sub-1M trampoline for the VBS secure planearch/ arch/ arch/ +5 more | +202 | 0 replies | |
| 35/42 | KVM: x86: deny normal-plane access to secure-plane memorydrivers/ | +76 | 0 replies | |
| 36/42 | KVM: plane: handle KVM_CHECK_EXTENSION on the plane fdvirt/ | +9 | 0 replies | |
| 37/42 | KVM: selftests: run plane tests with a split IRQ chiptools/ tools/ tools/ +2 more | +45 | 0 replies | |
| 38/42 | kvm: x86: drop obsolete kvm_cache_regs.harch/ | +0 | 0 replies | |
| 39/42 | kvm: arch: finalize plane hooks and kvm_arch_vcpu_create signaturearch/ arch/ arch/ +3 more | +27 | 0 replies | |
| 40/42 | kvm: x86: use kvm_vcpu scheduling-state accessors and struct stat fieldsarch/ arch/ | +3 | 0 replies | |
| 41/42 | kvm: x86: finalize per-plane APIC state and CPUID placementarch/ arch/ arch/ +3 more | +20 | 0 replies | |
| 42/42 | kvm: planes: reconcile core plane state, UAPI and hypercall exitDocumentation/ arch/ arch/ +3 more | +86 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH v1 00/42] VBS/VSM-on-KVM: VBS integration for KVM VM planes
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
Signature · 1 line
2.55.0