diff --git a/src/libcrun/container.c b/src/libcrun/container.c index ffcce5d04d..ed0fa29bb0 100644 --- a/src/libcrun/container.c +++ b/src/libcrun/container.c @@ -3953,6 +3953,8 @@ libcrun_container_get_features (libcrun_context_t *context, struct features_info (*info)->linux.apparmor.enabled = true; (*info)->linux.selinux.enabled = true; + (*info)->linux.intel_rdt.enabled = true; + // Put the values for mount extensions (*info)->linux.mount_ext.idmap.enabled = true; diff --git a/src/libcrun/container.h b/src/libcrun/container.h index 1e7a97cff9..dc50dd0c13 100644 --- a/src/libcrun/container.h +++ b/src/libcrun/container.h @@ -126,6 +126,11 @@ struct idmap_info_s bool enabled; }; +struct intel_rdt_s +{ + bool enabled; +}; + struct mount_ext_info_s { struct idmap_info_s idmap; @@ -140,6 +145,7 @@ struct linux_info_s struct apparmor_info_s apparmor; struct selinux_info_s selinux; struct mount_ext_info_s mount_ext; + struct intel_rdt_s intel_rdt; }; struct annotations_info_s diff --git a/src/oci_features.c b/src/oci_features.c index b13449b421..ff5d0fff0e 100644 --- a/src/oci_features.c +++ b/src/oci_features.c @@ -184,6 +184,15 @@ crun_features_add_mount_ext_info (yajl_gen json_gen, const struct linux_info_s * yajl_gen_map_close (json_gen); } +void +crun_features_add_intel_rdt (yajl_gen json_gen, const struct linux_info_s *linux) +{ + yajl_gen_string (json_gen, (const unsigned char *) "intelRdt", strlen ("intelRdt")); + yajl_gen_map_open (json_gen); + add_bool_to_json (json_gen, "enabled", linux->intel_rdt.enabled); + yajl_gen_map_close (json_gen); +} + void crun_features_add_linux_info (yajl_gen json_gen, const struct linux_info_s *linux) { @@ -197,6 +206,7 @@ crun_features_add_linux_info (yajl_gen json_gen, const struct linux_info_s *linu crun_features_add_apparmor_info (json_gen, linux); crun_features_add_selinux_info (json_gen, linux); crun_features_add_mount_ext_info (json_gen, linux); + crun_features_add_intel_rdt (json_gen, linux); yajl_gen_map_close (json_gen); }