Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2834880imm; Sun, 14 Oct 2018 05:58:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV60rArAIf54By/0r/XmuVBbNYJNa2kn9xm6logE00xd4Jn0cCGhvmYSqL30RmMEPxFsINtmR X-Received: by 2002:a17:902:ac89:: with SMTP id h9-v6mr12819482plr.174.1539521894491; Sun, 14 Oct 2018 05:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539521894; cv=none; d=google.com; s=arc-20160816; b=AI5y3fgffUKhUqS4Ltd1w5jyzuOwvJ87fJUzP4578axYF35y1KGIu/urZ23HXlR2YJ DLw5TF7G4c0BXwA0zuiySK2D3N44oOQuX4hhie+OwNWsMYkHOqNpFZPLUhJ2KpsSkYlr C2KeeNjgwHxOJojnvsrSu7FzlsiNnulSfoilomgAZX9gxYKUxsRrV8cnobUvcIsEGUGZ DR6VPOBMij0IiU/PPq5nASzBuCtN1/pWAMIuXbRiIzrJS7eGFeakIX1I9ZAOSn/NSDI9 jNuOcpIdlI3X7f1TvwPsGX3ChZlMPNHXQ6diCkzUTFYLsadWvDimg6lq993oCt914b5y YDag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QOh3/rAAMNg6qWlR3ockjsVxuDsHmKYoJ0FCAyRqfh4=; b=FwYXM9tmon06LZHF2jP6QiX2wUga2oznIkFIcPjnwQLu3ohzg2g9T1BFU+ERAK7wJt L0f4axwxi8N9TnudkrvDUNnpetU06ASqf9xJ9OIX051S9Zub+3r8oylF9hgbBaPEaTrN E/IoXMxqrMQknazBkT5TrW8wUHv9PT0TFzZ8M2Rb1obuK29har3Jtml1KxZmL1d9RPYg UK1dnQ8UChbwlBmAQBJd9+hLmlvJDncdcqm6IbNNvu7fsdujgYn3sl85a1ju55Zx+XZf Di2G/mRgNOAneMmSDxRTNffszgQZ+J12al+M8DYxozfP12VeMvpQEW01H3FvTe4QWfZK UQhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iABS1Buu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si7838566pgn.314.2018.10.14.05.57.58; Sun, 14 Oct 2018 05:58:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iABS1Buu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726327AbeJNUia (ORCPT + 99 others); Sun, 14 Oct 2018 16:38:30 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33413 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbeJNUia (ORCPT ); Sun, 14 Oct 2018 16:38:30 -0400 Received: by mail-pg1-f193.google.com with SMTP id y18-v6so7897425pge.0; Sun, 14 Oct 2018 05:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QOh3/rAAMNg6qWlR3ockjsVxuDsHmKYoJ0FCAyRqfh4=; b=iABS1BuuIxLgQKHch2Dlc2zTZiMd5aUIeqllYaFVgeR7hoGPuvGN0BBSP3H1vOGBVn KnNmfDgbSWbJo+V1YyBGzEulGIQI4dKrQDtk/qd41E6RZlIfP2uxnp0+oBAtOmE4lG68 x70+eGZP6uqx3qIucJWNiOGFfutGJX0zNuk02P85pVbzAfz/cdNnL7N6mjQ9px/1vLGR 0JCrXbMG1TROv4dsnHtWFYQhX2S77DifFBaPTKHxH7wYOLvmaT9qB/OI8BYNCWShL/X9 mFcN7LHngJUy/JxGOyjI6S48h8FN8nkPma5iSqUuYea8u+8O4wp45CoWdE8sNLx2J/u+ jenA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QOh3/rAAMNg6qWlR3ockjsVxuDsHmKYoJ0FCAyRqfh4=; b=OaJsWyv3iJfe+5wYy4VmOWcNlbFnLPobcedYWTYUv1c8auJIo6Y9LmqbSHg2shZkJu YTDG+umgj41xv+KOMz3SnRGox3zR2CRxQ+ngjOUVyvclxEIvl8OlXDhezswUzaFrNdDR e99nhdSUgclM/QE1pFbhx1eRz9bRsQK03bmEFJuGp2JIwWbOBPmOsjxSlMRpat9/K3yV FthWCtjNQNwNBq2GVeltOeenlbRHR6qgZOf5UuBOjYXl0OrXcuCs7jVCy2KDLRhu8XGG bGnCf6RPxnDF9ttot4/cp0NZY8/IgNbb43So0YnCnfKv/vjK0b0kMzQHJiPtMrPFJXUz atXA== X-Gm-Message-State: ABuFfogs66iY69I6pXzPmVFLB6haw2yX6V5PpSn19X1Wog8/+T6Tayb4 1omgKH8xrsf6ogPnRzWc9xNxQugQngPNuGAJwE0= X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr13526160pfd.106.1539521853925; Sun, 14 Oct 2018 05:57:33 -0700 (PDT) MIME-Version: 1.0 References: <20181013145406.4911-1-Tianyu.Lan@microsoft.com> <20181013145406.4911-3-Tianyu.Lan@microsoft.com> <4D709C3A-A91C-4CA7-922A-E77618EF21B4@oracle.com> <1BDC7949-CFED-46C2-9D05-42864B0AD0F0@oracle.com> In-Reply-To: <1BDC7949-CFED-46C2-9D05-42864B0AD0F0@oracle.com> From: Tianyu Lan Date: Sun, 14 Oct 2018 20:57:22 +0800 Message-ID: Subject: Re: [PATCH V4 2/15] KVM/MMU: Add tlb flush with range helper function To: liran.alon@oracle.com Cc: Thomas Gleixner , Tianyu Lan , christoffer.dall@arm.com, marc.zyngier@arm.com, linux@armlinux.org, catalin.marinas@arm.com, will.deacon@arm.com, jhogan@kernel.org, ralf@linux-mips.org, paul.burton@mips.com, paulus@ozlabs.org, benh@kernel.crashing.org, mpe@ellerman.id.au, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, Ingo Molnar , "H. Peter Anvin" , "the arch/x86 maintainers" , Paolo Bonzini , Radim Krcmar , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, "linux-kernel@vger kernel org" , linux-mips@linux-mips.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devel@linuxdriverproject.org, kvm , michael.h.kelley@microsoft.com, vkuznets@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liran & Thomas: Thanks for your review. On Sun, Oct 14, 2018 at 5:20 PM Liran Alon wrote: > > > > > On 14 Oct 2018, at 11:16, Thomas Gleixner wrote: > > > > On Sun, 14 Oct 2018, Liran Alon wrote: > >>> On 13 Oct 2018, at 17:53, lantianyu1986@gmail.com wrote: > >>> > >>> + > >>> +static inline bool kvm_available_flush_tlb_with_range(void) > >>> +{ > >>> + return kvm_x86_ops->tlb_remote_flush_with_range; > >>> +} > >> > >> Seems that kvm_available_flush_tlb_with_range() is not used in this pa= tch=E2=80=A6 > > > > What's wrong with that? > > > > It provides the implementation and later patches make use of it. It's a > > sensible way to split patches into small, self contained entities. > > > > Thanks, > > > > tglx > > > > I guess it=E2=80=99s a matter of taste, but I prefer to not add dead-code= for patches > in order for each commit to compile nicely without warnings of declared a= nd unused functions. > I would prefer to just add this utility function on the patch that actual= ly use it. > > -Liran > Normally, I also prefer to put the function definition into the patch which use it. But the following patch "KVM: Replace old tlb flush function with new one to flush a specified range" and other patches which use new functions will change a lot of places. It's not friendly for review and so I split them into pieces. -- Best regards Tianyu Lan