Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5802881rwp; Mon, 17 Jul 2023 09:36:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqRNW2ITTgMnpSkvBWoGMkc+oaYECgTkAd/1tiBrk4U7xSnI8BmdreV26DQI5Z1ZczWxFU X-Received: by 2002:a2e:9284:0:b0:2b5:8a21:5627 with SMTP id d4-20020a2e9284000000b002b58a215627mr8729035ljh.51.1689611814566; Mon, 17 Jul 2023 09:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689611814; cv=none; d=google.com; s=arc-20160816; b=qHD9XURfcWT1F+H4V7lZAOl6ttMiIFcBqKnJsC/FW4ea4ie0Ccl1npHX2sY1zsUpCy Jw71K2Re54Lou+gqqy1BM0rs7/w5e+tGuzFfqRCja0Yzrz+0k5yABaF6mRl3LVNdWqaC jx3UZiGSrhBFHTl1i5Iwske2+1i9xuhM80rO7i4Ad7p3mY5U1FAW2BZnYLearsoAwACj IhhaOXxcOcE5hZ6fCdVkzKiNhysir9w038Rbm+Bl/1A0D93fJTf/2FQTCmw7OxUfesYJ BLDnWk/ojNITkGe77/W7j5+SMNj9Ldz7Ie0+7d3ILjpxFbO8cwRIL027Evk5dZYDuBi1 4dBw== 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=JdC3m+V++Z/viiPrZylihhrytj8yYzk3mKF8HaNWKR8=; fh=U/tu46/kP8rscxqFvKv18/jKg3z+HWFmZNAwwiyUJcM=; b=WfFThS7OKfh6qMQ2HSzhrZk/6qvfxM7RLk/wvdBB+ZwH2/oXLd3mSvcL/C6Z2IdBEW /AYWvD6qW5cl5r/MWAXp1Q+z9LvGYkLmFqY0l831Y2X46bgKkbkBx/+y5rGv8dTAl4xw 6gSkM2YmwnuGLcl1myqSa1TGZwNuBGyAaYO1gitn59EEcim3rG5jlPq3P1AINS3WxUyO yexATq108GWLwyuz5o3DkHPlvg3E+auDIiJJ8MpoynP7U/4+4rgD/qb22HEsoOL9zgC9 H4degGWFBhmkcFAbffmOQVB5UGlXLKkiHV9T+Ze8b5g6gbWT0yMV2UV3blka780wwlvf 2MOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=JLAgLws9; 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 md1-20020a170906ae8100b0098e3698905fsi3707211ejb.625.2023.07.17.09.36.30; Mon, 17 Jul 2023 09:36:54 -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=JLAgLws9; 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 S231748AbjGQQ33 (ORCPT + 99 others); Mon, 17 Jul 2023 12:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231917AbjGQQ3L (ORCPT ); Mon, 17 Jul 2023 12:29:11 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB1641B6 for ; Mon, 17 Jul 2023 09:29:10 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1b9ed206018so217525ad.1 for ; Mon, 17 Jul 2023 09:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689611350; x=1690216150; 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=JdC3m+V++Z/viiPrZylihhrytj8yYzk3mKF8HaNWKR8=; b=JLAgLws9Ph8sZXiXZU9MF05DdRh4lVloJ4eCxbv6I29WMR5L0rCOLPelFSDEOZhJvt 64+osbhlLyTLpW/D92uvfSJaEL4sFuEBmrpVS+xj6clTrIc2+bVJGwfbs5n6gHdnEr5B YqzqSMwfqaSo3XeFvoWjfbHeM4Cc/MTNc1ecF1B0hr875jx1ozJYDOrdZfwkabhTY752 2VHpkMBORHmHuzxFkO6mdxouWf2WD6zFkfGAabLUwljGiTe44J/tuB2YOVMzpNsZ9p1i sch2dY3rkukgapyWRdaAtY7ju3lclvSIthC+kC+tP83bYfSBV/VxQM9FDLFKyUC+qfpE iEPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689611350; x=1690216150; 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=JdC3m+V++Z/viiPrZylihhrytj8yYzk3mKF8HaNWKR8=; b=ILkNtsDypjRB0h1vwj3ZAa95A86j6WddEmBhmxzefatcxnKyKA3Py03fZhTMQG26sc vQVrd6xr05of43cV3E5zfXoLkn4p5umSxI5Cm6xQbktwv3Ikviu/CUY9Ql7Apxqo95rs O/LAGlgdiDs6lEGWBgothkBo6LTTo60U2cvYyB27k6hfkBhE9xAYkzRNoEuZ6Sj/Z2Wh Ag2zkKOQcoO8ZR6vkUtYstgAIwPDbMl96e5RmGzaPpB/MA6zW9Jtpfe/JL4+Lotfxw/b IAdA1Ox8spqLZOuhCJfWILeICt2yAqHeI3qC6CVhZj+HIyjq4i1ZrGpB78+oATBMwgqw WTUQ== X-Gm-Message-State: ABy/qLb9Ue8qLPfMMfvwNKiBT6LJoxCK+W5VpMSDBNujksiME5jCuf/A VVYlFrBY0LiWcA2loLVgxP6Yg//QDK1YgzVBgFwCtQ== X-Received: by 2002:a17:903:41c4:b0:1b8:5857:ea9a with SMTP id u4-20020a17090341c400b001b85857ea9amr1012512ple.23.1689611350208; Mon, 17 Jul 2023 09:29:10 -0700 (PDT) MIME-Version: 1.0 References: <20230715005405.3689586-1-rananta@google.com> <20230715005405.3689586-3-rananta@google.com> In-Reply-To: From: Raghavendra Rao Ananta Date: Mon, 17 Jul 2023 09:28:58 -0700 Message-ID: Subject: Re: [PATCH v6 02/11] KVM: arm64: Use kvm_arch_flush_remote_tlbs() To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Cc: Oliver Upton , Marc Zyngier , James Morse , Suzuki K Poulose , 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, Zenghui Yu , Gavin Shan 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_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 Hi Philippe, On Mon, Jul 17, 2023 at 1:13=E2=80=AFAM Philippe Mathieu-Daud=C3=A9 wrote: > > Hi Raghavendra, David, > > On 15/7/23 02:53, Raghavendra Rao Ananta wrote: > > From: David Matlack > > > > Use kvm_arch_flush_remote_tlbs() instead of > > CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL. The two mechanisms solve the same > > problem, allowing architecture-specific code to provide a non-IPI > > implementation of remote TLB flushing. > > > > Dropping CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL allows KVM to standardize > > all architectures on kvm_arch_flush_remote_tlbs() instead of maintainin= g > > two mechanisms. > > > > 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. > > > > In addition, instead of just incrementing remote_tlb_flush_requests > > stat, the generic interface would also increment the > > remote_tlb_flush stat. > > > > Signed-off-by: David Matlack > > Signed-off-by: Raghavendra Rao Ananta > > Reviewed-by: Zenghui Yu > > Acked-by: Oliver Upton > > Reviewed-by: Gavin Shan > > --- > > arch/arm64/include/asm/kvm_host.h | 3 +++ > > arch/arm64/kvm/Kconfig | 1 - > > arch/arm64/kvm/mmu.c | 6 +++--- > > virt/kvm/Kconfig | 3 --- > > virt/kvm/kvm_main.c | 2 -- > > 5 files changed, 6 insertions(+), 9 deletions(-) > > You are doing 2 changes in the same patch: > > - Have ARM use kvm_arch_flush_remote_tlbs() instead of > HAVE_KVM_ARCH_TLB_FLUSH_ALL, > - Drop the now unused HAVE_KVM_ARCH_TLB_FLUSH_ALL. > > Commits should be atomic, to allow partial > revert or cherry-pick. > > Preferably splitting this patch in 2: > Reviewed-by: Philippe Mathieu-Daud=C3=A9 > Thanks for the suggestion. I guess that makes sense. I'll split the patch in two for v7. - Raghavendra > Regards, > > Phil. >