Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2764254rwi; Tue, 11 Oct 2022 13:04:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ewQ8UjgtLKlH2bIm/nUioOsQSjGvJf4J3CQ3QKAQdFpzVYau5Jme2eOeOIX2jYvYelA02 X-Received: by 2002:a05:6402:3988:b0:44e:6f08:ddfb with SMTP id fk8-20020a056402398800b0044e6f08ddfbmr24022337edb.89.1665518651927; Tue, 11 Oct 2022 13:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665518651; cv=none; d=google.com; s=arc-20160816; b=XfpqtkA4yqncuIBezPWWiuan32uCkXT5RH2fhSXNRdaKlOFfERnL5mmJB1BtQ++aSW TRxhT/8J0uHvWSpaD07udPb2yQBpltztS3xNkXaDtkrheOfLPvQUGz3Nb8xLR7muINSl d8QJHwKrb+VtF8JtbJqMMCIgvljQn1np7Edi3z62m/7utgWXD0faIgQBznEN77YG6J7/ neO8tG9zBuBoeAXPKGsFkELHn2vxgO0Uf3fjZ0ePRRCSi+hF1mg4908TN4L4Hu7H9BMx 0Jed/t7BVr7Z8D2xi72xpDMcq9EY7HnVzh8z2ecSOVFpT83+aDmQ+VVkJjuCQ116qpW7 QWeA== 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=DhlMOfPBdi/CsWsdnaMLzdq//FOZZc6tM8Yhst23qAw=; b=AGz2pUYrCdlU7LR8SNDnXfeGGIWd2owW0YbTJrtxXTbuYaysRIl5kbDfHJje/k2XZZ SEqN7+wv/d6DHJl7YftPFRygjegO6oeykhzNvo5nLcBWkrk57yD7p4NXTr3WLvkvSBJz DksXeMUvMgm5lWpVLj3J0G75xTh2F5jZ5Sr0wAodn8wkIxORZZecIZQRR47CvlBTYOtX 2feZ6hmah0q3GZy3jiIZtCRWywgCYD71F97BWYKiTNrXGFWxmoTw/1hoQXsnuAXBf/Ky GgFVyeR23u1eiLvtcG82w2K+7X3an08R1o5rB9TgacOu7rkhea0FxBK87r1V2WP009Iy nSog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=C74IZkU1; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id va10-20020a17090711ca00b00783ac0b4d32si12334696ejb.941.2022.10.11.13.03.42; Tue, 11 Oct 2022 13:04:11 -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=@google.com header.s=20210112 header.b=C74IZkU1; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbiJKTxt (ORCPT + 99 others); Tue, 11 Oct 2022 15:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbiJKTxl (ORCPT ); Tue, 11 Oct 2022 15:53:41 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B9727D7BE for ; Tue, 11 Oct 2022 12:53:40 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id c20so4636517plc.5 for ; Tue, 11 Oct 2022 12:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=DhlMOfPBdi/CsWsdnaMLzdq//FOZZc6tM8Yhst23qAw=; b=C74IZkU1+jAVMUbnoGaRvOY7sEMO90MLdqDnWdkCWMz+9uJUmGC54r5aogn7gustEJ NUT9LGUBlKvqGxhkCb2fhBcHJ+RopOoW+WGwCwqBO58ANWo474enoaJs+mCaCc1PvWEO 3mr/8neCIz0RuDiDApHrM53UWqUAP0Xtp0aTZzw5ZpxrNo7SH/qiYb8hjohj0p9poY0Q 2wRm5LUWsZtelulLw/VpEuPzX6a7lK1Lq6gyPkMeZSlTTfJdjULHqVoeB6bqZle6sdyg 1GAXwgG45SfOwGsPo9N9CL4KtmqKt/Ar/3b5MNW/IMnHlGxrVQ81fxjLw4oD5tdkzj6J 52AA== 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:subject:date :message-id:reply-to; bh=DhlMOfPBdi/CsWsdnaMLzdq//FOZZc6tM8Yhst23qAw=; b=AEcP58yip4mkbZHPqGYZa/NmTyLdQxR3XuKCNJECn7tEkN4LeWRhMXsqmecECUIJDZ +na9Bja6T0Wmato+voJhqj1A2bPPzb55s1Lsmnf8Y9BBcvHfRMicltB+72H9ZltMDBvJ B+pN+yEAZFTVvW3AMdgFpL8f3lAufm8Oa58wN5bR5EhrDV1F67/3vJ/sT4RE90SOP4Zg +MJPHiS/attY1RM4jxt4oCO5FsA44gJp1SmZouvx95D/vQPO0GTJwDruRVDxalXoeJnw MpiqMOmiXJBh4ZihFw/46HnUtu9+1DH1R0JBV0684rq+YY9AsgH2mWgI5r0fJtWWtdOD CLjQ== X-Gm-Message-State: ACrzQf3E2T3qJfuWwIQ70ZFLx7vHblOoA1TVTnpA3WyEHLeGuBtsWwKj zsqc4mMGwvIwYCyGHKGRCInqHKimCtHxXQ== X-Received: by 2002:a17:90b:1b08:b0:20d:7bbf:4701 with SMTP id nu8-20020a17090b1b0800b0020d7bbf4701mr881615pjb.87.1665518019533; Tue, 11 Oct 2022 12:53:39 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id x6-20020a628606000000b005629b6a8b53sm9744924pfd.15.2022.10.11.12.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 12:53:39 -0700 (PDT) Date: Tue, 11 Oct 2022 19:53:35 +0000 From: Sean Christopherson To: isaku.yamahata@intel.com Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Thomas Gleixner , Marc Zyngier , Will Deacon , isaku.yamahata@gmail.com, Kai Huang , Chao Gao , Atish Patra , Shaokun Zhang , Daniel Lezcano , Huang Ying , Huacai Chen , Dave Hansen , Borislav Petkov , Yuan Yao Subject: Re: [PATCH v5 03/30] KVM: x86: Move check_processor_compatibility from init ops to runtime ops Message-ID: References: <82455a41cd39decdd1eb8765c37278aa78a3a72e.1663869838.git.isaku.yamahata@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82455a41cd39decdd1eb8765c37278aa78a3a72e.1663869838.git.isaku.yamahata@intel.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Thu, Sep 22, 2022, isaku.yamahata@intel.com wrote: > From: Chao Gao > > so that KVM can do compatibility checks on hotplugged CPUs. Drop __init > from check_processor_compatibility() and its callees. > > use a static_call() to invoke .check_processor_compatibility. > > Opportunistically rename {svm,vmx}_check_processor_compat to conform > to the naming convention of fields of kvm_x86_ops. > > Signed-off-by: Chao Gao > Reviewed-by: Sean Christopherson > Link: https://lore.kernel.org/r/20220216031528.92558-2-chao.gao@intel.com > Signed-off-by: Isaku Yamahata > Reviewed-by: Yuan Yao > --- > arch/x86/include/asm/kvm-x86-ops.h | 1 + > arch/x86/include/asm/kvm_host.h | 2 +- > arch/x86/kvm/svm/svm.c | 4 ++-- > arch/x86/kvm/vmx/vmx.c | 14 +++++++------- > arch/x86/kvm/x86.c | 3 +-- > 5 files changed, 12 insertions(+), 12 deletions(-) > > diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h > index 51f777071584..3bc45932e2d1 100644 > --- a/arch/x86/include/asm/kvm-x86-ops.h > +++ b/arch/x86/include/asm/kvm-x86-ops.h > @@ -129,6 +129,7 @@ KVM_X86_OP(msr_filter_changed) > KVM_X86_OP(complete_emulated_msr) > KVM_X86_OP(vcpu_deliver_sipi_vector) > KVM_X86_OP_OPTIONAL_RET0(vcpu_get_apicv_inhibit_reasons); > +KVM_X86_OP(check_processor_compatibility) Nit I missed in all previous versions: please add this new entry above "hardware_enable" so as to keep the order similar to the order in struct kvm_x86_ops. E.g. KVM_X86_OP(check_processor_compatibility) KVM_X86_OP(hardware_enable) ...