Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1022361rwe; Thu, 1 Sep 2022 11:08:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/546Tz3ubSOqkWW7MI+VAmkeLNZ3u4PP7oK2IUjLbEqAocEPx0RmtZJS5K/N/v6cPKQrd X-Received: by 2002:a05:6402:1041:b0:446:b290:ea94 with SMTP id e1-20020a056402104100b00446b290ea94mr29468120edu.389.1662055721199; Thu, 01 Sep 2022 11:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662055721; cv=none; d=google.com; s=arc-20160816; b=NuFmThMrRDQMhBHPkJIFo+BQd84O42u+3n5RR29XNjQ3vGDe3yBYxmkMyfUKcPhxvO 2tNEbphED7NtFY0KYvA3MckUgn2tDZbB6UrWuKSg+aBnJF3n7h7ev9CSZFV68xJMrdKg sOPYc9r5yXsWCtNX/DeB8LSNLHRhluwUlxQiClwo+P4EP5EMgOaUilCY6Sa4itjBc/pO xe4/IzJcVKr1nXUY83ecG89KIRWEdCGE/Sxrsv3eQCVqUGi44di86RvMJ0/ofYqTL71X KO8lL+11lCUD+ohbJARUNH8hgoXAk2T+J51qhzh0hMy8Sybzcpc48tieGNxXfm8JaB1+ Tg0w== 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=MQnEtly0rT5VEW/OKtfv9DWInMChBOiwnjogwLslQfo=; b=S2GufR4bo4Iic7WyIbxoDeSMqA937COi/X3LELuGXM4qTUxAlK+c7uH2N5OMyMxwgk hKwinGmTfRFhYSD4YbrN5meW6UD4f8DtxuleMocg35U7TnjxqPj2kkXH4Rt+xmrLuQFS VcmZ49Vkl8AysdsMROPVGeOUKgWtuiM72kVSJS9ViBsRGCU5h1ee4n87JZtH37i7uJXL jXbxX9exX53Ksff27MKzRH4eIlNejKsh++nrHlFrbdHJce8rH7VJaCg9Aim05Av5x9iz OX6D5x5lGKiqph51HwwQzJBAKF1tY6Nw0/U2a2A5nCHLokhaBPtu+jYcqTLRucjHrB/u Zhmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SID8hHy2; 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=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq40-20020a1709073f2800b007417a74299fsi10032186ejc.773.2022.09.01.11.08.14; Thu, 01 Sep 2022 11:08:41 -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=@gmail.com header.s=20210112 header.b=SID8hHy2; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbiIASBo (ORCPT + 99 others); Thu, 1 Sep 2022 14:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231447AbiIASBm (ORCPT ); Thu, 1 Sep 2022 14:01:42 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67EC66B8DD; Thu, 1 Sep 2022 11:01:41 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id x80so13508933pgx.0; Thu, 01 Sep 2022 11:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=MQnEtly0rT5VEW/OKtfv9DWInMChBOiwnjogwLslQfo=; b=SID8hHy2UJJEu1tLqX0wqWDisxK+FNS4UewHCbU69hfscwDpGerJ5vh5Quv4/0Gu4f snqkB20uSeyW0Qulg2AH0cjdxQiDONw/DS3jbILXr6ffBOM+1D2d2xa+ansXJk/lXAtb Q/8rQ4J1ySSSoc+6Ed+ukMs47k9pF4UQaYTgNi3PqDaaT2Gnj98U2LPYFw2tm7q53+H8 PJdV0y7uAkIl0+Rs+ylbEJrtIzk1r9BDHQNvV+YFo1w31mjoActtwcimcvgxpvtt+MY9 Z52uRPhJhD8CPzVWCN5GyYEIFR5CuIkEkY3IT9jsCVL2nV/vfI1d1JMsi/iHr32UCieO kQPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=MQnEtly0rT5VEW/OKtfv9DWInMChBOiwnjogwLslQfo=; b=dKOMxRpokWC1yC7ScOU0l1MLeXA24BHxn4IKr3trFQN2biuRS4V+3NfGVO6XCkvjI4 mkHbgUtEvFG3qgXYlQY56aO5COQEaXxWG0purqHrmIryiOgtFQOW7h2sPI62cyCLiFTi S/5q8pW7e1ftQizJpe+GvAVrvfilglqvaC5NkPF9MxnbLER8GvkhBxRaVXIZ5C5K9lvD wJCXZzWDOxWwoWy6YjljTgQLbaPsUGO5mGWRHboIj4viJ8waW16wHUrD5fm1d0FUv5DM 4eseYNya3M2s0Azs+/4QoiEooCMbZQCTLeeOa3Vkyn4yPiS67J6BfPBLUd3yXk/9Ru7o 4EMw== X-Gm-Message-State: ACgBeo184uJn4lSr4riBE0Xzs0QZo4U4+x5lmNQckAAoZdyNyfZlDhHX dTblwGOqELxZkm+GtpNGVSo= X-Received: by 2002:a05:6a00:850:b0:52e:d1c1:df48 with SMTP id q16-20020a056a00085000b0052ed1c1df48mr32013994pfk.75.1662055300606; Thu, 01 Sep 2022 11:01:40 -0700 (PDT) Received: from localhost ([192.55.55.51]) by smtp.gmail.com with ESMTPSA id x10-20020aa7956a000000b005387bf85ea0sm6480993pfq.128.2022.09.01.11.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Sep 2022 11:01:39 -0700 (PDT) Date: Thu, 1 Sep 2022 11:01:37 -0700 From: Isaku Yamahata To: "Huang, Kai" Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "Gao, Chao" , "Christopherson,, Sean" , "suzuki.poulose@arm.com" , "isaku.yamahata@gmail.com" , "will@kernel.org" , "anup@brainfault.org" , "pbonzini@redhat.com" , "imbrenda@linux.ibm.com" Subject: Re: [PATCH v2 04/19] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs" Message-ID: <20220901180137.GI2711697@ls.amr.corp.intel.com> References: <7f4a3ef13cc4b22aa77e8c5022e1710fd4189eff.1661860550.git.isaku.yamahata@intel.com> <7f3003465bc8e7a75d7e27a0928271210c5e2323.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7f3003465bc8e7a75d7e27a0928271210c5e2323.camel@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 On Tue, Aug 30, 2022 at 10:39:48PM +0000, "Huang, Kai" wrote: > On Tue, 2022-08-30 at 05:01 -0700, isaku.yamahata@intel.com wrote: > > From: Chao Gao > > > > This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque > > param to additional arch funcs") remove opaque from > > kvm_arch_check_processor_compat because no one uses this opaque now. > > Address conflicts for ARM (due to file movement) and manually handle RISC-V > > which comes after the commit. The change about kvm_arch_hardware_setup() > > in original commit are still needed so they are not reverted. > > > > The current implementation enables hardware (e.g. enable VMX on all CPUs), > > arch-specific initialization for the first VM creation, and disables > > hardware (in x86, disable VMX on all CPUs) for last VM destruction. > > > > To support TDX, hardware_enable_all() will be done during module loading > > time. As a result, CPU compatibility check will be opportunistically moved > > to hardware_enable_nolock(), which doesn't take any argument. Instead of > > passing 'opaque' around to hardware_enable_nolock() and > > hardware_enable_all(), just remove the unused 'opaque' argument from > > kvm_arch_check_processor_compat(). > > This patch now is not part of TDX's series, so it doesn't make a lot sense to > put the last two paragraphs here (because the purpose is different). I think > you can just use Chao's original patch. Ok. -- Isaku Yamahata