Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17448843rwd; Tue, 27 Jun 2023 03:13:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jrEXKiP/C3/kPmAQrRnsHrNUXkl10SCz+xlBmuxCP30MTznDrcDpLVOV6g+MLl/ELDmCC X-Received: by 2002:a17:90a:203:b0:262:c41e:1fcb with SMTP id c3-20020a17090a020300b00262c41e1fcbmr12450827pjc.14.1687860836342; Tue, 27 Jun 2023 03:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687860836; cv=none; d=google.com; s=arc-20160816; b=XJFh13jvdn2aL8lkSIz+MERHUgsYnP+pOnKIJkvdMp9gQshvnZPjSBiZr3KsYjPnTS rPDKntZACYquspicmbrfrKUl/d2V58+rzJ3KsvDnz8Pcq6HG44B2d6ZzdygZHlEwq1ze ZqTwP9V2zyE7jHPufREENnkzvSDjA2Myky14v6sLDpsOtK5ltvQmEn1e020xSAL3ZPpW Ho21euLdPtRno61WZu1FB1LOTxrT0hWleYNNlQtk7QMwhpWq2yQ1LV8vq7PDglu6EYNB AhlnKEnFWOKjw7bK2yQCQXl3faJ7ZjHEZQJhYQE7n1Gcr/mbfj61e85+jRbgizbAihku EEtg== 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=ocDJOW5xdwADvMeq2r4ZJSSgExZvq1Aa9Wwtz8My8B4=; fh=U3TJmJHrqmoyVzdr5WTQxA/qFKy1nY/GQSZ6ivpgig8=; b=XwkvkfB2wOMoUf8coIYVySg7C1oZ7Q574scNjtLak4HNkYQ90BYS0bR3acT3qzA2gD pUZ+FU9jiXOyW9avTiEJrzWxE7RRvuIAMdKh9xdsbqZ/6LsDpZbAB2GOZN/IKQXrNbhT P+MevczIszXj5Jb+HaDj9WuxhQo+v2FQVBYyvRzVm8MuDAwNnNutfstTfTNtdDELoQsB f7cGjp6pshyb3jpMDw3osckxpNJPiYS8tDJLw0xNfxK9faqE3wJPfAy/Lfwh7d9ofXKj 4BwmH48dl3rZTt3HWUO89MokzlGtH5x00lTheVtCSRxeCcHgtFeM8kXmkUWZX5u+VaIz uqdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YW+DmiqL; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a17090aa88300b00258ee17486bsi7102264pjq.160.2023.06.27.03.13.42; Tue, 27 Jun 2023 03:13:56 -0700 (PDT) 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=@intel.com header.s=Intel header.b=YW+DmiqL; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbjF0JuY (ORCPT + 99 others); Tue, 27 Jun 2023 05:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjF0JuW (ORCPT ); Tue, 27 Jun 2023 05:50:22 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D12652691; Tue, 27 Jun 2023 02:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687859421; x=1719395421; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=S34hN26QAZtQUW6DKc6TE+7IhWnV1UGr4OqGCCuhdv4=; b=YW+DmiqLTzrlIRiqMA8Mqbj+BU8GE+3k/ZEnwtkuyikGziYnWE7DvLnw Ij3qbKpv36NEgWrY00V/Howd22kuCfbjL2wX2oEqvqZATfzU+MMA+k/jP EmCdebElxSNFbRPk1ZOlATia51XAl3qQtgDndVYVfrCjeRJumpQ5lJyEL 0YOJ/opcvFDDI1pLqxR3OJPwP+bFOVVs+VP2kEAtMXR5F46eb6tSaFB+e qTRx8wtv4/MHuTQSAm7+EAe9jUMI8y+hIh4EVJ2FbG73izOFCr3hFKm5R nr2IpHiG35MT/XUeQC1UzdC5+sB3rHxAs1WJjkmG1ERJhArwDb7JLUwlm g==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="447911892" X-IronPort-AV: E=Sophos;i="6.01,162,1684825200"; d="scan'208";a="447911892" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 02:50:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="806403097" X-IronPort-AV: E=Sophos;i="6.01,162,1684825200"; d="scan'208";a="806403097" Received: from rbhaumik-mobl2.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.217.121]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 02:50:14 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 24381103732; Tue, 27 Jun 2023 12:50:12 +0300 (+03) Date: Tue, 27 Jun 2023 12:50:12 +0300 From: kirill.shutemov@linux.intel.com To: Kai Huang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, dave.hansen@intel.com, tony.luck@intel.com, peterz@infradead.org, tglx@linutronix.de, bp@alien8.de, mingo@redhat.com, hpa@zytor.com, seanjc@google.com, pbonzini@redhat.com, david@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, ashok.raj@intel.com, reinette.chatre@intel.com, len.brown@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, ying.huang@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, nik.borisov@suse.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com Subject: Re: [PATCH v12 07/22] x86/virt/tdx: Add skeleton to enable TDX on demand Message-ID: <20230627095012.ln47s62pqzdrnb7x@box.shutemov.name> References: <104d324cd68b12e14722ee5d85a660cccccd8892.1687784645.git.kai.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <104d324cd68b12e14722ee5d85a660cccccd8892.1687784645.git.kai.huang@intel.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, Jun 27, 2023 at 02:12:37AM +1200, Kai Huang wrote: > + /* > + * The TDX module global initialization only needs to be done > + * once on any cpu. > + */ > + raw_spin_lock_irqsave(&tdx_global_init_lock, flags); I don't understand how the comment justifies using raw spin lock. -- Kiryl Shutsemau / Kirill A. Shutemov