Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp3756631rwn; Sat, 10 Sep 2022 20:09:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR6aDKjViU/vjSsinxakIo2K7/GGIXShaHVIAb+ev4Gcjmz4d+rewoZ0EZqXY4x3ItXk7eas X-Received: by 2002:a05:6402:1f89:b0:44e:798b:75c6 with SMTP id c9-20020a0564021f8900b0044e798b75c6mr17227755edc.407.1662865766339; Sat, 10 Sep 2022 20:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662865766; cv=none; d=google.com; s=arc-20160816; b=INYbuOlDzNHz1M+ZVfWsBMqlMco8avinbfbtLrPgaUi1j5Lv0tfo5W46Fbxjk91k89 LheTrJ/Xc1V9JEVLe+N5KvCdBMcuyoUKFwtmWZpQcsAzabnkeXi/xAYgLY1deE78WeOz SXRyses3Lm6b9bvcHyCjAMDx2Bt4JdD+nzl4FTt+ukC+HTYhHT5NBsd+Kq3wsB43Mkwt IK3IH6/GcfNxAMBEgofLPAHWLnfUMQlESZDeSLJMGePDUR93DMeQ/Sg9qQ2RYYgQpIpQ Kk5GSJW3S8ELSJvRulMkqrl7k9rqLZPhZVN85mhTvGCef+UGn8aYlK2yDi+ZWQ9DUh7e GTFw== 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=vZI0secSgQDVrrZ+hFN1G6qYcS6FtuxhXb5Cw3ioq1o=; b=y87YxlQw3CVu04X5OT3Ng8venMSZDx9cUOdUiEQNxw1tDjRmimL4Z8dxj7RgVWIuMF CCIMWBOhQjQZL9m3ImmFTbmsWYehp6b5sbU6LAlSAdQZEaslqM4mPXDuIxxxQbf3eTGl x9rSlzwcSwvY6QcwI8XJ+83fy68FdNZWjLyVy6fAnnxuRi79YG9XxOJnpDPijVSOTugZ szjoXbamE0KsIwteVIHfcJUw9hdK+5H7dD30imvhnvPeCTzdzQ0/bsq3QGBqVIT3zpMS 0yqevNSVlA/3G2mKZgQtEFSn3d7rwDnb+myJtXQs/nu5dsXNk5lLwQxb6dvQvMioz4JY 453Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dk1lGuiT; 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 l27-20020a17090612db00b0073dd47c3873si4056893ejb.878.2022.09.10.20.08.57; Sat, 10 Sep 2022 20:09:26 -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=dk1lGuiT; 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 S229845AbiIKDBB (ORCPT + 99 others); Sat, 10 Sep 2022 23:01:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbiIKDA6 (ORCPT ); Sat, 10 Sep 2022 23:00:58 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B963BC60; Sat, 10 Sep 2022 20:00:55 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id t65so5169914pgt.2; Sat, 10 Sep 2022 20:00:54 -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:subject:date; bh=vZI0secSgQDVrrZ+hFN1G6qYcS6FtuxhXb5Cw3ioq1o=; b=dk1lGuiTcpQkGUNntG9Ljl+sZo+KHgQKWbcIIqKqHjGHIY5LFa2xj33wcqM9KAM8q8 hekmOJSYNqkJyN3vguQH8UvIhfiQiwR9rW0WmbKhz1sOQzQlqoMoiIdCr0jcOvjUcCuy OEpl+YIaozB0WSnHtk9iv2hcGbt200V+lwUpRBS8ESk4FWVDKrsi/WDnSuhsAaQUujsz 4nK2skcdPuKDQXy/DYMPe6wKwEQ7nWjN6otX+nI+JINecX1JR7YcNGP1cqGBLsqcMU4l Kz4Ley6Nod17cNGGniCkhwyqDfNyAHMkTtJ4YDWAyCn5P/cXk4LyZCx2VYJPDtJIjvGI tDnw== 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; bh=vZI0secSgQDVrrZ+hFN1G6qYcS6FtuxhXb5Cw3ioq1o=; b=0/9r5Z51eQ7xwRcTQ9y+POu0VsyirWBMaPg5ao25DIrRrq+uuv+wZlEfnti6IjAbe7 4rXQM82SuW8B5IqnFvPk9yDueUyPz7f3GgtoRALMHdDxkT3EQs97K/gPz9iPhf1FvqFg rLaJj/H4oN9dNuvRq2mSzvQgUScIhcS/sbMkUfNnl0+4j6ejYSE6xXZ2fIsHIhCCx5+j okXHw6qFcA93VZoRdRJ67ecE6ToJ/yPGgnHZjZZGTHTlMQDyDWK9SRYGKSO41AxR9n+R 6TlaYqSj0/oX2Jiei+seTlLK6zKk8zYW/J4wEMMDTv1uNuNx5a9XVT8ZqyVP6MJ5f77c MkQQ== X-Gm-Message-State: ACgBeo2nPJgLxJK6uAStnafRyEuCdh9a3m5FT+LP/1DUZK9xBlbMHPaM sqoZbqV2eNAHe0S2lqS4770= X-Received: by 2002:a63:2cc2:0:b0:41c:681d:60d2 with SMTP id s185-20020a632cc2000000b0041c681d60d2mr17565592pgs.502.1662865254401; Sat, 10 Sep 2022 20:00:54 -0700 (PDT) Received: from localhost ([192.55.55.56]) by smtp.gmail.com with ESMTPSA id d8-20020a170902654800b0016d295888e3sm2951367pln.241.2022.09.10.20.00.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Sep 2022 20:00:53 -0700 (PDT) Date: Sat, 10 Sep 2022 20:00:52 -0700 From: Isaku Yamahata To: Chao Gao Cc: isaku.yamahata@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Marc Zyngier , Will Deacon , Yuan Yao , isaku.yamahata@gmail.com, Kai Huang , Atish Patra , Shaokun Zhang , Qi Liu , John Garry , Daniel Lezcano , Huang Ying , Huacai Chen Subject: Re: [PATCH v4 16/26] KVM: kvm_arch.c: Remove a global variable, hardware_enable_failed Message-ID: <20220911030052.GB873583@ls.amr.corp.intel.com> References: <60ca73d7d931ec8046ac50b20f05723a97ef643b.1662679124.git.isaku.yamahata@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 Fri, Sep 09, 2022 at 02:54:05PM +0800, Chao Gao wrote: > >diff --git a/virt/kvm/kvm_arch.c b/virt/kvm/kvm_arch.c > >index 4fe16e8ef2e5..ad23537ebe3b 100644 > >--- a/virt/kvm/kvm_arch.c > >+++ b/virt/kvm/kvm_arch.c > >@@ -13,14 +13,13 @@ > > #include > > > > static cpumask_t cpus_hardware_enabled = CPU_MASK_NONE; > >-static atomic_t hardware_enable_failed; > > > > __weak int kvm_arch_post_init_vm(struct kvm *kvm) > > { > > return 0; > > } > > > >-static void hardware_enable(void *caller_name) > >+static int __hardware_enable(void *caller_name) > > nit: caller_name can be dropped and use __builtin_return_address(0) instead. Do you want to update your patch "KVM: Provide more information in kernel log if hardware enabling fails"? -- Isaku Yamahata