mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/2] KVM: arm64: CCA: Add MEC policy support for CCA Realms
@ 2026-11-12  3:36 Kohei Enju
  2026-11-12  3:36 ` [PATCH RFC v2 1/2] KVM: arm64: CCA: Add support for configuring the Realm MEC policy Kohei Enju
  2026-11-12  3:36 ` [PATCH RFC v2 2/2] cgroup/misc: Add support for Arm CCA MECIDs Kohei Enju
  0 siblings, 2 replies; 4+ messages in thread
From: Kohei Enju @ 2026-11-12  3:36 UTC (permalink / raw)
  To: Paolo Bonzini, Marc Zyngier, Oliver Upton, Fuad Tabba,
	Joey Gouly, Steffen Eiden, Suzuki K Poulose, Steven Price,
	Zenghui Yu, Catalin Marinas, Will Deacon, Mark Rutland
  Cc: kvm, linux-kernel, linux-arm-kernel, kvmarm, cgroups, Kohei Enju

This series adds basic support for configuring the Memory Encryption
Context (MEC) policy for Arm CCA Realms.

Patch 1 introduces the KVM_ARM_VM_RMI_CTRL device attribute group to
allow userspace to configure Realm VM parameters before the Realm is
created using KVM_SET_DEVICE_ATTR, and uses it to let userspace select
the MEC policy before the Realm is created.

Patch 2 adds a misc cgroup resource for CCA MECIDs and charges one unit
for each Realm using the private MEC policy.

Feedback on the proposed KVM ABI and on using misc cgroup for MECID
accounting would be appreciated.

This series is based on Steven and Suzuki's CCA host series [1]. I am
sending it as an RFC while the CCA host series is not yet upstreamed,
and plan to update it as needed to track future revisions of the host
series. Once the host series is merged, I plan to post a non-RFC
version.

Since the base series is not yet upstream, some CI systems may not be
able to test this series successfully. This is expected for this RFC.

Changes
- RFC v2:
  - Use kvm_device_attr instead of a dedicated ioctl.
  - Rebase onto the CCA host series branch listed in [1].
- RFC v1: https://lore.kernel.org/all/20260724094120.166536-1-enju.kohei@fujitsu.com/

[1]
 https://gitlab.arm.com/linux-arm/linux-cca
 branch: cca-host-mm/v1/integration

Signed-off-by: Kohei Enju <enju.kohei@fujitsu.com>
---
Kohei Enju (2):
      KVM: arm64: CCA: Add support for configuring the Realm MEC policy
      cgroup/misc: Add support for Arm CCA MECIDs

 Documentation/virt/kvm/devices/vm.rst   |  25 ++++++++
 arch/arm64/include/asm/kvm_rmi.h        |   7 +++
 arch/arm64/include/uapi/asm/kvm.h       |   4 ++
 arch/arm64/kvm/arm.c                    |   4 ++
 arch/arm64/kvm/rmi.c                    | 101 +++++++++++++++++++++++++++++++-
 drivers/firmware/arm_rmm/rmi.c          |  10 ++++
 include/linux/arm-rmi-cmds.h            |   1 +
 include/linux/misc_cgroup.h             |   4 ++
 kernel/cgroup/misc.c                    |   4 ++
 tools/arch/arm64/include/uapi/asm/kvm.h |   4 ++
 10 files changed, 163 insertions(+), 1 deletion(-)
---
base-commit: a7644e0425de41ed0338cb73eebe5d14baf6be95
change-id: 20261112-mm-v1-mec-8c5072d6c331

Best regards,
--  
Kohei Enju <enju.kohei@fujitsu.com>


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  3:36 [PATCH RFC v2 0/2] KVM: arm64: CCA: Add MEC policy support for CCA Realms Kohei Enju
2026-11-12  3:36 ` [PATCH RFC v2 1/2] KVM: arm64: CCA: Add support for configuring the Realm MEC policy Kohei Enju
2026-11-24 15:08   ` Suzuki K Poulose
2026-11-12  3:36 ` [PATCH RFC v2 2/2] cgroup/misc: Add support for Arm CCA MECIDs Kohei Enju

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

all inboxes | Powered by JetHome®