All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v2 0/2] cgroup: KVM: New Encryption IDs cgroup controller
@ 2020-12-08 21:35 Vipin Sharma
  2020-12-08 21:35 ` [Patch v2 1/2] cgroup: SVM: Add Encryption ID controller Vipin Sharma
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vipin Sharma @ 2020-12-08 21:35 UTC (permalink / raw)
  To: thomas.lendacky, brijesh.singh, jon.grimm, eric.vantassell,
	pbonzini, seanjc, tj, lizefan, hannes, frankja, borntraeger,
	corbet
  Cc: joro, vkuznets, wanpengli, jmattson, tglx, mingo, bp, hpa,
	gingell, rientjes, dionnaglaze, kvm, x86, cgroups, linux-doc,
	linux-kernel, Vipin Sharma

Hello,

This patch adds a new cgroup controller, Encryption IDs, to track and
limit the usage of encryption IDs on a host.

AMD provides Secure Encrypted Virtualization (SEV) and SEV with
Encrypted State (SEV-ES) to encrypt the guest OS's memory using limited
number of Address Space Identifiers (ASIDs).

This limited number of ASIDs creates issues like SEV ASID starvation and
unoptimized scheduling in the cloud infrastucture.

In the RFC patch v1, I provided only SEV cgroup controller but based
on the feedback and discussion it became clear that this cgroup
controller can be extended to be used by Intel's Trusted Domain
Extension (TDX) and s390's protected virtualization Secure Execution IDs
(SEID)

This patch series provides a generic Encryption IDs controller with
tracking support of the SEV ASIDs.

Changes in v2:
- Changed cgroup name from sev to encryption_ids.
- Replaced SEV specific names in APIs and documentations with generic
  encryption IDs.
- Providing 3 cgroup files per encryption ID type. For example in SEV,
  - encryption_ids.sev.stat (only in the root cgroup directory).
  - encryption_ids.sev.max
  - encryption_ids.sev.current

Thanks
Vipin Sharma

[1] https://lore.kernel.org/lkml/20200922004024.3699923-1-vipinsh@google.com/#r

Vipin Sharma (2):
  cgroup: svm: Add Encryption ID controller
  cgroup: svm: Encryption IDs cgroup documentation.

 .../admin-guide/cgroup-v1/encryption_ids.rst  | 108 +++++
 Documentation/admin-guide/cgroup-v2.rst       |  78 +++-
 arch/x86/kvm/svm/sev.c                        |  28 +-
 include/linux/cgroup_subsys.h                 |   4 +
 include/linux/encryption_ids_cgroup.h         |  70 +++
 include/linux/kvm_host.h                      |   4 +
 init/Kconfig                                  |  14 +
 kernel/cgroup/Makefile                        |   1 +
 kernel/cgroup/encryption_ids.c                | 430 ++++++++++++++++++
 9 files changed, 728 insertions(+), 9 deletions(-)
 create mode 100644 Documentation/admin-guide/cgroup-v1/encryption_ids.rst
 create mode 100644 include/linux/encryption_ids_cgroup.h
 create mode 100644 kernel/cgroup/encryption_ids.c

--
2.29.2.576.ga3fc446d84-goog


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

end of thread, other threads:[~2020-12-09 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 21:35 [Patch v2 0/2] cgroup: KVM: New Encryption IDs cgroup controller Vipin Sharma
2020-12-08 21:35 ` [Patch v2 1/2] cgroup: SVM: Add Encryption ID controller Vipin Sharma
2020-12-09  4:43   ` kernel test robot
2020-12-08 21:35 ` [Patch v2 2/2] cgroup: SVM: Encryption IDs cgroup documentation Vipin Sharma
2020-12-09 20:33 ` [Patch v2 0/2] cgroup: KVM: New Encryption IDs cgroup controller Vipin Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.