Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp339712rwb; Fri, 4 Aug 2023 13:41:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3WOTO4p4ngAeTC5imkSwS/tbCf6IN3Y1Uv5gstwnCFYtM3QTO0gnRdXBW4p7/RtWNOPiM X-Received: by 2002:a17:90a:e605:b0:269:18f5:683e with SMTP id j5-20020a17090ae60500b0026918f5683emr2556451pjy.3.1691181708802; Fri, 04 Aug 2023 13:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691181708; cv=none; d=google.com; s=arc-20160816; b=aaFyxSNPBHLNhSGC4zMCAnqgcpfVI/2mRAI/N2LaWZIZnp239JljnklMYxQzbYWTU5 dNW4F9+H8Dga/GTe/Eezz442ccHNm16eUC+1SLzTexXtQ1dNloE7a5k2AWm0J+9CB44v g9VRtkvsxpd4QUd3lcHWWFXvtS0uHVDgzS2B2dUyuwua5zMEF3tEjclpMZvsrvw6Qq+P EN6ZJ5HulFkOmTxffq/whqigc7JM5VMtif866lcHhfV8Ws9RYqIqbe/gtqhCDL9XzwXM o/GV36RGQM8asmAd4CngSaP4SO9WmD5kNqJIEWLO/PbHomrYcqwmkm6+FRGtdzYN4PGy bvLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Mfl7UJxUbxuUeTFoCKSsO/YqaEDE5S858pqTp5fgS00=; fh=BDJJtXEa2aa9J5FOJKfIOwlVszT1b6YenyWZpxr0ylA=; b=V6Q6NXtUgWc87cv+Ziw0V2gMHnrT1a42ZikJJQxQLilrGsP1+xt+VuZUvkadoKaojc 2rEikZKPUWctF2s9qOe+lTdzHL+c/1azxyTvYHyELSkOo8XhMytu7HuGc7mmJpEzndOj 5SiCYSzsijO8AQuM/G7bzXVSdmJC5M8pYcXjhpjK/nBUJoxQWoM26JFDWsy1Z+6/soI0 AfLqxsoWupGUJm/K3xXqqsGVQkqQxzIwm0WEjou2mEos7sV0j2btO1xbkN8KoHLJxSCP oE06EReAZQngUUi52AR5iwpB9k0ZCltPpq1hYY3JnSbyiaAJhlytivyliPPEk1v70gM/ rbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=uCBp75tL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o2-20020a17090aac0200b0025359a570fesi1216333pjq.19.2023.08.04.13.41.35; Fri, 04 Aug 2023 13:41:48 -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=@google.com header.s=20221208 header.b=uCBp75tL; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjHDSTT (ORCPT + 99 others); Fri, 4 Aug 2023 14:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjHDSTQ (ORCPT ); Fri, 4 Aug 2023 14:19:16 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA09149D7 for ; Fri, 4 Aug 2023 11:19:14 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1bc0075ab7aso18195ad.1 for ; Fri, 04 Aug 2023 11:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691173154; x=1691777954; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Mfl7UJxUbxuUeTFoCKSsO/YqaEDE5S858pqTp5fgS00=; b=uCBp75tLHriee//ikoqX2p7GjimbkirtfpIc8u1w4o4rJ5LjqEB3KYoXAiKiKEJ1MF DotbslqYm5Nhe3DYQsDTksQT7Her1ubNthHRWCzWT4FlTQfKRzfdCp6TYxeevDR31fvW 0zyetWbMhkUr7qGOnjI6KiEqxCz6dPc2GmSHje5ATyYxqrTq6lSL+WS1dI0HHL++kfX8 D+v4noCZoArF+1sIIwVhIBcDOTPnV5jsidMUaZYjedfSrLAc1z5UsqyKSi4/1p+Jm50S Tm2k90LzEhrYGbndJU95LHQSily8ML2kCFE6HRvTt1LMGvaeA2yRRJSEA2PA7YMzA0vp Y3SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691173154; x=1691777954; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mfl7UJxUbxuUeTFoCKSsO/YqaEDE5S858pqTp5fgS00=; b=VvNxBOk2AE+Mqlw9tm8QqjzwO7t6aU2kOfYXY946zuKL2S7iZ1obtS1R+TEy7VwEno cbC9EBjrtlhUjnujaVKQdNKR7cFhkg5xFsPtMVJKQcUH8AlrGoI6kn4bbJoQgNt6o+2M 0Ct8OGGKTTQueMEqYk8GDbtR7fEr93ve21J2V3Opg47wbE4jU6ATf5bfzghzUGpun5cx sLnSAWNEAGtrzmw5wtFV8AOVMeje+VYc/W8RJ7Q1YTawVUvReBkHxBt//nVLmk3VDfDS CZkHWzCVeYqeiny6ED3dE5W+TVawsOad5VDNfbyvZIqQJcCgiRPE2cWF/3vM77RupW0G 1vTQ== X-Gm-Message-State: AOJu0YzXnmdi4T5RDaaOIR0CgEiv3TQai8dIvtCvY0a1VEBwKDfBijIC K1620fQmgOFTr1xANTkokAg/ijag1tP8yCZvtZl6sA== X-Received: by 2002:a17:902:c409:b0:1a9:bb1d:64e with SMTP id k9-20020a170902c40900b001a9bb1d064emr24172plk.15.1691173154182; Fri, 04 Aug 2023 11:19:14 -0700 (PDT) MIME-Version: 1.0 References: <20230722022251.3446223-1-rananta@google.com> <20230722022251.3446223-3-rananta@google.com> <87tttpr6qy.wl-maz@kernel.org> <877cqdqw12.wl-maz@kernel.org> In-Reply-To: From: Raghavendra Rao Ananta Date: Fri, 4 Aug 2023 11:19:02 -0700 Message-ID: Subject: Re: [PATCH v7 02/12] KVM: arm64: Use kvm_arch_flush_remote_tlbs() To: Marc Zyngier Cc: Sean Christopherson , Oliver Upton , James Morse , Suzuki K Poulose , Paolo Bonzini , Huacai Chen , Zenghui Yu , Anup Patel , Atish Patra , Jing Zhang , Reiji Watanabe , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Wed, Aug 2, 2023 at 4:28=E2=80=AFPM Raghavendra Rao Ananta wrote: > > Sure, I'll change it to kvm_arch_flush_vm_tlbs() in v8. > While working on the renaming, I realized that since this function is called from kvm_main.c's kvm_flush_remote_tlbs(). Do we want to rename this and the other kvm_flush_*() functions that the series introduces to match their kvm_arch_flush_*() counterparts? (spiraling more into this, we also have the 'remote_tlb_flush_requests' and 'remote_tlb_flush' stats) Thank you. Raghavendra > Thanks, > Raghavendra > > On Wed, Aug 2, 2023 at 8:55=E2=80=AFAM Marc Zyngier wrot= e: > > > > On Mon, 31 Jul 2023 22:50:07 +0100, > > Sean Christopherson wrote: > > > > > > On Thu, Jul 27, 2023, Marc Zyngier wrote: > > > > On Sat, 22 Jul 2023 03:22:41 +0100, > > > > Raghavendra Rao Ananta wrote: > > > > > > > > > > Stop depending on CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL and opt to > > > > > standardize on kvm_arch_flush_remote_tlbs() since it avoids > > > > > duplicating the generic TLB stats across architectures that imple= ment > > > > > their own remote TLB flush. > > > > > > > > > > This adds an extra function call to the ARM64 kvm_flush_remote_tl= bs() > > > > > path, but that is a small cost in comparison to flushing remote T= LBs. > > > > > > > > Well, there is no such thing as a "remote TLB" anyway. We either ha= ve > > > > a non-shareable or inner-shareable invalidation. The notion of remo= te > > > > would imply that we track who potentially has a TLB, which we > > > > obviously don't. > > > > > > Maybe kvm_arch_flush_vm_tlbs()? The "remote" part is misleading even= on x86 when > > > running on Hyper-V, as the flush may be done via a single hypercall a= nd by kicking > > > "remote" vCPUs. > > > > Yup, this would be much better. > > > > Thanks, > > > > M. > > > > -- > > Without deviation from the norm, progress is not possible.