Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp762481rdg; Thu, 10 Aug 2023 20:53:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3p1Kk43aXqTf0pLHA8+0cPq1wZ0H9AmO8J+QIkw4qy8S3aqmyFx84OuvWus2HijXzta9h X-Received: by 2002:a17:902:b58f:b0:1bb:ed06:72da with SMTP id a15-20020a170902b58f00b001bbed0672damr755564pls.14.1691726003888; Thu, 10 Aug 2023 20:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691726003; cv=none; d=google.com; s=arc-20160816; b=iDUNOWGy3sBTDWEYC6u8+Uk0j2my9rAsiHI+jBF00t13/s0PW/IjFEjRPFfwQKR13Y vuWCollYxDV5T/RxMXGzOzd8JWGg4zED4mFzk+mPMj0JBNNS2XB/s4Qy1+mtuo+tN9Ik u3mv7qNOjy6g/OVxQ288kxJ9jNU8Lr0EvhZvre2fX4xd7KRCvNznAZgPRqfGpORWjj0I KpIojh7HuWQ7bKrEW/RWaMn6OrySsWBHO0HPiO4hfxglzVu5auB61ibOQCGga7HUxWZL 7nAop1BFMfxGvjGxU+kG0cXDD48gh071IluphreplbAJsJfwIqEooQLr7WrHv+xOyadc nIGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PiI+QsxMTBs9vA9vlC+ZyswANJfDDGFtsPp4BYCBVbg=; fh=W+GvHaBtCOT/un8p40EbpT798FhOd1y6QWSiqqHdwDE=; b=LU+PuQBaDGhWNxWQLl5ZKc+oeLZ9Eac1Amr/y3yNU4XGS006legVVoQ1yB1tl/FEEk l37zFmuxd01fIC3yUY3X4eu6E8yr49tCxUrE2GoVG2hXq6ipwVsd80ZxvIOgtUti40Dt tTYPlyCsKFUV2cPB7d73YvsmPMGF8JX5U80+EZe3Sg2sq2SOWH4Udzzjxh8KF7lTd/XT ujqAvepvag4FBI6j13xEr6FOI5SSpSBUwKuob/7YLO7ERjFvxI6Na4p2xnrhmHXSCfLk PBIqn7/TPvGAwtFmNLRg1QNqHij65MIJfj9HjfQoch6grXYA5cIJyP7PUtnuIc1I4+DI Qvqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=StEEFzzG; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a170902d2c700b001b3c7e6a8c0si2722051plc.531.2023.08.10.20.53.11; Thu, 10 Aug 2023 20:53: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=@redhat.com header.s=mimecast20190719 header.b=StEEFzzG; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbjHKDTV (ORCPT + 99 others); Thu, 10 Aug 2023 23:19:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbjHKDTU (ORCPT ); Thu, 10 Aug 2023 23:19:20 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D202C2D66 for ; Thu, 10 Aug 2023 20:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691723913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PiI+QsxMTBs9vA9vlC+ZyswANJfDDGFtsPp4BYCBVbg=; b=StEEFzzG3862GLAF7SiQthLuoO7p7Aio1jiXwNF1oFey2icr81eEA4461RMWpaLYR2sFRY tByJwjf7OxT1nzkSe4gdQ24NL4U3mOPHV6vu7uHPhVogz94p99jPp1sqmE/OHLX0B+zcfu RHVa9uWgE3J63dhpcEQE8jeFwVSTEhI= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-392-9CVVLtxYOXiLJkqWlG1yrw-1; Thu, 10 Aug 2023 23:18:31 -0400 X-MC-Unique: 9CVVLtxYOXiLJkqWlG1yrw-1 Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-563de65ac5dso306028a12.1 for ; Thu, 10 Aug 2023 20:18:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691723910; x=1692328710; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PiI+QsxMTBs9vA9vlC+ZyswANJfDDGFtsPp4BYCBVbg=; b=l1OoyjXlsWj8418IGlicD+XdObZgB8D+tr9q8VwqPBrolhmMCruNRi/emrBGUNLJaz y5sCmJwsZq2JoK4HUi05PHZ3slP/WtLqsqaIh0DxuPa6+CxRAFpqyj93badLZR7o9LW7 mX7fJAFznSeMUOA1DiZY0Z6jlDdnmHpYN627IuqQ0Z10d8a2wcEsLp4M81N+/9C1Gct8 oFikC0e5KDz2QvUFzUvLs3qHTO2qOfor0Rzp2VK0miTYix8/BM8Iinlo87tO7Kiqvgh/ hVkE22yzlnuIZzoEkNsS766LRI0HAyvwXphVg4O43dEFUYk4r5Xa7y23dj8zCW/2YBoZ kJxQ== X-Gm-Message-State: AOJu0YwYBNqEDzhPx8w/TBftYo5aH6rT4pYAxBmHLdbYjttDjXuntURq MafOtMfVXg5XAAtsJGbFE1bPTeeQYUUqerumBpN5jKyU6F/Pr+15BEzq8oUl154/l8e0bv60E0x 7EE37LmIkEVeye+TrLsNRVX6H X-Received: by 2002:a17:903:11c8:b0:1b8:17e8:547e with SMTP id q8-20020a17090311c800b001b817e8547emr828116plh.1.1691723910725; Thu, 10 Aug 2023 20:18:30 -0700 (PDT) X-Received: by 2002:a17:903:11c8:b0:1b8:17e8:547e with SMTP id q8-20020a17090311c800b001b817e8547emr828095plh.1.1691723910468; Thu, 10 Aug 2023 20:18:30 -0700 (PDT) Received: from [10.72.112.92] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id q22-20020a170902b11600b001bb24cb9a40sm2547142plr.39.2023.08.10.20.18.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Aug 2023 20:18:30 -0700 (PDT) Message-ID: <60d1a498-2815-2465-ccc9-e4464791a3fb@redhat.com> Date: Fri, 11 Aug 2023 11:18:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v8 02/14] KVM: Declare kvm_arch_flush_remote_tlbs() globally Content-Language: en-US To: Raghavendra Rao Ananta , Oliver Upton , Marc Zyngier , James Morse , Suzuki K Poulose Cc: Paolo Bonzini , Sean Christopherson , Huacai Chen , Zenghui Yu , Anup Patel , Atish Patra , Jing Zhang , Reiji Watanabe , Colton Lewis , David Matlack , Fuad Tabba , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20230808231330.3855936-1-rananta@google.com> <20230808231330.3855936-3-rananta@google.com> From: Shaoqin Huang In-Reply-To: <20230808231330.3855936-3-rananta@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE 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 8/9/23 07:13, Raghavendra Rao Ananta wrote: > There's no reason for the architectures to declare > kvm_arch_flush_remote_tlbs() in their own headers. Hence to > avoid this duplication, make the declaration global, leaving > the architectures to define only __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS > as needed. > > Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Shaoqin Huang > --- > arch/mips/include/asm/kvm_host.h | 1 - > include/linux/kvm_host.h | 2 ++ > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h > index 9b0ad8f3bf327..54a85f1d4f2c8 100644 > --- a/arch/mips/include/asm/kvm_host.h > +++ b/arch/mips/include/asm/kvm_host.h > @@ -897,6 +897,5 @@ static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {} > static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {} > > #define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS > -int kvm_arch_flush_remote_tlbs(struct kvm *kvm); > > #endif /* __MIPS_KVM_HOST_H__ */ > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index e3f968b38ae97..ade5d4500c2ce 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1484,6 +1484,8 @@ static inline int kvm_arch_flush_remote_tlbs(struct kvm *kvm) > { > return -ENOTSUPP; > } > +#else > +int kvm_arch_flush_remote_tlbs(struct kvm *kvm); > #endif > > #ifdef __KVM_HAVE_ARCH_NONCOHERENT_DMA -- Shaoqin