From 2bbb1ff76c16f8435adbde8790b0ee9be3859463 Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Fri, 24 Jul 2026 12:50:04 +0200 Subject: [PATCH] feat(control): Add vCPU affinities to ZoneResourcesSpec We extend ZoneResourcesSpec to optionally include vCPU to host CPU affinities when launching zones via CRI or CLI. Affinities can be set either for all vCPUs at once or explicitly per vCPU. Signed-off-by: Costin Lupu --- protect/control/v1/common.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 8029270..f11b999 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -71,6 +71,7 @@ message ZoneResourcesSpec { uint32 max_cpus = 3; uint32 min_cpus = 7; uint32 target_cpus = 4; + VcpuAffinitiesSpecSet cpus_affinities_set = 8; ZoneResourceAdjustmentPolicy adjustment_policy = 5; } @@ -588,6 +589,25 @@ message VcpuInfoSet { repeated VcpuInfo vcpus = 2; } +message AllVcpus {} + +message VcpuIdSpecifier { + oneof index { + AllVcpus all_vcpus = 1; + uint32 value = 2; + } +} + +message VcpuAffinitiesSpec { + VcpuIdSpecifier vcpu = 1; + repeated uint32 hard_affinity = 2; + repeated uint32 soft_affinity = 3; +} + +message VcpuAffinitiesSpecSet { + repeated VcpuAffinitiesSpec entries = 1; +} + // Tar and directory formats are not launchable, and are intended for internal images. enum OciImageFormat { OCI_IMAGE_FORMAT_UNKNOWN = 0;