From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D2CCC433F5 for ; Tue, 11 Oct 2022 19:53:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbiJKTxu (ORCPT ); Tue, 11 Oct 2022 15:53:50 -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-Google-Smtp-Source: AMsMyM5mDG37X/LUkK2IJv0l3Ao0MyE1gBDWewqQmfyvUQqBeSdGUycE1fnfGPaslQRj09zOXZ1H8w== 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> 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) ...