Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28318689rwd; Tue, 4 Jul 2023 17:31:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlGoDIASKltCq8xp+lVETlchqm2DY/BVGELhzHeRtkyrKNzJUVJpJsVObs+nM5LyJyxl+P08 X-Received: by 2002:a05:6a00:1392:b0:667:d0ff:6a0f with SMTP id t18-20020a056a00139200b00667d0ff6a0fmr1331786pfg.5.1688517104782; Tue, 04 Jul 2023 17:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688517104; cv=none; d=google.com; s=arc-20160816; b=eTuPbBe+l6clm+tluI5mA7zwNqBczQlaRLtuiHIqJAv/5xgb4e572WfQfERnv5FDQ8 Y6iTwhSyHjHq073KZWat0Iai0yh8pBK9nlDUoaJk287d/OMqvzvA2jI2Fa4zMkA96Bnf AgUSrTX5Kz+vGsiyg9pgwh1+TUDHNAySbOMtIXTQFxgLguaGbCHUno+HIhXhLotnlMYJ Lo+vyfUI9ebssbcAoXSI+d7IJVdQbFmrFVjaaGDuAfWCfMA5RSEDJLGQdITXrKsCIO4+ taaf36PVkolswUqFD53W2eurJgJ9fZ3dWPnHAOexcqklH39r2tr2doYEgUrm4gsoekKF iuIg== 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=4PCpsOElklGvTmmWH0OQRonwleLOQrzWZC/RGYQTYPQ=; fh=TstZmECAHWuiHcOzBTznBis8cUiYYD7m507pTr8673Q=; b=w3untMr7ztUrdGKuZOYzB2BKuemPR6qhkjb6CAWeBtWl1knY5N+pL8BccUyNxf0Mv/ NnLdKP10vMzddSDX0WGvNE/JwqX0g0spVosJgyutQwZ66eyjgldQBwZpE3dNAQSm8wsW 8l7+ejaLo8Xv4kpE4DWs0uo0MizLZvLcPbiXek8gFcW7jkxSdcu6kn7YKw8XMO6Y8pLU 8DOVcNPpIdzY6f7lIPIgcVGV9YwScVRmuJeH0LwNhhJmmcBEiWtn/d69wfC1YRX/B8cE /PByt37Ic/1VvwUCEMqyns5geV5J9awPTuQosQpaMIqcXIu3ue2BvKeGPqtXNrlPmEP/ WZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vk17hLkY; 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 t40-20020a056a0013a800b00682b0b7ed43si1482344pfg.368.2023.07.04.17.31.23; Tue, 04 Jul 2023 17:31:44 -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=Vk17hLkY; 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 S231424AbjGDXYI (ORCPT + 99 others); Tue, 4 Jul 2023 19:24:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjGDXYG (ORCPT ); Tue, 4 Jul 2023 19:24:06 -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 1BA7E10E2 for ; Tue, 4 Jul 2023 16:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688512999; 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=4PCpsOElklGvTmmWH0OQRonwleLOQrzWZC/RGYQTYPQ=; b=Vk17hLkYP+wOQPkcJOBZCYcxM/zpqLXnZtwEu/Ecx0hG/BqHefzFbo4JCQPZp0YVyJciBa bq+qQOMUYoj/4VirRnbR7zCIK/XADcmsJl1/mn/bosmgrSQuDLD7leihWO80znhUa6b6Ov pzRWYIR1riBHnAWEEFPvB1VYUcMbqLc= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-P1tMU-iMM7Kwj1OOnXFyJA-1; Tue, 04 Jul 2023 19:23:17 -0400 X-MC-Unique: P1tMU-iMM7Kwj1OOnXFyJA-1 Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-66a44bf4651so156402b3a.1 for ; Tue, 04 Jul 2023 16:23:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688512997; x=1691104997; 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=4PCpsOElklGvTmmWH0OQRonwleLOQrzWZC/RGYQTYPQ=; b=hTog9wXhW9eCytsuNfdeDK0Z415I3VKWvbiPJhQKiIAdXdo22BnMbhb/uzb+jP3zYl VyoWNSwd9lNc8H71uvkvfvq85SMxMkQND5tuUTF0a9Xu9Hm2o/tTIHinPJweZmG2lUQK 2V4jI/2gZ9DRZFgMLie4N83gQWl1593DEPQpWznIn6EDlFwfRoqXiWF/NNcYWkHXKqRn eBFvNGqOpzQAfz15BlF01I6spGuN8uU7NE0tgTg+2weuuk8j9BqPbgEOLNqzZa3UWuHU Yy6umXGdERwgLeCS6MR726+8vk0Lb4MWhV1LjkBnivZ+9lov9CemyvCwYQSEt+gkwghn dRgw== X-Gm-Message-State: ABy/qLbn3dC4+dgM1dBdzqh0Mz4utsrKxGGD3AoHNJ9PbZwyzA20fTKv uSn+lLLlRaLYwqUmiUGK7VTRGdKblqnJ9y91qAFcfKnMQZVQX7ivVvSmDBCp8b7HqOYQswtL9tb HhMKOtaZUH6u/iuDcfgoyj8pr X-Received: by 2002:a05:6a00:1ca9:b0:682:5e8f:d8ba with SMTP id y41-20020a056a001ca900b006825e8fd8bamr724733pfw.11.1688512996827; Tue, 04 Jul 2023 16:23:16 -0700 (PDT) X-Received: by 2002:a05:6a00:1ca9:b0:682:5e8f:d8ba with SMTP id y41-20020a056a001ca900b006825e8fd8bamr724711pfw.11.1688512996441; Tue, 04 Jul 2023 16:23:16 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id bn10-20020a056a00324a00b0065980654baasm16109591pfb.130.2023.07.04.16.23.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jul 2023 16:23:15 -0700 (PDT) Message-ID: Date: Wed, 5 Jul 2023 09:23:05 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [RESEND PATCH v5 01/11] KVM: Rename kvm_arch_flush_remote_tlb() to kvm_arch_flush_remote_tlbs() 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 , Colton Lewis , David Matlack , 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: <20230621175002.2832640-1-rananta@google.com> <20230621175002.2832640-2-rananta@google.com> From: Gavin Shan In-Reply-To: <20230621175002.2832640-2-rananta@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 6/22/23 03:49, Raghavendra Rao Ananta wrote: > From: David Matlack > > Rename kvm_arch_flush_remote_tlb() and the associated macro > __KVM_HAVE_ARCH_FLUSH_REMOTE_TLB to kvm_arch_flush_remote_tlbs() and > __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS respectively. > > Making the name plural matches kvm_flush_remote_tlbs() and makes it more > clear that this function can affect more than one remote TLB. > > No functional change intended. > > Signed-off-by: David Matlack > Signed-off-by: Raghavendra Rao Ananta > --- > arch/mips/include/asm/kvm_host.h | 4 ++-- > arch/mips/kvm/mips.c | 2 +- > arch/x86/include/asm/kvm_host.h | 4 ++-- > include/linux/kvm_host.h | 4 ++-- > virt/kvm/kvm_main.c | 2 +- > 5 files changed, 8 insertions(+), 8 deletions(-) > Reviewed-by: Gavin Shan > diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h > index 957121a495f0b..1473cf923ee37 100644 > --- a/arch/mips/include/asm/kvm_host.h > +++ b/arch/mips/include/asm/kvm_host.h > @@ -896,7 +896,7 @@ static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} > 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_TLB > -int kvm_arch_flush_remote_tlb(struct kvm *kvm); > +#define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS > +int kvm_arch_flush_remote_tlbs(struct kvm *kvm); > > #endif /* __MIPS_KVM_HOST_H__ */ > diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c > index 884be4ef99dc1..6e34bbe244462 100644 > --- a/arch/mips/kvm/mips.c > +++ b/arch/mips/kvm/mips.c > @@ -981,7 +981,7 @@ void kvm_arch_sync_dirty_log(struct kvm *kvm, struct kvm_memory_slot *memslot) > > } > > -int kvm_arch_flush_remote_tlb(struct kvm *kvm) > +int kvm_arch_flush_remote_tlbs(struct kvm *kvm) > { > kvm_mips_callbacks->prepare_flush_shadow(kvm); > return 1; > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index fb9d1f2d6136c..f6e3aa617d8b8 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -1794,8 +1794,8 @@ static inline struct kvm *kvm_arch_alloc_vm(void) > #define __KVM_HAVE_ARCH_VM_FREE > void kvm_arch_free_vm(struct kvm *kvm); > > -#define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLB > -static inline int kvm_arch_flush_remote_tlb(struct kvm *kvm) > +#define __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS > +static inline int kvm_arch_flush_remote_tlbs(struct kvm *kvm) > { > if (kvm_x86_ops.flush_remote_tlbs && > !static_call(kvm_x86_flush_remote_tlbs)(kvm)) > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 0e571e973bc28..95c3e364f24b4 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1477,8 +1477,8 @@ static inline void kvm_arch_free_vm(struct kvm *kvm) > } > #endif > > -#ifndef __KVM_HAVE_ARCH_FLUSH_REMOTE_TLB > -static inline int kvm_arch_flush_remote_tlb(struct kvm *kvm) > +#ifndef __KVM_HAVE_ARCH_FLUSH_REMOTE_TLBS > +static inline int kvm_arch_flush_remote_tlbs(struct kvm *kvm) > { > return -ENOTSUPP; > } > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index cb5c13eee1936..a475ff9ef156d 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -366,7 +366,7 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) > * kvm_make_all_cpus_request() reads vcpu->mode. We reuse that > * barrier here. > */ > - if (!kvm_arch_flush_remote_tlb(kvm) > + if (!kvm_arch_flush_remote_tlbs(kvm) > || kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) > ++kvm->stat.generic.remote_tlb_flush; > }