Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp296212imw; Tue, 12 Jul 2022 20:33:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vEbwtLQAbnv5AI9Lidl2JFw6piMIyI0Zr/zlWxdQmO8Xsavsue1Vz/BFB25URhgpa7Uh+P X-Received: by 2002:a17:90b:314e:b0:1ef:9db1:a2b9 with SMTP id ip14-20020a17090b314e00b001ef9db1a2b9mr7781709pjb.18.1657683226828; Tue, 12 Jul 2022 20:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657683226; cv=none; d=google.com; s=arc-20160816; b=Il8skFaSJYYcfLDi6OtFO1vaGeLJzYeN5ZC3glsmDWaw8trcs/V5sGbVeO4QrEUiB8 tv8nvr2/sH6hT5Wc3Ir8/TNB0fzKn2rgikB2krjJ4HiOpaHm1Rk3gAIkjxH6Hg67/+14 fLGdW9g/P/IWEQTRYKM2ArKugup0PvFXuKoFbaJrNgS0vGqD1BxAXdAUAs6azcjvXNuO nJl6fieSuHS00tJzyLTGU6uR90KiBu/aqieRHnModGgSD9i3UCk4Gxad+zpIT86va72O Q+zpfLw1FqMeKpuKxgvqXrwwIgX4COAfkRyFYZivesFuskCyh3mpixjogL8xanwtgH9R s1KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=hMwY84Ag79x3lSFAdjGIFMbF1tQKTmFa5OgeQrOzx18=; b=qivO9H8N/yPEtRPFsJOcVA9jHZadAFCsNTHL8qNJxFAStcBo8aazWk2fsyxteTLdYO lJ3p6EnTfnqCA6iH2HecbMu9pohBUsKlwJDD5tFi7DXS8rphxX+aQw8wnfElTl8I4Tor ayDkqqGDc4aRCJkZwP6GQTnX45YmXQwzjKx0PVIQulCn4aJgm5j2CW9gHb+mkp0KfGFp 1rKyzOeyLT50OJvXJHB2aH9CNQI/cFoJ9DBeji/2jleLN4sPn/ZdUXXNiaYk45GkmSWf MfAmsTcKdN7WS4q5ZtY46X3/WLHgtH4zYab5reBbCPvBbXi84M+ppT7zN8hl4AzzGmXM 7bKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XfEig+PO; 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 o14-20020a056a0015ce00b00519099107ddsi17677359pfu.234.2022.07.12.20.33.33; Tue, 12 Jul 2022 20:33:46 -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=XfEig+PO; 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 S231322AbiGMDQ4 (ORCPT + 99 others); Tue, 12 Jul 2022 23:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbiGMDQy (ORCPT ); Tue, 12 Jul 2022 23:16:54 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF39AD7A6A; Tue, 12 Jul 2022 20:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657682212; x=1689218212; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=1Erh3CyyDV9THBc/EKhKsORANd2MPiX3UyCy+uJR4Fk=; b=XfEig+POze3uyqJz1NAyvnwxgLx6erNB/bca4PaSasEpAdfi9xhZa8Jt ycFd5sdZG1Afw3hfRtYsnlFwUwYx7I4hvB+S9UsKr+htOIOn9xD/fvfi3 HqtCSfHpyNeWCXrNMyrUAbMQ6Htel6g77H8EmAdYYMwGq7dhLUoDjTTzy I6MJq9nO6bQnywEKajRm6HGUfj3c0JfgMKu+l7LLtTiI56Ukusoij+BML inwF12oiFzde56pvlea2geAPgOPM6F48eq6FRfMRpho7OMMU87i2Af5Ih hQsrZ3EA/s9dYUedf/zDlHhIzx0Dt9CSMReWs+g/yygJgcPq2reqmrZ3B w==; X-IronPort-AV: E=McAfee;i="6400,9594,10406"; a="371411118" X-IronPort-AV: E=Sophos;i="5.92,266,1650956400"; d="scan'208";a="371411118" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 20:16:52 -0700 X-IronPort-AV: E=Sophos;i="5.92,266,1650956400"; d="scan'208";a="722194206" Received: from ifatima-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.212.1.196]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2022 20:16:50 -0700 Message-ID: Subject: Re: [PATCH v7 003/102] KVM: Refactor CPU compatibility check on module initialiization From: Kai Huang To: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@gmail.com, Paolo Bonzini , Sean Christopherson Date: Wed, 13 Jul 2022 15:16:48 +1200 In-Reply-To: <1b5e06b237ad9f2bcbee320e95b94e336109b484.camel@intel.com> References: <1b5e06b237ad9f2bcbee320e95b94e336109b484.camel@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 (3.44.3-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 > > + /* hardware_enable_nolock() checks CPU compatibility on each CPUs. */ > > + r =3D hardware_enable_all(); > > + if (r) > > + goto out_free_2; > > + /* > > + * Arch specific initialization that requires to enable virtualizatio= n > > + * feature. e.g. TDX module initialization requires VMXON on all > > + * present CPUs. > > + */ > > + kvm_arch_post_hardware_enable_setup(opaque); >=20 > Please see my reply to your patch "KVM: TDX: Initialize TDX module when = loading > kvm_intel.ko". >=20 > The introduce of __weak kvm_arch_post_hardware_enable_setup() should be i= n that > patch since it has nothing to do the job you claimed to do in this patch. >=20 > And by removing it, this patch can be taken out of TDX series and upstrea= med > separately. I tried to dig more about the history. Please see my another reply and ign= ore this.