Message ID | 20231030182013.40086-4-haitao.huang@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2416295vqb; Mon, 30 Oct 2023 11:22:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEp8Bbh5/fE559tFUt9WqvueoEIpW5+dHBGRoT/AZrKlJmlHV0Yxoong0y9b8On9omfSKxf X-Received: by 2002:a17:902:fb45:b0:1cc:379b:3505 with SMTP id lf5-20020a170902fb4500b001cc379b3505mr3362083plb.49.1698690163745; Mon, 30 Oct 2023 11:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698690163; cv=none; d=google.com; s=arc-20160816; b=VyGd+eJLNNvSbpKVaoauNcbwVE19XN5tqwUc/MuGoTGJUQAu6RVTWFQnvhCbw4jInZ ItkhJv4wlJnM6Qt20JZAazV8N5m5WlNdzlTQDyTVxkWO8ekQjg1bbnwJh1VghOiVYQFN Q8VXLowpRn06aWC5IaRuIIPoHBzWq3DA9A5ycYm0vzTAS+agU7y18F2e9auZNzYYNDyZ poUQY23QfPO0ZwQGat2u92Qbue2aMJ4yh2hGk1bHRQcZPATY5F6wgRR5l8phFSMlMyfT Bz5xEf9PqawiVrg75fKm1UI82OI/ftlygaelszL8v6fclfFC5gcqdsZumGVuAZNIqevr 6esg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nNZ70ezK8IHHtcw37/VaTy0+dw4rKgKwLF7fJv7J+js=; fh=sNqM0rzpS3sahstSbhU1PMo5LJZgUrUMK8BDlDCJMTE=; b=LOvpLfXH+GE+TMyqEpCi4K0UkajKm2eB6jbAYMkP18j41+RQOSuOvL7ovVjFwv0w2E e3J4ZO1Ulx3SH8fQdKGhIkh3elaeNHjNbk9kEmoADK3HEqY++k5Ak/wxA5V5x8ecN4B/ dBNQe6J7JfP7a2NVN/UCNvqyO8afXwO9MkgCq2r8LM3we7CCC0+pgU/1lGO11Yu/fUfu xX+Ijn5Z9lsXMtAQMbJb+1MCXsN24hBaIqZ5EE+ABne2fok8hgiEQNsAtDuDZBw0mmPy CJXBI1D3y4HaFdiUq3dpwMwSe3AtUuIAID78G8NW6n8yqfPAF1hvjCSJYjJgN/igZ0Nc F1Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f8cwO1yQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id i8-20020a170902c94800b001cc3a66229dsi3137252pla.507.2023.10.30.11.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 11:22:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f8cwO1yQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 35D3580870E7; Mon, 30 Oct 2023 11:21:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232989AbjJ3SUw (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 32 others); Mon, 30 Oct 2023 14:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231157AbjJ3SUe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 30 Oct 2023 14:20:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6650D3; Mon, 30 Oct 2023 11:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698690032; x=1730226032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5GmAti5pT59JXbFdfEtdxPlG/vuMlTMqJEpR0/hTUEE=; b=f8cwO1yQUlpWvuzvVvzPEi7mNi+mvTT7xdK+LENuSuXEXUB6/1VnZh3y lwmMqhrJ3OwCGA2K4H0C7Sa96U5n+3D9Ip+P+MU6UWIaRdUxQX4fCNZH7 4ITMCfaXEco7uKEdBW0qWuEp7QGP/YmWdGWSdM9t9Ten5UqECXecR37vS WaMXJB1Q4d8Q11gKBVFSuyhA3ru/t5rtknGhpN3Nv84rZgV/pil3KteT1 8vybgFyfYWutZ1CtpgixEGMPx3Nra0XPAps3Ij6oHMtnzM0JbzBZZz89T 39kme88kaOxlWoGjKbGtZe9gWSNHG4UuHYrMZJv9Xv24xcvLwCzukPCUg Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="367479542" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="367479542" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 11:20:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10879"; a="789529504" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="789529504" Received: from b4969161e530.jf.intel.com ([10.165.56.46]) by orsmga008.jf.intel.com with ESMTP; 30 Oct 2023 11:20:28 -0700 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, Haitao Huang <haitao.huang@linux.intel.com> Subject: [PATCH v6 03/12] cgroup/misc: Add SGX EPC resource type Date: Mon, 30 Oct 2023 11:20:04 -0700 Message-Id: <20231030182013.40086-4-haitao.huang@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231030182013.40086-1-haitao.huang@linux.intel.com> References: <20231030182013.40086-1-haitao.huang@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 11:21:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781205737629148778 X-GMAIL-MSGID: 1781205737629148778 |
Series |
Add Cgroup support for SGX EPC memory
|
|
Commit Message
Haitao Huang
Oct. 30, 2023, 6:20 p.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> --- 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 2a3b1f8dc669..368f6c5fccae 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 fa464324ccf8..a22500851fe8 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 */