Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5334292rwp; Mon, 17 Jul 2023 02:06:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEcOm1rkxMgoEyIs8Eh30hJcWIlLZAzK941wa9Fv/4+dVzq5t/Bnd1MY+9rUEcBnS7teMm5 X-Received: by 2002:a17:906:6495:b0:993:f744:d235 with SMTP id e21-20020a170906649500b00993f744d235mr11244488ejm.6.1689584816857; Mon, 17 Jul 2023 02:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689584816; cv=none; d=google.com; s=arc-20160816; b=shwx7LtiuMyRxTTRrl2NUNBgUA9JiRbj2Bxd9/Bt6Yzpc/MG/cZH3aVlx/PNNdJvSi wd1j/EccGjS1DZUQ2+DeyJfF4MOuvvYtVYGQEXlpQnhmh0u5vuAAvdUodFgd93Kr8hWi 5WlqTjPqdLLx++g3uGp/GDNjW4QXng5KJ5D6UYJEfZ+dzI+VP1/yC1GnQ1vOSJTm5aCq ejPwxFaoyrQjNiwjhmwQfqlTqelFr/ZCBifjJmRXbHsBjoydiN/g/mS3HbI5mB+N9nda 3AZF9eHK7IyZX14wBP3mExyYVP1GAaNagCL7GOhUenGytDZKSY5TifxJbqg+PCr5p7YL uojg== 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=VT24UUIzDMth5tPZL5Y5vTEOs+P0BwYmDWZgKveF0+M=; fh=uBZlv7CWKs1R9yeontguDK/YVD0Xt06NofVv/VYzJJk=; b=xsb9I6AuOIO9mkXfwxaTTQWVhqr03dYZBa0AgD+xXzzbV+HgSeExumBtOzdIO+XTTE MsBXOWMTUM4T4yPTp/xyzSdG0ludGEW3u94xYTi3UVfRXUZM6V3eYTYVRsEVGHI+FF23 8auiE/rr9fv5I9CeXEvLw5955BTpWN/OTLO8+mvFgkCg53sSw2ZOA8mlKUxoRpxZ8W3l IdV56YVVUhI254yYQ8CCkkZ4vHFkd5mlR2cYe6yqq/HmF9ToFpcksPdwoUKqV+yEAVWy injpQqD0mQOvccDq58jr5YnNecgvvo1kuk/o352nRZAo7WHfObyUJWNdyr11SbZtZd6l pcGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/iJhKX4"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a170906339400b0098e24139529si12204805eja.733.2023.07.17.02.06.32; Mon, 17 Jul 2023 02:06:56 -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=@linaro.org header.s=google header.b="K/iJhKX4"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbjGQINL (ORCPT + 99 others); Mon, 17 Jul 2023 04:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbjGQINE (ORCPT ); Mon, 17 Jul 2023 04:13:04 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB9D8129 for ; Mon, 17 Jul 2023 01:13:02 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3144bf65ce9so3997588f8f.3 for ; Mon, 17 Jul 2023 01:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689581581; x=1692173581; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VT24UUIzDMth5tPZL5Y5vTEOs+P0BwYmDWZgKveF0+M=; b=K/iJhKX4wID4O6BHCkqoNDeKizzM0ai2C/JJVSYMd+iQ+t5gkYEyqR8OcId9s6Uw/g +AIOCIIHWgQP5i51DcuabWMLSpL4+g4yBFEaNnFvCFvlOvJtDRtBZSsu4q/eyraIhxnF 34lFSWsMuYImH0tASUyIG9UN5kV+zySjXP1wgy3I0PiMTd8SGe0bBTaL1/3m+AIDIUri t2pJXylGN30xSlpLDQiAnrflPN5i2wyDLNiZpxqAYVBhvceI1p6Lvuk8qVu8Vmd37D5M py/+IAtS+moAn/+PGdzK6ETPGkvlELAfB3SP0bODnQ1hd3dVHt1OhCJkizrojhSmGnF9 2zag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689581581; x=1692173581; 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=VT24UUIzDMth5tPZL5Y5vTEOs+P0BwYmDWZgKveF0+M=; b=Yt6ydKsLh9jBKyq5QparAGzb6WJXhAanxRZjmc5tCfMRXmzYToT/xBvS8C0uU0Rf0d dvuttyyGBJEwr81i2J3BZV6/bx2cjmk3OgSHnVKVGad0Xpq/+SAjLtrS1ElTJ8HICIiL Zi2JcZ1xZFxT3SHbwjBmep8D9vue2yKJGgnBsmy2s3swoUSWAjIb7/lvahf7Ren2slvG a83RNBPsL/ndbeU8U5unIzrNd46VLqlFVq3fZMv8pVDygau7xU/DqVDnCY8oJ1PDYrfw 01KicfqaWLzN56isDkOFQ1mXY0BRoRONl4fMbXMw4cs+yvFyA0D88M0P/ZIDPLOSRuvQ ejgg== X-Gm-Message-State: ABy/qLYPNpfWDjpXuTFKjp7W9ekJogP2KUHJiCKKtySlDRCoxkRXP0lk 58910U5dzLBUVMIdL0C0aSvuCQ== X-Received: by 2002:adf:f206:0:b0:314:34dd:aaec with SMTP id p6-20020adff206000000b0031434ddaaecmr9504790wro.8.1689581581381; Mon, 17 Jul 2023 01:13:01 -0700 (PDT) Received: from [192.168.69.115] ([176.176.144.39]) by smtp.gmail.com with ESMTPSA id b2-20020a5d4b82000000b0031432c2fb95sm18429372wrt.88.2023.07.17.01.12.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jul 2023 01:13:00 -0700 (PDT) Message-ID: Date: Mon, 17 Jul 2023 10:12:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v6 02/11] KVM: arm64: Use 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, Zenghui Yu , Gavin Shan References: <20230715005405.3689586-1-rananta@google.com> <20230715005405.3689586-3-rananta@google.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: <20230715005405.3689586-3-rananta@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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 maintaining > 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é Regards, Phil.