Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp691271lqt; Fri, 19 Apr 2024 07:45:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVF3i2A5U3lKasAifzXqBcOjypATR57CeVeyyygbO1e+iUGoYey87yainXcg1VijHRCUN2PquDv4USeWAb/LvJNM5sTt97eKJcjfLw9qw== X-Google-Smtp-Source: AGHT+IFzR3SoXbwJJS9wwemDzB5TnZniwhVzCehTzkj9DbkXPecbyil951eN0rpFcwykWGm3ONmg X-Received: by 2002:a05:6e02:20e4:b0:36a:ed0:ca0d with SMTP id q4-20020a056e0220e400b0036a0ed0ca0dmr2793192ilv.25.1713537945882; Fri, 19 Apr 2024 07:45:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713537945; cv=pass; d=google.com; s=arc-20160816; b=QzBFzsnW4Jk7CXdtcl5s3vh3GpSMOQt3+qH9+cp78m5gVzkt7ZHfgx/uT5Um9pWLRJ FsXp87NqIV6A6umUOFwB7HvnEq5T/gA+5jtmgFULJK7CI2MOba3FXPj+gSm9gwSD9Lig 57W2yy4dYuEB3sHQwP6d/kTidCiL7TMVtxmTSs6o/+NCOJ3d5XCATVwUn0EqprIMKuOr yrYX9qhU6KxYgmrc/LZwbLkqQk9cawL7Et+xiGqXRudC73+Oj6DNKz5ZUW9t3PRWE0bl lQyvcHdIognxRDuv8Iy/i0wUwQ2oHeYtksc9VzYMQ+TJX1h8RmNONjdbk+1Y2XHb2Wad lKPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gLj9F34lSjGL6klRv023ISe3c1yyc4gWxqeIMRPttfg=; fh=lxk+RvRezZ2XdeqcUekliP1X0ajcmlwf4vpqZg41Bzk=; b=n2NRyHwsG7rh2bEVOuQkuEUymQwz4h2fIW9DDvvqOWnFNgv5ChqP5FEtEV5mk62aKD QlS/B/KKJb9OEqWAY0S+5pLE+PpwmbBfWmoXS3J7YpmCraJrrocH6mQu5WeR3kKqS5hH STCbYH9r4TM5R7nYVOd6RbaDPj33U2AOBQiM6maGuQuvvNDP3CD/uV8fILO0GZKD0PeG +KStLsA3za7ObbMPo8i9Elc08gP9IDaRP7SBn1bIrJgG30zqEzidW1Lv+ZnhdtJEQy7j tq7qEcoI0i6WA4aNGIME7va6NQzXMmwL6R67GkiIAyv1FY3GOfXgJKnZDpRcVjqJ86MP 7Qww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LXMJLVNv; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-151477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p20-20020a63c154000000b005e4dce697c0si3374736pgi.655.2024.04.19.07.45.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 07:45:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151477-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=@intel.com header.s=Intel header.b=LXMJLVNv; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-151477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151477-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2F865B2397E for ; Fri, 19 Apr 2024 13:31:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FBF0128833; Fri, 19 Apr 2024 13:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LXMJLVNv" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 1A3278614B for ; Fri, 19 Apr 2024 13:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713533507; cv=none; b=khNLPL95Gwbl3C+V9vJ76DoT2Kts1kvDrqVtszhoUSnXgWJvK9cxvmrf4bB9Gk8gWTWfA72FzWKs1TN5aMuRkqPZrDkFitqo37G++tFJiJOoHWJeh+NziMzu0rnqQ/QdyQoF6iOaZUAlVXgdf1VzUQK1sv51XdiTAFgF5nsfqdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713533507; c=relaxed/simple; bh=q8sLxUQXTmO+zQlO+Nq2zQY8GKJ0uOrx6YdkifWv8s8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gjl6rDNn2MO+9sC+KNUh8zeW7k6jj0JYm/DtoNfTvSex8Lxnm5YxD5mZfUw/Q0grd2EQuqHHzgBKwcYBKKo7VmCoLv3oKFOJKKZdvXhTj9AS+3IjuuPbwa9Y9oLY3H/Ww9lexOhLf3m8DeXAO5cEmMPDwGOF5m3UXyOTQ3bdQQE= 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=LXMJLVNv; arc=none smtp.client-ip=192.198.163.9 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=1713533506; x=1745069506; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=q8sLxUQXTmO+zQlO+Nq2zQY8GKJ0uOrx6YdkifWv8s8=; b=LXMJLVNvMh7kLIg+OQpGV3kIW52FsgOxk4V2z9Zj+eo63+Wvzc4hxwEh DcCUGRysIJ82uybKP+4zUq9Xbjt90+A62OCQeyhmKT2QUVzuc1xMvF9gD ZMlkpJsAIgYuduZTNGC3yh+N2mJUTh3DcKiIo4mAmn10SLaBnhRjVwzSP s0XDpCfZdosoXZRq+ELaRLYZZO5w59wHEWnc59x9Mm8+wE7K2g1VxTqKu E5oRqWgoe4M2CVtARlJ2jSZdS7L/vL20DFIV0HCOWStGQySy7PSF8auAw eOo579oO/oxKfcizcMBUPL6oWIhcd+qaHTMw0Rrsz/PsW3Sex9Zs8Yt3q A==; X-CSE-ConnectionGUID: AVVUO5QTRmqvkOo623zoqA== X-CSE-MsgGUID: wno5hSyyTtuRb1DDxPJzqA== X-IronPort-AV: E=McAfee;i="6600,9927,11049"; a="19829820" X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="19829820" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2024 06:31:45 -0700 X-CSE-ConnectionGUID: 8EhFIYEkSGmj4XmvSB/OuA== X-CSE-MsgGUID: 32PEEwedQ4ewi5StWKTDOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,213,1708416000"; d="scan'208";a="23411447" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP; 19 Apr 2024 06:31:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id CEE59FD; Fri, 19 Apr 2024 16:31:39 +0300 (EEST) Date: Fri, 19 Apr 2024 16:31:39 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "Huang, Kai" , Baoquan He , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Tao Liu Subject: Re: [PATCHv10 03/18] cpu/hotplug: Add support for declaring CPU offlining not supported Message-ID: References: <20240409113010.465412-1-kirill.shutemov@linux.intel.com> <20240409113010.465412-4-kirill.shutemov@linux.intel.com> <20240418143709.GJZiEwFejGQY3jiwsp@fat_crate.local> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240418143709.GJZiEwFejGQY3jiwsp@fat_crate.local> On Thu, Apr 18, 2024 at 04:37:09PM +0200, Borislav Petkov wrote: > On Tue, Apr 09, 2024 at 02:29:55PM +0300, Kirill A. Shutemov wrote: > > +/* Declare CPU offlining not supported */ > > +void cpu_hotplug_disable_offlining(void) > > +{ > > + cpu_maps_update_begin(); > > "/* > * The following two APIs (cpu_maps_update_begin/done) must be used when > * attempting to serialize the updates to cpu_online_mask & cpu_present_mask. > */ > void cpu_maps_update_begin(void) > ..." > > > + cpu_hotplug_offline_disabled = true; > > but this doesn't do that here. > > Are we doing a one-off here for that variable or what? Yes, it is one-off. I guess we could use READ_ONCE()/WRITE_ONCE() to access the variable with the same result. I am not sure why it would be better. -- Kiryl Shutsemau / Kirill A. Shutemov