Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6194603rwb; Tue, 22 Nov 2022 09:57:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4QfiFOetYMFwHUX6zemuEFSuRFGTFNRwACnek2HkxdRP6TQC1Z43sWqBm6lnRQQY9vzXhF X-Received: by 2002:a17:90b:19d3:b0:212:dadc:23e3 with SMTP id nm19-20020a17090b19d300b00212dadc23e3mr27041268pjb.129.1669139849806; Tue, 22 Nov 2022 09:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669139849; cv=none; d=google.com; s=arc-20160816; b=zwOGocUdpeMVh/LhTg4odQrvUV0N2eCuJuplsxCKRvjyZq9AuT7UKWMiOfMStW6HS2 2A5W2/0C14Y3S+M1HGqk9RQHY5FND0X1/6lj+r3DfxTiIWS166Msms7JbsqkSvfExzHK RSjNqxy1vIM2R2AHe1eGKHRJAYEI+wU0sly1zCQg61Whrrcl7oMXqHnkgKPrPm1H/3CI JV0p4inaSwdte9cXZNDxz84YRAFTBJbtgiJU092hfhiox37wQmbODq8umh4KjFM7RaxJ Gy946ZrUffP163zuT1Ps7NQkfODW6rVvkp6OcHmtEFAj6mFZQ5WpgZRBB5ObOnCTrIlm /Y3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=gjmtC/V1IhUMDwLItEi+YzLakaX5z0D3glhq5KpL7n0=; b=DvQu4nDDURliZENmDfnCu4MK/B7xPuEjXP/VroljWQdzEfvyZgA50YZOKEPpT9wIjy k8IToE/HFRq2805Y38MlzZoBX0Of38f+vH8vv2jTBPib1zpxP0gIvd6uMNUjhavSVcP7 LJHCeaN2DZLxpLex/KYrv6nRWhMZRU+dj1o1e3Pg0l8nKuONq1mDuX3FAgmbh4vNSDng sK2wGJ+0k/PHqLg976E9enHPWy1XDcpYTQOPe5IBA9lYHuQbjbNIBx1RoJ+uYz/l8pDP 5xgARmOWCCbdCObkZYNxaLgXWfJf2TyqfWV6m9e0pxqk5Hft0dxjQTcHSU+19egvsNrU aDFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zL+JREAI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a170902904400b00183a85a9b54si13008438plz.279.2022.11.22.09.57.18; Tue, 22 Nov 2022 09:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zL+JREAI; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234198AbiKVQwX (ORCPT + 90 others); Tue, 22 Nov 2022 11:52:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232465AbiKVQwP (ORCPT ); Tue, 22 Nov 2022 11:52:15 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A257B70A28; Tue, 22 Nov 2022 08:52:12 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669135931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gjmtC/V1IhUMDwLItEi+YzLakaX5z0D3glhq5KpL7n0=; b=zL+JREAI54DPIOaCj7r+99hl6Omzz5yTQz4rB9mo3oM7+z4ImloQlObcg3mAH/wze1pnFQ Mmt4JKu+KPW9dipD0w5t1oF6L1V/T0tEhOdglZGMY9coDNGWiHcPXgfuFobe8FZIGuaoJ4 hP9ekFK+RjoBZUImHvClct4h2x4yIekFNv6WEtyeVch04auNBVV1Lu6cSSYz1w+AODwCpf 7jH9pS9ooKPmdsLU3y8wQ0tD6KDkCt3+ATiUGnL+IG8oiLHhuItTFpKa616Xh56OhYJRWF n0XjIs4x55yh0cTX3s/QLbCgqKNsGiCUtVRbTN6YC5GFzxAcJpkMuZtHGYaWMA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669135931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gjmtC/V1IhUMDwLItEi+YzLakaX5z0D3glhq5KpL7n0=; b=GbdranQm66ucsOgjrVBBcyt+6Dk3M9qsLoUxUwsiqJSGRQ2y9sZuwXT1O7MXzbIvtgudCs WemgrRenS68AWwDw== To: Dave Hansen , Peter Zijlstra , Kai Huang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, seanjc@google.com, pbonzini@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, kirill.shutemov@linux.intel.com, ying.huang@intel.com, reinette.chatre@intel.com, len.brown@intel.com, tony.luck@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com Subject: Re: [PATCH v7 06/20] x86/virt/tdx: Shut down TDX module in case of error In-Reply-To: <058a6033-a5e0-771b-3c16-950fdbb8c1e5@intel.com> References: <48505089b645019a734d85c2c29f3c8ae2dbd6bd.1668988357.git.kai.huang@intel.com> <058a6033-a5e0-771b-3c16-950fdbb8c1e5@intel.com> Date: Tue, 22 Nov 2022 17:52:10 +0100 Message-ID: <87tu2rextx.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 22 2022 at 07:20, Dave Hansen wrote: > On 11/22/22 01:20, Peter Zijlstra wrote: >> Either the Changelog is broken or this TDX crud is worse crap than I >> thought possible, because the only way to actually meet that requirement >> as stated is stop_machine(). > > I think the changelog is broken. I don't see anything in the TDX module > spec about "the SEMACALL can run concurrently on different CPUs". > Shutdown, as far as I can tell, just requires that the shutdown seamcall > be run once on each CPU. Concurrency and ordering don't seem to matter > at all. You're right. The 'can concurrently run' thing is for LP.INIT: 4.2.2. LP-Scope Initialization: TDH.SYS.LP.INIT TDH.SYS.LP.INIT is intended to perform LP-scope, core-scope and package-scope initialization of the Intel TDX module. It can be called only after TDH.SYS.INIT completes successfully, and it can run concurrently on multiple LPs.