Skip to content

RFC VBS/VSM-on-KVM: guest support using VM Planes

Sriram Nambakam kvm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest8 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8KVM: x86: raise the default maximum planes to twoarch/x86/kvm/x86.c+2 -10 replies
2/8security/vbs: introduce core VBS frameworkinclude/linux/vbs.h security/Kconfig security/Makefile +3 more+152 -00 replies
3/8security/vbs: add platform probe and backend registrationsecurity/vbs/Makefile security/vbs/internal.h security/vbs/probe.c+84 -10 replies
4/8security/vbs: add KVM software planes backendsecurity/vbs/Kconfig security/vbs/Makefile security/vbs/kvm_planes.c+194 -00 replies
5/8security/vbs: enable the backend after driver initsecurity/vbs/core.c+114 -00 replies
6/8vm_planes: add hypervisor-assisted plane bootstraparch/x86/kernel/cpu/common.c include/linux/vm_planes.h init/Kconfig +2 more+768 -00 replies
7/8security/vbs: bootstrap the plane from the enable pathsecurity/vbs/Kconfig security/vbs/core.c+13 -00 replies
8/8drivers/virt: add KVM VM-planes secure-plane monitorarch/x86/realmode/init.c drivers/virt/Kconfig drivers/virt/Makefile +1 more+178 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [RFC PATCH v2 0/8] VBS/VSM-on-KVM: guest support using VM Planes

This RFC adds guest-side Virtualization-Based Security (VBS) support using KVM VM Planes. Plane 0 runs the normal guest kernel and plane 1 runs a higher-trust secure kernel that receives VTL calls through the KVM hypercall-mediated plane switch.

The series enables a second software plane by default, introduces the VBS core and KVM backend, bootstraps the secure plane, and adds the secure-side monitor and park/dispatch handshake.

This is v2 of the series. Based on feedback from maintainers, the KVM host, guest, and QEMU changes are now being posted as three separate, layered RFCs to make it easier to understand the context of these changes as they pertain to the KVM host, guest, and QEMU. This patchset does not yet include memory protection between planes; that will be added in a future version.

This series is based on the KVM VM Planes prerequisite patchset obtained from Joerg Roedel's tree (kvm-planes-v7.1):
https://github.com/joergroedel/linux/tree/kvm-planes-v7.1

This series depends on the separately posted four-patch KVM host RFC ending at commit 6cbd0b038cb3 ("KVM: x86: handle VBS VTL call/return via in-kernel plane switch"):
https://lore.kernel.org/kvm/[email protected]/

This remains prototype code and is not intended for production use.

The implementation and integration tooling are available at:

Linux and KVM support:
https://github.com/safe-tee/linux/tree/vm-planes-layered

QEMU support:
https://github.com/safe-tee/qemu/tree/vm-planes-layered

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

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

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

- Joerg Roedel, whose QEMU and KVM VM Planes work provides the 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.
https://lwn.net/Articles/1016113/

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

Feedback on the VBS framework, guest bootstrap, backend interface, and normal-plane/secure-plane division is welcome.

Sriram Nambakam (8):
KVM: x86: raise the default maximum planes to two security/vbs: introduce core VBS framework security/vbs: add platform probe and backend registration security/vbs: add KVM software planes backend security/vbs: enable the backend after driver init
vm_planes: add hypervisor-assisted plane bootstrap security/vbs: bootstrap the plane from the enable path drivers/virt: add KVM VM-planes secure-plane monitor

 arch/x86/kernel/cpu/common.c  |  64 ++++
 arch/x86/kvm/x86.c            |   3 +-
 arch/x86/realmode/init.c      |  21 ++
 drivers/virt/Kconfig          |  15 +
 drivers/virt/Makefile         |   1 +
 drivers/virt/secure_monitor.c | 141 ++++++++
 include/linux/vbs.h           |  74 ++++
 include/linux/vm_planes.h     |  46 +++
 init/Kconfig                  |  18 +
 init/Makefile                 |   4 +
 init/vm_planes.c              | 636 ++++++++++++++++++++++++++++++++++
 security/Kconfig              |   2 +
 security/Makefile             |   1 +
 security/vbs/Kconfig          |  32 ++
 security/vbs/Makefile         |   7 +
 security/vbs/core.c           | 182 ++++++++++
 security/vbs/internal.h       |  20 ++
 security/vbs/kvm_planes.c     | 177 ++++++++++
 security/vbs/probe.c          |  61 ++++
 19 files changed, 1504 insertions(+), 1 deletion(-)
 create mode 100644 drivers/virt/secure_monitor.c
 create mode 100644 include/linux/vbs.h
 create mode 100644 include/linux/vm_planes.h
 create mode 100644 init/vm_planes.c
 create mode 100644 security/vbs/Kconfig
 create mode 100644 security/vbs/Makefile
 create mode 100644 security/vbs/core.c
 create mode 100644 security/vbs/internal.h
 create mode 100644 security/vbs/kvm_planes.c
 create mode 100644 security/vbs/probe.c

base-commit: 6cbd0b038cb31db2f06fe6516f5982d5bdb50174

Signature · 1 line
2.55.0