Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1304951rda; Mon, 23 Oct 2023 08:35:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFj0kLH9PDe2ofIPTbHg1pwwUPiDqZGByRMxxcMcwJbLJ+nfoxG4p/PPDjSLnLWCbKSOIbt X-Received: by 2002:a05:6a20:1593:b0:155:5c28:ea74 with SMTP id h19-20020a056a20159300b001555c28ea74mr8068060pzj.12.1698075351461; Mon, 23 Oct 2023 08:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698075351; cv=none; d=google.com; s=arc-20160816; b=llKEQrOUqL4ZQXARjk5O+raqtodLQzXFYioXq0vwH3TaPblyxdC0+hhrtJ2wnkrHZR ZNhwAov11ByflTcM1iGy3bYWhRHJTvGHOk01rsGIU6a3xcayNhox/6ltn2/CT5WVKECY Bi96dq0/OaRHdKI1/ZZofjlvxKBAIYONj2rEiy8QWEqQCFQSH3CXgJdxQFrkvdGNPSIu 7vu9LFyRRQKpp1oEDpD/LXwMjVg7d4E2+3MXGscgh78BrQKM3WJz+bXXh3Y9khO9/WoZ QyUoP+EJOCnW8hTyM3dERvHQTvT96MJK3MYi9sFAFDwIhpwNkm7B8Wv4Qm6beUETqEct Md9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gKAwCrj+U3MtjwzEXx42wE5SPknfeFIXqtAPI3+BLPk=; fh=ONZhk0XUIArGH668+kFPNDkXpQavASqLFoOqiIqXy68=; b=J2CFH/yth0p4hoZzO6YaGf2KDefYapjLrEHug6kuDX8kbAT5F2x9RGMndtB4Oo7N79 5lh3Ba0nbDQw16CQ3kEacS5wpmtZM0g6xVyz3glpVzJ+DTdrp0BSiOUTV3NDn+snWVz+ iq0nIzEStJOiRm940W13q9PmPGjy8Jfw3EADR4x3jhO9sWScsQC3J0lsiaE5F50r8g0U b9vDa3Zk3CNTbN2FRj5cTJPSYPgCdEbQK9ZXgFqMdmsLNABCrH3cG1NHDyHqoXMCp32j St6a+1LtJ6yim4Uxshv0XaS6i3fbGGolRecy+GB8qsujwvi+/4QTpT1MiDWcDu0j4sEw 5bog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n4qN6Z1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d19-20020a637353000000b005aa83686f34si6508306pgn.79.2023.10.23.08.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 08:35:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n4qN6Z1h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 30BF38075019; Mon, 23 Oct 2023 08:35:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbjJWPfm (ORCPT + 99 others); Mon, 23 Oct 2023 11:35:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjJWPfl (ORCPT ); Mon, 23 Oct 2023 11:35:41 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EA7CDE for ; Mon, 23 Oct 2023 08:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698075339; x=1729611339; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Rh3WIkroWfusSZh8pyM6xIJoI8clu8Gzvxh74Q9Cu1A=; b=n4qN6Z1hoOI9qRcoyOz2V9+JJRbx1zyibaFeRFbXeiwf/ILtBMIo4m1p HIQH1y7qrW0hZCjOaRn/ksdk86M4E+2aflIFhU70mI86XeSLRdEXt5Y5j ueUB0OJSTmGXcxu8NJiUV61FsuYt1DqIBB8lpb3Fvon5vd2yQPvvY/31G KCe0ZfOsIp0hxVbS/C3a1qHlZ6FumUGTUHh+5TYsvITtSq13u+l45TyyE zByhDEbUhtK4f4XFXOKgESAOsKGFl0FO452e2fWPatnMq0Si3tg553FCk /xexogwg21rJcNA3Y4+3QUMnhqnfbfQ5nRAFmFI/ivKb469Qq+YkwfRT1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="385762196" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="385762196" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 08:31:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="828480810" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="828480810" Received: from swidman-mobl2.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.211.241]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 08:31:45 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id D62B9109B10; Mon, 23 Oct 2023 18:31:42 +0300 (+03) Date: Mon, 23 Oct 2023 18:31:42 +0300 From: "kirill.shutemov@linux.intel.com" To: "Huang, Kai" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "x86@kernel.org" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "Edgecombe, Rick P" , "Reshetova, Elena" , "Nakajima, Jun" , "rafael@kernel.org" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Hunter, Adrian" , "thomas.lendacky@amd.com" , "ashish.kalra@amd.com" , "kexec@lists.infradead.org" , "Christopherson,, Sean" , "bhe@redhat.com" , "linux-coco@lists.linux.dev" Subject: Re: [PATCHv2 02/13] kernel/cpu: Add support for declaring CPU offlining not supported Message-ID: <20231023153142.bes7zxcjc2soihsl@box> References: <20231020151242.1814-1-kirill.shutemov@linux.intel.com> <20231020151242.1814-3-kirill.shutemov@linux.intel.com> <0a29fef814e51a2aa0030ec9cc97366718859411.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a29fef814e51a2aa0030ec9cc97366718859411.camel@intel.com> X-Spam-Status: No, score=-0.8 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 08:35:49 -0700 (PDT) On Mon, Oct 23, 2023 at 09:30:59AM +0000, Huang, Kai wrote: > IMHO it's a little bit odd to have two mechanisms in place, even in this middle > state patch. Is it better to completely replace CC_ATTR_HOTPLUG_DISABLED with > the new cpu_hotplug_offline_disabled in this patch? You can explicitly call > cpu_hotplug_disable_offlining() in tdx_early_init() so no functional change is > done. I can. But I don't see how it makes a difference. > Or I am wondering why cannot just merge this and the next patch together, with a > proper justification? Because the very next thing reviewers would ask is to split them :P > Btw, IMHO the changelog (this and next patch's) seems didn't explain the true > reason to replace CC_ATTR_HOTPLUG_DISABLED. > > Currently hotplug prevented based on the confidential computing > attribute which is set for Intel TDX. But TDX is not the only possible > user of the wake up method. > > "TDX is not the only possible user of the wake up method" doesn't mean we need > to replace CC_ATTR_HOTPLUG_DISABLED. E.g., other CoCo VM type can also select > CC_ATTR_HOTPLUG_DISABLED if it uses MADT wake up method. > > To me the true reason is the new MADT wake up version actually brings the > support of offlining cpu, thus it's more suitable to decide whether the CoCo VM > needs to disable CPU offline based on the MADT wake up version, but not the CC_* > attributes that is determined by CoCo VM type. No. MADT is orthogonal to CoCo. It can be implemented outside of CoCo environment and CoCo platform can implement other wake up methods. It is not up to TDX/SEV/whatever to decide if offlining is supported. It is property of the wakeup method implemented on the platform. -- Kiryl Shutsemau / Kirill A. Shutemov