Message ID | 20240130020938.10025-4-haitao.huang@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp976134dyb; Mon, 29 Jan 2024 19:26:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEZEou4NJQqjmPyPNH3VxQASAD3jTI6XYe9HQdXMyozNYsxu4dBsN7sQj3+YQuE/80mSLL X-Received: by 2002:a2e:8e69:0:b0:2d0:4f16:7ea3 with SMTP id t9-20020a2e8e69000000b002d04f167ea3mr2217088ljk.42.1706585205726; Mon, 29 Jan 2024 19:26:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706585205; cv=pass; d=google.com; s=arc-20160816; b=CxdVQaBzmxg4Hi/dHdB6jkqHLbA2mcS+Z3iWP/9z8YpK2REW91txthScrQQz/wadbC Yt7wbpg4jK/mQX7quA/3LFnHKCEB9cqCy2M9wtzZfc+EcVtPDrT5PeoBiAS1x6hBybLQ +rhbkBdOLKWG2TUVgUsy6NlNvyZtl/QNj0Pixf/BphQqamE+Lr2/CJAQS9Xg2jTDxR+A Bh1wz6w7yCNv1YFy0E63f45c+f4hkVtZTnCPF/hL9FAPina3vaNWABA6z6NrWmcIFg7c GicD8U7GQG1o9ovAzedtROjjmEASJZWXbZyHCxVf27Zuf/WMOrvzwImeURRkufOOF8uz yWtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AqWWI/Gh7z2z8mZ5OI3FsyusrHgJwzTCkVq/3hcyohU=; fh=dtGru4wMzkfh5N4HjO7hjgtPmzQheD7FyA8qGNiECvw=; b=FDBcgUFeb/ChV6RREo0byerwgLECLLjnAldDymKcndCl+8zDgB41sJGNztPkVo8uq6 G6Bz6+BMsJ+YSY9rtiM7G3WROMsx+5OyQTASmjrVCbf8V/P8B2x8U3Co1p4RdMOMiouk uG0DoTBK4mSl9L6ZBzl/QAst7266T1xz1rZDiNsc5mQ46pdxwtk4hhA3PBMsbHdsvL3G kmkqALiKxyhWsY3yryFHLCXyOGmbvicJOndo4ETsgPnmWkonMpmbcHJrYk+lIZuyFeVM L6cJEcCXD94TYkmYS8+3cPW7eQ+Mgye6Gd7h4HZxcuQKx2xnLqPd7P9On74JumFPZ08t 8rVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dk4iYCZ0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fe12-20020a056402390c00b0055a4d0e3a77si4031990edb.266.2024.01.29.19.26.45 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 19:26:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dk4iYCZ0; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43783-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E5C491F24FD9 for <ouuuleilei@gmail.com>; Tue, 30 Jan 2024 02:10:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB36381B3; Tue, 30 Jan 2024 02:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dk4iYCZ0" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB36536B01; Tue, 30 Jan 2024 02:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706580583; cv=none; b=evctCbbsYnFnVlBy0kaR0loyUheTqeEaROCa+36PdkQeAfNV6CPMVeUIKyY1m/HCJlb2gjZZNbA+SBk9ozs0Cn/ecpPnBs1n5TFAhECnEnu7v1UZ+kQ24VvFFNbl+zeSxeBTb9Eh4Mljop40hwqJZ9rqkROhixADhrFPWrsEJMs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706580583; c=relaxed/simple; bh=YDWZ+/RuZjq5pI5dUr4mOk8isI80rU+KIyGmgA2cvBo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UwDk9QROOfKXqHqXuKq5qWi2oyTVuyR2+KxersyNrLguOOTgCW7pKHqL/3mDNS+RNE3xypwnEI1qn5J/FQiprLye7hHoN8K7vNfTyN0/JQlMcjjzcpukRDpHmlhrAqaPmsMJR1M/D8hzu+tWETJdtiUHo+/JNMj9DJtZMrWgeSk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dk4iYCZ0; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706580582; x=1738116582; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YDWZ+/RuZjq5pI5dUr4mOk8isI80rU+KIyGmgA2cvBo=; b=dk4iYCZ0VYrVPbH1/kU401gNUyrsQbieOAsE9eSnaMxQB7NTBA/kN0Kg RQzWFsEbjXuOOhwTyvLI8YMbET4oT9hheY+RtEoMHOFlspJ42h96cnutp RB7tFlIMAbQlOhdBtizzY+stvTUAKXW3t1x6alExWCADLd/KP+piwRItl ylVQco7YYgFko9H2KfkqQmFF5pKYGj88guxgTismsv9RBDW0FRk7nRsfV I+3fIGtqkrUYPmAm8RZF0lXqiAoI+CQTcW3IBg0uIiPO6wL9NTS30YA4e qeXr8P0UBelRRiQmzw8UKJTbzvoAibYSt3GcKxWj3OGbWr3HFCejC+phm A==; X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="16530932" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="16530932" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2024 18:09:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10968"; a="822042326" X-IronPort-AV: E=Sophos;i="6.05,707,1701158400"; d="scan'208";a="822042326" Received: from b4969161e530.jf.intel.com ([10.165.56.46]) by orsmga001.jf.intel.com with ESMTP; 29 Jan 2024 18:09:39 -0800 From: Haitao Huang <haitao.huang@linux.intel.com> To: jarkko@kernel.org, dave.hansen@linux.intel.com, tj@kernel.org, mkoutny@suse.com, linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, x86@kernel.org, cgroups@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, sohil.mehta@intel.com Cc: zhiquan1.li@intel.com, kristen@linux.intel.com, seanjc@google.com, zhanb@microsoft.com, anakrish@microsoft.com, mikko.ylinen@linux.intel.com, yangjie@microsoft.com, chrisyan@microsoft.com Subject: [PATCH v8 03/15] cgroup/misc: Add SGX EPC resource type Date: Mon, 29 Jan 2024 18:09:26 -0800 Message-Id: <20240130020938.10025-4-haitao.huang@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240130020938.10025-1-haitao.huang@linux.intel.com> References: <20240130020938.10025-1-haitao.huang@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789484288531247410 X-GMAIL-MSGID: 1789484288531247410 |
Series |
Add Cgroup support for SGX EPC memory
|
|
Commit Message
Haitao Huang
Jan. 30, 2024, 2:09 a.m. UTC
From: Kristen Carlson Accardi <kristen@linux.intel.com> Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type for the misc controller. Signed-off-by: Kristen Carlson Accardi <kristen@linux.intel.com> Co-developed-by: Haitao Huang <haitao.huang@linux.intel.com> Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> --- V6: - Split the original patch into this and the preceding one (Kai) --- include/linux/misc_cgroup.h | 4 ++++ kernel/cgroup/misc.c | 4 ++++ 2 files changed, 8 insertions(+)
diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h index 541a5611c597..2f6cc3a0ad23 100644 --- a/include/linux/misc_cgroup.h +++ b/include/linux/misc_cgroup.h @@ -17,6 +17,10 @@ enum misc_res_type { MISC_CG_RES_SEV, /* AMD SEV-ES ASIDs resource */ MISC_CG_RES_SEV_ES, +#endif +#ifdef CONFIG_CGROUP_SGX_EPC + /* SGX EPC memory resource */ + MISC_CG_RES_SGX_EPC, #endif MISC_CG_RES_TYPES }; diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c index 1f0d8e05b36c..e51d6a45007f 100644 --- a/kernel/cgroup/misc.c +++ b/kernel/cgroup/misc.c @@ -24,6 +24,10 @@ static const char *const misc_res_name[] = { /* AMD SEV-ES ASIDs resource */ "sev_es", #endif +#ifdef CONFIG_CGROUP_SGX_EPC + /* Intel SGX EPC memory bytes */ + "sgx_epc", +#endif }; /* Root misc cgroup */