summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorZhiming Hu <zhiming.hu@intel.com>2025-02-19 09:02:51 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-14 14:20:51 -0400
commit7c035bea94074b19ed560a4f23a76c5a6c8e594f (patch)
treebcbdba2d1d5481b6cd156655fd746a3ba9077ceb /include/linux
parent20d913729c116a43119de76d346e0d3da0dc856b (diff)
KVM: TDX: Register TDX host key IDs to cgroup misc controller
TDX host key IDs (HKID) are limit resources in a machine, and the misc cgroup lets the machine owner track their usage and limits the possibility of abusing them outside the owner's control. The cgroup v2 miscellaneous subsystem was introduced to control the resource of AMD SEV & SEV-ES ASIDs. Likewise introduce HKIDs as a misc resource. Signed-off-by: Zhiming Hu <zhiming.hu@intel.com> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/misc_cgroup.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h
index 49eef10c8e59..8c0e4f4d71be 100644
--- a/include/linux/misc_cgroup.h
+++ b/include/linux/misc_cgroup.h
@@ -18,6 +18,10 @@ enum misc_res_type {
/** @MISC_CG_RES_SEV_ES: AMD SEV-ES ASIDs resource */
MISC_CG_RES_SEV_ES,
#endif
+#ifdef CONFIG_INTEL_TDX_HOST
+ /* Intel TDX HKIDs resource */
+ MISC_CG_RES_TDX,
+#endif
/** @MISC_CG_RES_TYPES: count of enum misc_res_type constants */
MISC_CG_RES_TYPES
};