Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1228180rwn; Thu, 8 Sep 2022 15:55:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR5WiggWtmwnRQuZIWe+kGw5HBXUxS0nZA/Yho0vgqG6U1+UgIUJUZODIXJjUgI2jjaGbiLh X-Received: by 2002:a17:90b:1d92:b0:202:641c:495a with SMTP id pf18-20020a17090b1d9200b00202641c495amr6499511pjb.121.1662677723067; Thu, 08 Sep 2022 15:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662677723; cv=none; d=google.com; s=arc-20160816; b=vcKnOMg2Xp1qwiyn7XK2PDoOGToxGtCxe7MNJQiTMsCqpfvMafi7Zx5HeE6XIHJFB3 uygHjBZemXGuMaDgGFg+jtykqpd3E/0HE4VzhsGA4xiZ+wuUycIEWSvOYjINj/mszfIu uz75L+Cg/msudpn0h2u006SLIk4RM7a0yfAeXIr6uWxh+IrbHLHcD8enkp5NywG/2T09 mUNPVSn8gV2cZDQXtnqYlG6pVcfT2h5jVfPX7DY4emzhLvOrwW55J67tTYbcLhxYpAEo ZIURI6cBXVeLJJbB/4FBxjFWZ/vv+jw5W8hwS9UUEuqhjx70vrM4jUqY7MR7KATzzS/+ jUig== 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=CnESWA6fsAdGXDSQptdGme5NPrDdOdeMs87qWYCmLhE=; b=UCeKFUl1SZsjdpMqaEQb85Iy9yYuP3+5gQcJ5ck82WqQ9vRDpP9a/564nPHroQBCiY 1My7iYNqYhPUFnWAl0U2nnZqrvqm3FdHO3Wnkj52qtWes7x4KKyqUYEZVX4weiPAP/6f x48uBx+7QftHM7LXRVYoeon57XWjCL/XSTF6a935qzGTzY59l6Rg/lIad7cqxOyeX9oK vK7BymZM5WOU/9N0MR3RA+E86TeVkT7J4f7l2iAg6Hkp8q8+aXK7MivPVBGs4LK6Hx6Y CLciddx6GCJajtvIKAdvNnmffp4UaSzT3X6Y5oIEIX5ZSuOrllMsWGatHqBL4QCPWXXK /ivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=c9GvSTrT; 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 a38-20020a056a001d2600b0053a81f65dd3si412732pfx.287.2022.09.08.15.55.10; Thu, 08 Sep 2022 15:55:23 -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=c9GvSTrT; 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 S229819AbiIHWvT (ORCPT + 99 others); Thu, 8 Sep 2022 18:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiIHWvR (ORCPT ); Thu, 8 Sep 2022 18:51:17 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDE2BEC74A; Thu, 8 Sep 2022 15:51:16 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id p1-20020a17090a2d8100b0020040a3f75eso3953818pjd.4; Thu, 08 Sep 2022 15:51:16 -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=CnESWA6fsAdGXDSQptdGme5NPrDdOdeMs87qWYCmLhE=; b=c9GvSTrTiZqRy8QQYuYf2XwWsx8hBewT8BH2kerCOXnnzzQK/GAz90GJ4dDX/z7TG2 dyMb/H3mthqDGnZMfgHoKeYJ36Ii1YmOWlZdB8Tpzn8IcvFlukc6MDccBaTI8Lb9IY6O E4Uf6SpmjklH95+vfws3GIH9i5zOhOUCeYpz3eBlBFKpu/T0Yt/slSgchVyR2Kmzd3Dj /7qrz+CCMJr9EIss4JNuWqyVbt4iNyA4PU4BtlerK1y3c6/mibOd2vUWDlXgwrhSBEYF bRE5qfFUBEEO5jkxQEouMHtHdPaYlFdvCMUZhpraRjGVEuVoJK1ma6LKwmlRLN3YiXNL Tgpw== 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=CnESWA6fsAdGXDSQptdGme5NPrDdOdeMs87qWYCmLhE=; b=HpdhZ8H225YgryuJXp549UdVgdEo/kLyw09t8bdn/12t+R978xi7c8VptuJ7KYkxhO ykSa/tM87tcHn2QLqHuv6KVsPpoY9mRxeoElQ8nqDeQnjez7T9whRfoCGi5Jmp8kkx+B AsqDsfcWdJQ8+jDE5u4b7azFtmToEArTfkQDmEylS1s7T0JF7GiGlK7k3beswzbEUGNw i5MAALiIAy/TbQEc7hirSSrzc0EFFgpkbYqGrC8+OwYuSp//vC+TUtuhLJTEOMCtZtfn AlKg53k+xE2mpD/7Gsptypg4JhvIfu+2mGS8P+ivCniGXSjBjvYCd9XPzelZUGvK5WME x+VQ== X-Gm-Message-State: ACgBeo0ozE7hJPu64Ir0jmHFvvbhCVT+JA3MLTFZHZ6m/OiBYeB3PwbQ T70PcI+txAjN8SmV8jp14pw= X-Received: by 2002:a17:902:e94c:b0:171:3d5d:2d00 with SMTP id b12-20020a170902e94c00b001713d5d2d00mr10750372pll.2.1662677476138; Thu, 08 Sep 2022 15:51:16 -0700 (PDT) Received: from localhost ([192.55.55.56]) by smtp.gmail.com with ESMTPSA id x186-20020a6286c3000000b00540dd926464sm149546pfd.31.2022.09.08.15.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 15:51:15 -0700 (PDT) Date: Thu, 8 Sep 2022 15:51:13 -0700 From: Isaku Yamahata To: Yuan Yao Cc: isaku.yamahata@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Thomas Gleixner , Marc Zyngier , Will Deacon , isaku.yamahata@gmail.com, Kai Huang , Chao Gao , Atish Patra , Shaokun Zhang , Qi Liu , John Garry , Daniel Lezcano , Huang Ying , Huacai Chen , Dave Hansen , Borislav Petkov Subject: Re: [PATCH v3 16/22] KVM: kvm_arch.c: Remove a global variable, hardware_enable_failed Message-ID: <20220908225113.GA680494@ls.amr.corp.intel.com> References: <91715ddc16f001bf2b76f68b57ebd59092b40591.1662084396.git.isaku.yamahata@intel.com> <20220907055657.y7dcseig2qvjue6t@yy-desk-7060> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220907055657.y7dcseig2qvjue6t@yy-desk-7060> 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 Wed, Sep 07, 2022 at 01:56:57PM +0800, Yuan Yao wrote: > > +static void hardware_enable(void *arg) > > +{ > > + atomic_t *failed = arg; > > + > > + if (__hardware_enable((void *)__func__)) > > + atomic_inc(failed); > > } > > A side effect: The actual caller_name information introduced in Patch > 3 for hardware_enable() is lost. I tend to keep the information, but > depends on you and other guys. :-) That's true. But only kvm_arch_add_vm() calls hardware_enable() and other call sites are converted to call __hardware_enable(). There is no confusion with other callers with this patch series. So I decided not to bother to pass function name in addition to a failed counter. -- Isaku Yamahata