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 266E9C001B0 for ; Mon, 17 Jul 2023 11:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjGQLH1 (ORCPT ); Mon, 17 Jul 2023 07:07:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230386AbjGQLHO (ORCPT ); Mon, 17 Jul 2023 07:07:14 -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 2DEB51B9 for ; Mon, 17 Jul 2023 04:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689591987; 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=VGOOqLavhEXg7lyDpvUW6ICkPL0LfcVFnu070bLPGDE=; b=ii5CKAXv00BKMVqd4j9IefrnwfGzba4CF0TNt6gS2XU+LL+mwKVZzGH3dFRqwL5S0PxYyh PJpd+cTWqt80PIdv9NGkePDmjAVF0XYdDYwHkXx0iglcI+/K38q4az/1xnMOBHDVslFQlj ApKpqMMQpAG0av1swU8hvoV7mC7G6ko= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-294-dlbb_WhWMfySvEIro5eNIA-1; Mon, 17 Jul 2023 07:06:26 -0400 X-MC-Unique: dlbb_WhWMfySvEIro5eNIA-1 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7672918d8a4so104593285a.0 for ; Mon, 17 Jul 2023 04:06:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689591986; x=1692183986; 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=VGOOqLavhEXg7lyDpvUW6ICkPL0LfcVFnu070bLPGDE=; b=RDtIlE3km/btZ9uX70NBBKg77/J1B0Pfd2L0NxTDQuv67tO639Ms9MiTg9CfoMoNic 6VI60sfk9ZQr5L/YpBNtQvuC27Qgr1SNvSz5Atyg1r6ZiZI33UozPKm3F3dZXVTKpLOI oBL0txJd1epXm81/+e7gRFa/GtEiCTvLjFXFbVTyDzSdROJRpM3aHiEVGnZPrvvOUwga VbIbugaEA+cZj7E2KEtGqFcrFyllFd2+2kFCw5qflYDt6KdgypkSI+j1HTFPwW7CKmyZ vLYt68Wvnbkd1JRvVsTFTwUX5rU4EiOM9Gz0vLPmvZc5iG9SMu1hG5nqSRAFTtnViywx 9f8g== X-Gm-Message-State: ABy/qLaCKHXPyBDdky7ug9sBCXiEfEKjIPQJiccbptBp2KFALpEf33hm lt+xypR3ZRFkmdXj8Ly0Koz70qgml/yyEoUoUMpRNeT0XYn1TWHf0j+YxtgPM3HmoXlsmlbG4LP 8pizx/RlEQvPDopvXylrRuj+2 X-Received: by 2002:ad4:4eea:0:b0:634:cdae:9941 with SMTP id dv10-20020ad44eea000000b00634cdae9941mr6281508qvb.0.1689591985899; Mon, 17 Jul 2023 04:06:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlHPP9caNhe5hJZM2GlWhiygfmGOQVyjdcW0NBVwh6GDivJx65xNuv4iB/a90XMh51kWdiueww== X-Received: by 2002:ad4:4eea:0:b0:634:cdae:9941 with SMTP id dv10-20020ad44eea000000b00634cdae9941mr6281491qvb.0.1689591985670; Mon, 17 Jul 2023 04:06:25 -0700 (PDT) Received: from [10.66.61.39] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id x26-20020a0ca89a000000b00621268e14efsm6363454qva.55.2023.07.17.04.06.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jul 2023 04:06:25 -0700 (PDT) Message-ID: <4f465d66-baa3-88bc-86f5-d88cc0a73441@redhat.com> Date: Mon, 17 Jul 2023 19:06:09 +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 v6 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, Gavin Shan References: <20230715005405.3689586-1-rananta@google.com> <20230715005405.3689586-2-rananta@google.com> From: Shaoqin Huang In-Reply-To: <20230715005405.3689586-2-rananta@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/15/23 08:53, 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 > Reviewed-by: Gavin Shan Reviewed-by: Shaoqin Huang > --- > 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(-) > > diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h > index 04cedf9f8811..9b0ad8f3bf32 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 aa5583a7b05b..4b7bc39a4173 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 28bd38303d70..a2d3cfc2eb75 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 9d3ac7720da9..e3f968b38ae9 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1479,8 +1479,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 dfbaafbe3a00..70e5479797ac 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -361,7 +361,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; > } -- Shaoqin