Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6993364rwl; Mon, 9 Jan 2023 16:19:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXvGvaL9ZqykjTmAYoY8IT111R0Z9/YV7kofL+h2l9DEvFPCeDyeSIJ/DGLBup2zW71YmUBZ X-Received: by 2002:a17:907:ca1d:b0:84d:4e77:6453 with SMTP id uk29-20020a170907ca1d00b0084d4e776453mr3294614ejc.38.1673309985587; Mon, 09 Jan 2023 16:19:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673309985; cv=none; d=google.com; s=arc-20160816; b=gvN1JbkTt3iNLAvGyePO2BBoPjLaZcBQQitchkawly39BxFTPpMRTgKOQbXj6DCsjQ ZXKzzYvWg7YCyPp3g7/6yEtGugGNdmULkCvjbT4Q4Yhq22IEW6KwfQ82kUq6PUx9jWpk l082gYKsZEQ/ihASzuQ8ueG9pEM0iY1gL5gbNCcGxd0NJE7q/+9EfkWj+/4Soxptr9iH sli4LQHD5ztE7M9QQlszm0Ci31XmE9UGxmdWAjfe1p3AWF5cNe4jFvmWnyLeSCBVa3oT IQTRRoJES/ZFKkji/WO9D6HjNTL0qqbfDDXcbUS4+qQoPjBmRdzT5+qnbREMcV9eFXqb Wfgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=v2+KX7du7whicN+PS9fU23ysrGOmXoF+0M7DLlUtPuI=; b=f35Be6jJFTtDXwVav2Z44rG2pYFzNztUNZ9/AhRyFq+yVc28YbUwkQAM6iALlG6qHU VGZf52sASQPxfw7jDt7EQ9Wfsj//oVHX33XR/eUX9htl6KZ/s+xnhRsoslaDGKb8moS6 C7U4P2pNBAJ5VwJk3qapXR8lfGL98J9WPpswJ71xUsXptbnBP70tStB3y73wRAsOyBBW Hah67NfGdskEwiubvGrVPCHSPtkrKpiapwCGQETOCVH9v88ryvBcIBu4WPDCBTwaBwP/ yG7NC0zxCPYQYu+C1PpWZgix6mg/mGVSJidvRAGaikRCApsrDVxf4OLkRJFTcLKKvUHF A0dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZgXn18vN; 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 q11-20020aa7d44b000000b004974f256f48si7912130edr.576.2023.01.09.16.19.32; Mon, 09 Jan 2023 16:19:45 -0800 (PST) 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=20210112 header.b=ZgXn18vN; 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 S238088AbjAIXrh (ORCPT + 53 others); Mon, 9 Jan 2023 18:47:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238272AbjAIXrV (ORCPT ); Mon, 9 Jan 2023 18:47:21 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF0F72BEB for ; Mon, 9 Jan 2023 15:45:57 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-4d19b2686a9so6934217b3.6 for ; Mon, 09 Jan 2023 15:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v2+KX7du7whicN+PS9fU23ysrGOmXoF+0M7DLlUtPuI=; b=ZgXn18vNNIICztMBawwC/7R15H4RvIurJtsuiESatewLzdxVJ22qGKGLsYNSGMZ/1J kqJLhrCdHZfEqLtaEJm+rwlCpUoN72QGA5WVuZ8lata0hrkjF1Aaiw83E2DGTR1TLzPf nNoYt+MXL0z4WrfBV20/KqlOYo8TDx8tKu1JfbOPASVmZzAhUuBLvK+64mgWSBD+BbW3 ROGwxnI+BsBHpTm0li51OCl/YPPJ7hHh9rpDw68lVJt5LxQOI3tQoU8Js5bzfBdgqGPB L2rct/g75bwCkbvS3IGeYwyWqqDw2S7JPd7q5lIniApGK+jI1ovfHWIhIO5+udTgqATx hrpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=v2+KX7du7whicN+PS9fU23ysrGOmXoF+0M7DLlUtPuI=; b=AywDeCRWq4Q7Ba9KGtDkEThpsMopQfdhZQSc8kuwsjVXbhds0wDirrDzV37I9Ha3CL U68q/gu8ZwnDrCCGuvPzI2EdLyt0jMZpjcUNPwt+uttDHfwPy1OuAcSYvJlzXo6W0Wnc 5va3eeUJE9GbtdPBWG82HHkEHKX5ROEdJzjdxQquvLL4tntmaUZ+HReY3EMq+uhF8Bd6 RUTJociexnrkQZsCRhxbEVIouEghU1lSdj1gJuIiV/MKXLDQ+aPYG/qYLQOk9kdXu8mz +i7JJwrCXEe2A321GPf4r3+ZJY1wJGiaduTji/AVqjuXyWhdj7ucpJxVx0A4WqwZ0ky9 ejEQ== X-Gm-Message-State: AFqh2kruNdh+NQ8bvKClOCFjNYKXeYLa/CjzIUbaFTwgRj0sGLku08Sf S7bBV4260dPwcGauUuOV3LxA79wk8OqGxK2Gu2pPaQ== X-Received: by 2002:a0d:fc84:0:b0:3df:6a50:40ec with SMTP id m126-20020a0dfc84000000b003df6a5040ecmr2231052ywf.340.1673307956007; Mon, 09 Jan 2023 15:45:56 -0800 (PST) MIME-Version: 1.0 References: <20230109215347.3119271-1-rananta@google.com> <20230109215347.3119271-4-rananta@google.com> In-Reply-To: From: David Matlack Date: Mon, 9 Jan 2023 15:45:30 -0800 Message-ID: Subject: Re: [RFC PATCH 3/6] KVM: Define kvm_flush_remote_tlbs_range To: Raghavendra Rao Ananta Cc: Oliver Upton , Marc Zyngier , Ricardo Koller , Reiji Watanabe , James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Catalin Marinas , Will Deacon , Jing Zhang , Colton Lewis , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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, 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 Mon, Jan 9, 2023 at 3:41 PM David Matlack wrote: > > On Mon, Jan 09, 2023 at 09:53:44PM +0000, Raghavendra Rao Ananta wrote: > > +{ > > + kvm_flush_remote_tlbs(kvm); > > +} > > FYI I also proposed a common kvm_flush_remote_tlbs() in my Common MMU > series [1]. > > Could I interest you in grabbing patches 29-33 from that series, which > has the same end result (common kvm_flush_remote_tlbs_range()) but also > hooks up the KVM/x86 range-based flushing, and folding them into this > series? > > [1] https://lore.kernel.org/kvm/20221208193857.4090582-33-dmatlack@google.com/ (Also they make kvm_arch_flush_remote_tlbs_memslot() common so you don't need the ARM-specific implementation in patch 4.) > > > #endif > > > > static void kvm_flush_shadow_all(struct kvm *kvm) > > @@ -637,7 +642,7 @@ static __always_inline int __kvm_handle_hva_range(struct kvm *kvm, > > } > > > > if (range->flush_on_ret && ret) > > - kvm_flush_remote_tlbs(kvm); > > + kvm_flush_remote_tlbs_range(kvm, range->start, range->end - 1); > > > > if (locked) { > > KVM_MMU_UNLOCK(kvm); > > -- > > 2.39.0.314.g84b9a713c41-goog > >