Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4942843rwb; Mon, 31 Jul 2023 15:14:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqU1vvMuF0/BgyMC5PJ4IxrOPs3OzfD8Jo8q282mdymj6LgXGDP8jI50t/lsVKBUrT/H8W X-Received: by 2002:a17:906:64ce:b0:99b:484b:21b4 with SMTP id p14-20020a17090664ce00b0099b484b21b4mr1408527ejn.8.1690841642755; Mon, 31 Jul 2023 15:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690841642; cv=none; d=google.com; s=arc-20160816; b=Hv4tidvhDnkNqsTz/dgAqvWrmxFn+lpdwajhVcrvDxSUPFHuMgHiJIBP1WTNKfC92z F0nS/55Yv7UWO7D4ejM6GuxyQJpHxwrO1rGbK6SX5zev94K0VDIfxlRwSU0llq5bz9ZI QeAK6PHqVhE4BnYCmNpJ3TWSrJGYNzCFRoUnNUVT+aAL8UgJM00D6/4I+hcewwF3nbpD KaAQCgVedznQl0ZZRIW6LpHUoxiIzr8NWdwuHJrTgfVBur5A1n6Is6fqGRc5h5ctD21c Ot+q6lfNS5Az7uKsCLQSBuzIIAMb7fbvb+47Ehl2OjdMxpioKsvCGTmN4SarNYV9D3W/ LxCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=R2QJFD2XHgTI1kJ5wD8vqBTFZZRvLtV3pZ4w1UH3Oa8=; fh=y4taEfyds5SOFzRRxh+v/9I8ewWMtdAtVXm5lZ4asB8=; b=ill0RflemHnxIe4sKPNK5zNe8w5dtC1+vfvd71nV7AX7F0gwQp+U5lJHIu9jK62Aip cGoseGkf6em+psPCo1t6rVV9PKjSL37MMFA3ABvxITh8REasD+872VuwffX4WTHPed7I tBX8fnl7UuGUoJhzpFJYtqL8WTflsO92B93v8/NVK3+UMiZoc240/TuRbH5w8DuhXqBJ BjaJYTuk4hnFxy6o8gN855ASV31jISFlIMYvPI1p4QEoaK+jNnASDFDOiug5yH+pRde8 CNQtYS9rWFOOB3IqVoyK8aqF2QZcou69vhh6aznKORosFsNRfrQ7KiyAq60dsu1dVNXE jYAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=tSLTmu+D; 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 f5-20020a1709064dc500b00988c76f9d4bsi4135407ejw.347.2023.07.31.15.13.38; Mon, 31 Jul 2023 15:14:02 -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=tSLTmu+D; 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 S230503AbjGaVuM (ORCPT + 99 others); Mon, 31 Jul 2023 17:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjGaVuL (ORCPT ); Mon, 31 Jul 2023 17:50:11 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30071133 for ; Mon, 31 Jul 2023 14:50:10 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1bb83eb84e5so52200065ad.1 for ; Mon, 31 Jul 2023 14:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690840209; x=1691445009; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=R2QJFD2XHgTI1kJ5wD8vqBTFZZRvLtV3pZ4w1UH3Oa8=; b=tSLTmu+DLBufAzFzbicDIcqEm2TuolEf1DapzPi+gTM4FHXli52KWx81A5zuk/YCxr l/OlTy/M2QsL/+aaVuZ/hYb5nYSSERYjNp13FI8HYqXm9WQmG25RmZxIsRM/Z7zSspZU JeMXBEyXp4E2GhE+/oU7uxeo5vA7VEgDwo3z8s1TIqOjvBy9PB/UOIPUcDQqZ2yvrlDS tD1vLJn5szUm3mkfyZtKLdz/qI26XfZV9AjJ3HuKY1kp9JjckDUfZYJ6zw6f2Uc034NJ WHPzXkiGbDSZiEmxmUdXhZElFyFTVHyycIhHVC0+v52tpuADk55LDDgQL5cDUbXmgDrC Rygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690840209; x=1691445009; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=R2QJFD2XHgTI1kJ5wD8vqBTFZZRvLtV3pZ4w1UH3Oa8=; b=QD4339gcZTkqdhxjeqaelvDMoQPggNx9ytp1c7lH/57LhhydbaIqr3jc/Sr/AdJBQ0 Vft8uL8P6nekWtUdaYGc29t25Gi9iHNozAEsN36uapuDyEZicGf0xHEyxdSXzb1hL+0q z27jusDahGYCfcKmbuZqTEY96ZXzQdrJEAP8/DAeQ5qPW2r7O4dctcDFcfBoGlFulvSq ulcBerb8zagCUbh3FdRCUhOwcTBWS1pQUa2YcPIO/Roq9VvXCT7RCy6thlDLZfN6ubOF Qf3JjqPDvq2RwdzL43TuRuHUkKElYrKzKllO6dCR5qMBMg+/OkJCq1GO30GIsOXsQPZ/ 17AA== X-Gm-Message-State: ABy/qLYp6ov6Z2KHBXWCywJ7OqGBlYRvaZ0h/MXFj/IJL9HTCzUxkMd+ wBauLJi0sfCRmhsY5RQ8zzQx0P1NNqE= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:f68b:b0:1b8:a552:c8c9 with SMTP id l11-20020a170902f68b00b001b8a552c8c9mr47142plg.13.1690840209652; Mon, 31 Jul 2023 14:50:09 -0700 (PDT) Date: Mon, 31 Jul 2023 14:50:07 -0700 In-Reply-To: <87tttpr6qy.wl-maz@kernel.org> Mime-Version: 1.0 References: <20230722022251.3446223-1-rananta@google.com> <20230722022251.3446223-3-rananta@google.com> <87tttpr6qy.wl-maz@kernel.org> Message-ID: Subject: Re: [PATCH v7 02/12] KVM: arm64: Use kvm_arch_flush_remote_tlbs() From: Sean Christopherson To: Marc Zyngier Cc: Raghavendra Rao Ananta , 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="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 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 implement > > their own remote TLB flush. > > > > This adds an extra function call to the ARM64 kvm_flush_remote_tlbs() > > path, but that is a small cost in comparison to flushing remote TLBs. > > Well, there is no such thing as a "remote TLB" anyway. We either have > a non-shareable or inner-shareable invalidation. The notion of remote > 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 and by kicking "remote" vCPUs.