Message ID | 20240122172048.11953-4-haitao.huang@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-33776-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:805:b0:101:a8e8:374 with SMTP id e5csp21457dyi; Mon, 22 Jan 2024 13:50:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIV1tqI8g+OClE/CCtR3JmrozJhee0y53e+1tLgVy3oiX3eWi9MxVymmvo/FLGhAjEBNdu X-Received: by 2002:a0c:9c88:0:b0:685:4cbe:178f with SMTP id i8-20020a0c9c88000000b006854cbe178fmr5831531qvf.10.1705960218505; Mon, 22 Jan 2024 13:50:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705960218; cv=pass; d=google.com; s=arc-20160816; b=qhtQC6jixygLFAY0uWFWOw1+UROM02wpQwN0I7F+Kba1uVvD4uzju0fXPx50VuBCfv Swzg7RR0hCFu8rVT8GagNJ/IOy1KQh6D45Qk87xI6mgPYbcGzrmZSkQdibQK53d4sD2J q21kp7MMrzQtq20JJVuTI2D1VMm7B5hmxuAnlpCXR8P+lRCvR6SZ03nAgXyZQ0oEzaBb BRQ62guGutORU8c66/IiB3hb9gEHru8mjXKuNG3W8z2MtzYVamUn/wqw8G2aLlcKvIbo +qnFclg1actmWKC2Gw8nagq3YVrX53ilU8+5DJskuWzQlJ9aUI+/Yla1RN5EXBpel8Sp Ww6Q== 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=p5/07kKXOnaBf8cg9EvGoALaywP7buXIkdNvge3xtQs=; fh=Vgrzu9fr1cYGsDqSNq8PcOKm1OcJf2aYsOF+33ACqic=; b=KWt7MaPa8lWwqLaldfXTDOpQFHNAlg/LAylR/cXxN/F/NNID/fOXNNH7um+TKLUjcc Z6ESuW/a356/HvasTfFDKXDXPDaWXkK2A60SI6FTLLfFuNDHQhCoecWfnlRYkWhBxE/Z z1UPBiRzBqyzQ73VjVEEoHA3u5EsN2OLPXxqbNijxxL0mUv+u+DNL0ONLcHfuuAX1bQe aEPUopFMwf4lGh3p/Dvr5qus4TV0V/1WTAwmaG9Lmd3hOSiMAXv+rSrBuDvt2q/AeP5M Nb/zp9/CzzfIDEuEziWLNIN8AZBKdC1G8ts7uiBc5h24diLoljUsEs6+EX3ZThAZYHdN 4B6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mdllTdB9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-33776-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33776-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x18-20020a0ce0d2000000b0068173117a26si6642082qvk.172.2024.01.22.13.50.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 13:50:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33776-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mdllTdB9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-33776-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33776-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3818F1C280DE for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 17:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8CD05FB81; Mon, 22 Jan 2024 17:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mdllTdB9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 D08EE3FE3C; Mon, 22 Jan 2024 17:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944053; cv=none; b=eAUny6LWtAHz4uEecWOED3Met0TtOERLPOr4CUXSO5xR+Lo78nNDTdVRIxMXxWNdXxTMYcTcpeBHwzifs9RRhrB4Vb4gK4By8gJN+i1CjCZk5+aWixRdjwH4ggeGvV39n4vaKP4gtm7kSbU7Ict35bmYgTKWTApneQF0BQ50IeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705944053; c=relaxed/simple; bh=RGIroSgVGIrhpvmE/7mpo3HSWBMwlLP6KKFtOGYR/aQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jSmnolA/XLlFWqDslYSjlT1PMewOygGOTs9Iuz/tJzwoEUPb5FNAgDGU+wCMm4FlybnJ1TW2KTV8jaOIoVTqsngKhC+THHV0opLBpwQP6zoSnoSO+jCtde0YObMqcTJoG8xH8rVOpMZzVNtaPw+7jUwo+qj+6TL9lRqJDZ8QC6o= 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=mdllTdB9; arc=none smtp.client-ip=198.175.65.15 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=1705944052; x=1737480052; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RGIroSgVGIrhpvmE/7mpo3HSWBMwlLP6KKFtOGYR/aQ=; b=mdllTdB9I0zOXTO+Ae4eVUPLlSBkVyiiuf4yTZRV2v15bnSDdkJaljdS F5gEfeBQU/OMuCLGhpxSdtImU8wF11Gm5SXiCNTLiECK8XVJqzbHQr5dC J7UFisxkfKUAvmYw3a/3MhP54bCXn3ECeDMXoPgyTCTPgWSQTsuxjK4ES Kfh9/wKv3IAh1dJhIahjbtaAQJXQHSfiPqBKeNvd9C4cNrRLTHE8HQYX1 TVSrm1s9gJc2PR1qWD0NksEpaeq4wjyukCwtLHFVUdxfbwJLlMC0vkD63 IwXAsrnqvwtpoq8yGkfcaMrL8xU13wU1PC3RnPUDmybkVjBe8F50Udwm5 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="1150125" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="1150125" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 09:20:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="1262863" Received: from b4969161e530.jf.intel.com ([10.165.56.46]) by orviesa005.jf.intel.com with ESMTP; 22 Jan 2024 09:20:48 -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 Subject: [PATCH v7 03/15] cgroup/misc: Add SGX EPC resource type Date: Mon, 22 Jan 2024 09:20:36 -0800 Message-Id: <20240122172048.11953-4-haitao.huang@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240122172048.11953-1-haitao.huang@linux.intel.com> References: <20240122172048.11953-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: 1788823158660448382 X-GMAIL-MSGID: 1788828942013396755 |
Series |
Add Cgroup support for SGX EPC memory
|
|
Commit Message
Haitao Huang
Jan. 22, 2024, 5: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 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 99d971ecc842..4c519423b071 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 */