Received: by 2002:ab2:7114:0:b0:1fd:af6c:537a with SMTP id z20csp565715lql; Mon, 10 Jun 2024 15:40:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwyKqbzEGdBNHap1jMNSkYJU0Bk+LhfQsip679PogLzCf8/phCacayp5tioltzS1wAPWAeZnLkXrn/Nouxmte/6+azC7WRJ7p6VGdB1A== X-Google-Smtp-Source: AGHT+IFKLJU4WkbAV3Bz+WiJg2LvZ6ah837tJF6O97YHW3xfAVumV/0Blc0FjXCjqm0FuQ9UhP6e X-Received: by 2002:a50:8adc:0:b0:57a:4c22:c0 with SMTP id 4fb4d7f45d1cf-57c508ec32amr6589172a12.10.1718059223920; Mon, 10 Jun 2024 15:40:23 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c7fa6590csi1672750a12.658.2024.06.10.15.40.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209012-linux.lists.archive=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=kGcYrch5; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-209012-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209012-linux.lists.archive=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 3B16B1F21969 for ; Mon, 10 Jun 2024 22:40:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 472041509BA; Mon, 10 Jun 2024 22:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kGcYrch5" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 C60A45466B; Mon, 10 Jun 2024 22:40:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.17 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718059213; cv=fail; b=Jc4rcMlSg7W3AzGUp9DUMpFrWeKDBHhBt5cV3f57tAE3mMNnYfXDT1h00O+sDJm0NewzY1qeFpbbe6r2xbppdK+ejKCHNt9X2KY8gZAhotn2kWR1asWuz/xuaICnEaiv3XyTqWa+2bWFNq6lDZP74A7zoQXzNm3yWHE1UnjM20I= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718059213; c=relaxed/simple; bh=/v2gCVMrNdH8/cLNxENmgB+FwLj0zakg6l9KeaAACyE=; h=Message-ID:Date:Subject:To:CC:References:From:In-Reply-To: Content-Type:MIME-Version; b=Kc4fe/pAfCjIy2yUXsHa1Xg1UNIiVl8JHhZFH1Efq2g1eMxvg9pZqctpzMq889u13SdhcTPjMdLv7/EiyNdZ5ktYMbIBLLGReS/Hj6BjMVKzhGcq3LW25iAZ/AJsN8Vzllw0lRleX7Ah7vyWyYFslLcDXxjR4sgcU4BHHGa9/kc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kGcYrch5; arc=fail smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718059212; x=1749595212; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=/v2gCVMrNdH8/cLNxENmgB+FwLj0zakg6l9KeaAACyE=; b=kGcYrch5y3GvUftZfiuiGOwoMT8EOW9Z5WXNMmvePKqdOwsvuM3b8xlf Y/53tEP6chDEDC8siV9Hnhz3qL1NhNLXk3Mcx1KeswrnpFfO9kLSOA+KS rRdVKcdqebG/wdD64KA+YkxsOUKSWtDMN1t/B3yBMmopQNw6TLofWlNMm oymLNkIULgxloo40M/jmE+BD0GiZlnxbB/6C6Oqb3t+Pz+RqGo6udMCjC 7SDE3VR6xNgCBK/oJdeO3zAAo61MP8STgtkmKsShBbE5fQajosH8JN4At 0ocv8IWA20xREdJweLtk/ZulsP24CuvvqarYa05ol8WkfMQkdDRZlLv54 Q==; X-CSE-ConnectionGUID: Mn3mW+BrTsaSf4EJHEd7eQ== X-CSE-MsgGUID: ryy+CqUFTty3Eq5zKDONvw== X-IronPort-AV: E=McAfee;i="6600,9927,11099"; a="14868728" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="14868728" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 15:40:11 -0700 X-CSE-ConnectionGUID: G0qeyBnGQsS7gjJwoiCJWQ== X-CSE-MsgGUID: xMjH8Z3ZSracve2jiHb/NQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="76662529" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 10 Jun 2024 15:40:11 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 10 Jun 2024 15:40:10 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 10 Jun 2024 15:40:10 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 10 Jun 2024 15:40:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UNHnu/s/Hbo/r/U365A/UH9H4D8ZdxBV0yaHfudiL1alehLe0ur8Fz5oGY4FKVHmmX50dzCxmNyonl8g7v5bp3XgxqffXjXJ4eQnfP+9YCPuh04QRKHxH3xX5CvZifcseHfUdsB48egegG2Nyit3oXASqM5JE5f7R2p/uasAEG1LfI4Dmlgo8oKBe6UCWDEqJ7WaUi/PmmLGkb3g2Nzbw0yyE1DXpJTdT1wEhnnO4PEfP7Zkbjg1rPiQmKeCgaZnVysrts2GfHdKvg11Qqk2iXCcVPFF6cltWOsqYPk3S/KU7UMJDuK8u7Zz1VV77YhGSHFl7EUtfmDV3e21GDgUVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9klRS68hYTi9ZjLbNbV/fqb/g0egZGySaewRlLwL+Co=; b=N97pB+ReJjAnZZXFLd1EWwnu6kyOH14oGJ094AAnMJ0AGp+HI72bnjHXuuzl1JpL8F+GwMBHONk8VlbTHk+89G9BV5BhODgJyXwmi0KwEnYxJW+8pgy0PqSMglFGHcTbGFwweWaQuy2swNvxK5t38jcsWioogfMkZpnFiN///LJALa8f1h1DzL3SeE2BJkLwbpBVkA3o+RBXkyAWSMvdSP4J6FRySwTf1n/IZt3MMHSDl7q/Vt6v74GsHWhkutnYMkOIa3SxsHEgYNCUoLKmu6Mcl7K8bXvnaHiBJ+sxf75W+8GUgEU2SEMqCDjiRa3WVfJExfclN7MVUlvfGd2IYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by MW4PR11MB6692.namprd11.prod.outlook.com (2603:10b6:303:20e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 10 Jun 2024 22:40:07 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::fdb:309:3df9:a06b%4]) with mapi id 15.20.7633.036; Mon, 10 Jun 2024 22:40:07 +0000 Message-ID: Date: Tue, 11 Jun 2024 10:39:53 +1200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v14 14/14] selftests/sgx: Add scripts for EPC cgroup testing To: Haitao Huang , "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" , "Mehta, Sohil" , "tim.c.chen@linux.intel.com" , Jarkko Sakkinen CC: "Li, Zhiquan1" , "kristen@linux.intel.com" , "seanjc@google.com" , "Zhang, Bo" , "anakrish@microsoft.com" , "mikko.ylinen@linux.intel.com" , "yangjie@microsoft.com" , "chrisyan@microsoft.com" References: <20240531222630.4634-1-haitao.huang@linux.intel.com> <20240531222630.4634-15-haitao.huang@linux.intel.com> Content-Language: en-US From: "Huang, Kai" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR05CA0141.namprd05.prod.outlook.com (2603:10b6:a03:33d::26) To BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5978:EE_|MW4PR11MB6692:EE_ X-MS-Office365-Filtering-Correlation-Id: e23735e3-4a9e-4b26-4ba3-08dc899e45fe X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|376005|366007|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ODNrY0NDQ3E2M1NOdS81eXYrazdtdFpoYVJTZmU0WG9SU3l3bTcvZmpGc2k1?= =?utf-8?B?VnNrNzhPYXdKY2JGb3BleCtXd1BSOC83N0VrMHZDcUwvejJpU0RUd01OMDJ1?= =?utf-8?B?RHVmV1lFMlRCckhhVG5RT1o1TzE4NnYzMUZRY0RqNVBCZzNWeFFiOVF4c3Y5?= =?utf-8?B?bWNVSHNrMHlLZFNLMWE2YjBhdEV4em51OG5oV0s1O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M2hkWkVydG9JV21U?= =?utf-8?B?QUZzaHJDbDQ3MWVpRWZpRCtlalk3T3llM1hKSlY5eXEvTTR2RGladi8zNGZk?= =?utf-8?B?VkE2QVBnS0Jtd0pGVmViVmgvc2ZNTVVKUldmSXVkOHRHSHE5M3BoYVJDeWJR?= =?utf-8?B?Z1pWNHJDeEVQUUNCZGdybkJhNEZTVWtuRFVZcG9kVUIvU3BVSmFCTTJjQTl2?= =?utf-8?B?bERGUDJJUTlRQ3N3RnpCMWZzWEthbEtmZmZBaDFyZTR6OEdmRDFOMnVaWWRR?= =?utf-8?B?K3JXRlNCV3lkeWIvR2MvUlgrL0RUaHdaYzBqSUJrSVJrQ0JDNE0vL2VSWm8w?= =?utf-8?B?NjhUTzd3bmx5T3ZIRUdwa28wdkovSG1nMTJYM28yaGF3a0hRNDYrd0NqVkFX?= =?utf-8?B?RFBmM2pRa2kxTkRsWnVQemVxZzZhRnIwR1o2SzZkNGIrSEIzSkZxYStaQlB4?= =?utf-8?B?RExpQjZUVVJ6elZGTEJKek5va1ZGVXcvWXVXUTgxQ0FJY1NEL0duSDdBUlh6?= =?utf-8?B?cmRQR2NGd2diZkE4Z3F3dnI4QlZWVTRYUERTcWtzR01pd25oc2xhMEN6SFU2?= =?utf-8?B?VUZROFVmOUFna21iZnFzRXgxRTFtOVhzdEcrQ3lpV2RKWklBajNDWXQ0ZkdK?= =?utf-8?B?SjVUS25DYzlrOVRETFZad0gwNWlUcXBERVhwUDBOK0ZKZkEvdXlEUUEzeEV6?= =?utf-8?Q?Dm93cbxDXFSdU5JKbX3s2W3hQXgh3o+gn8Br4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5978.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(376005)(366007)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-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T2V4T3dONk1QUkR6eFp6R2dVSThwRDJhVXFoNElTVW92ckJwbFhuditTb1FE?= =?utf-8?B?cVNyWTBhWDZybzJwaHViOUc5WWpnTXpMMmRteFFZZzV3L1V2STk2c1RzdHlJ?= =?utf-8?B?ZUU0SlB2b1pLUk8xck5hVUNTM09PTG54MkZNS0ZvMm5peHE0N1A5S0pLQkdk?= =?utf-8?B?TGdNbjI5WFhuakw5Uzc2SWpzRno2OE42dWxIbEk5YTlWRnVEVzU1bFVoZmp5?= =?utf-8?B?R3VqRXRvTWhNODdBTkJTZVljWGZVdXNBTjJHcUE5OWlpa2FRaXpIYnRUZlpU?= =?utf-8?B?Zno1OTNpWHRMK2Zwakx3VXJySnk3TzNHSTRVYmJucEVRM3ZmUXVoc2QrV0lU?= =?utf-8?Q?TXGfluJu2DW+Y6Y6sy+umtw4t?= X-MS-Exchange-CrossTenant-Network-Message-Id: e23735e3-4a9e-4b26-4ba3-08dc899e45fe X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2024 22:40:07.1762 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F1drV8yHTKfeti6Stu4LLkpK32dFDaaDuMfrzZxH721k19co/jlvxymxFZHGp9FyK8sns4mUxvOS9mEZ6NiSfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6692 X-OriginatorOrg: intel.com > --- a/arch/x86/kernel/cpu/sgx/main.c > +++ b/arch/x86/kernel/cpu/sgx/main.c > @@ -1045,7 +1045,7 @@ static int __init sgx_init(void) > if (!sgx_page_cache_init()) > return -ENOMEM; > > - if (!sgx_page_reclaimer_init()) { > + if (!sgx_page_reclaimer_init() || !sgx_cgroup_init()) { > ret = -ENOMEM; > goto err_page_cache; > } Does it make more sense to move the sgx_cgroup_init() to the sgx_drv_init()? The SGX cgroup only works for the driver side anyway. In this case, if something went wrong in sgx_cgroup_init(), the sgx_vepc_init() could still have a chance to work. And IIUC we need to reset the "capacity" to 0 if sgx_cgroup_init() fails, no matter it is called inside sgx_drv_init() or sgx_init(), otherwise the "epc" would appear in the cgroup hierarchy as a misc cgroup resource. Another option is to defer setting the capacity to the point where we have made sure sgx_drv_init() and sgx_cgroup_init() cannot fail. Btw, I plan to review the rest from late of this week or next week because this week I have some other staff needs to be finished first.