Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp88423rdb; Mon, 22 Jan 2024 12:53:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvxV9dWZyaX8jl/rOjvQ54xXTQz/4NLAE6o0UAIqqzyN63DTfrGx+GqFnbyuXMAQRHwln1 X-Received: by 2002:a05:6358:528d:b0:174:edd3:b3e9 with SMTP id g13-20020a056358528d00b00174edd3b3e9mr4513794rwa.38.1705956819943; Mon, 22 Jan 2024 12:53:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705956819; cv=pass; d=google.com; s=arc-20160816; b=aNcCHQ7yDvL6CuThuNodSXcRrYCeIi6QUEoZCO+B6hFQywG4vZ4arXdNSNzvTqEy94 n6D8xfZw8f3JkQI8t7FWxYLPF77K/K0Myzp2ZUCeWXkUX/1RsGKCmJixDuvbEg81KSwY M8g5OVk/SAZiciG5D1ybTR+TgnXfJh4nvvUgptnjfhwbOFWXne2+K4SEQJQJEKL3qFLA ICh7WUuUvLr3RzzQJ7y6s0+YTM4VDJUcyou+gZmou84XY1DXC3N6oD1sxbhBasEmVs2Q T4HZwhBm3xdpzKbusK6AJ20OdwHjVcM8JoqHevoSfZE7GHvM1HvY7CUJKgK99QuOSStt ZMrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=FiLpZsskMRLC3VyzAEc9VovbJWzOCsh5pN6kZERNVAY=; fh=uEXa8VohJuSw9ua5uBs+/rAAAmLzNaMuYUmBYCDgDK0=; b=HZcoR0rcwTC9T3YUYwShJ9aO1LlNkMvLfka+PWv4+iUKUSg9Igd0bdcl3HQUMHvv1x aWO3VBircNcw12AfgYnAzDfE9tugq9hbyBjCFJ7QPWzhEEq1wumxap2TUlWh8+3UkgOR 8QwkSpndZCKv1g2sMLxhm/g+nIHsoRMXnqD4UVKuSoPXYf4HZzmu+d59AbR1wdjNs9wO uatHVQKBgZZ5MsnDFIlgke/zzYL3lGnS3Hcu5c29Ep3X3W/BGQCXXyIsssSPH7eOzIJ4 3veheVAq8QA343sMzYR3IMtnR6RUBk4hQklQHPejhwQNtQ/LD2TgdYR/bO1gtRJmZ5pG PgYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XypvkZ9k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h3-20020a631203000000b005c662c8da88si8868129pgl.146.2024.01.22.12.53.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 12:53:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XypvkZ9k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-34105-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7EB82B2300B for ; Mon, 22 Jan 2024 20:18:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3156240C01; Mon, 22 Jan 2024 20:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XypvkZ9k" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 58EFF41201; Mon, 22 Jan 2024 20:18:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705954687; cv=none; b=Ad42mPgNSreAxqr48VGFfEoBKEWhFZ3SoSXfA20RAGNY0EDoFMRh1KBnFbEHWI6OBpGD/qbtuFE331ArmtPIpPUEysnGZks0W7ouEXWQw5OL2XSWEJfc2L3TaBZybLl/E8+CIbF2b2z8vCBUAeAxDsiMiNj4tb4jn56kRseuJ2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705954687; c=relaxed/simple; bh=hWU5txo3LcJxEQr4McFHIiGTJNky9qKl+UtbSV2xMjQ=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=QDzHwMIZ7duXYhkcbjCNEy1hIHuh9ZbUA/Xa4IKsKAuuM4pfzjrmSR+02D7icd6xbiz7fuks1f9MtcqdhwzxEgbgakkM5dExtmrFEyrnfbdMhET3DF7ncUX1VpOm/b2KxTG+OYFI+7sb7nvXbA0atdr2IADllXCdo6JBzn5aZRc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XypvkZ9k; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AF88C433F1; Mon, 22 Jan 2024 20:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705954686; bh=hWU5txo3LcJxEQr4McFHIiGTJNky9qKl+UtbSV2xMjQ=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=XypvkZ9kimBlfV6r3VOThWN5mAMD/5FI2oaLfKXsCKSK0dH5Ecm5/XFQjHqbeg9pL K/AHD4F8tLSu6DVTGIkayfWOs2qO5sxkxQqEfCGgPsSrc0lEcF4k1iv5d8mElhqFcH KxC6Zg6Ocn0qK+0mub61XDKt/ey6A44pazV47goiEHWIJ+OphcjPWFPva74L+bz/EY oTAmU7UOByIMTpIdi1NAltIGy89sX+/wO+o32g/ANOpHFo65TICYB2wyp9uihh1Tvp H+N9OVnkZR+NaboQNxiQlpttXpbwvHcKdm3zsx78PEzRw4tQhh5go1eylukLAIgfWF l32JAt6dsyBRw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 22 Jan 2024 22:18:01 +0200 Message-Id: To: "Haitao Huang" , , , , , , , , , , , , Cc: , , , , , , Subject: Re: [PATCH v7 03/15] cgroup/misc: Add SGX EPC resource type From: "Jarkko Sakkinen" X-Mailer: aerc 0.15.2 References: <20240122172048.11953-1-haitao.huang@linux.intel.com> <20240122172048.11953-4-haitao.huang@linux.intel.com> In-Reply-To: <20240122172048.11953-4-haitao.huang@linux.intel.com> On Mon Jan 22, 2024 at 7:20 PM EET, Haitao Huang wrote: > From: Kristen Carlson Accardi > > 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 > Co-developed-by: Haitao Huang > Signed-off-by: Haitao Huang > --- > 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[] =3D { > /* AMD SEV-ES ASIDs resource */ > "sev_es", > #endif > +#ifdef CONFIG_CGROUP_SGX_EPC > + /* Intel SGX EPC memory bytes */ > + "sgx_epc", > +#endif > }; > =20 > /* Root misc cgroup */ Reviewed-by: Jarkko Sakkinen BR, Jarkko