From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59955C10DCE for ; Tue, 24 Mar 2020 07:45:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 32E5020724 for ; Tue, 24 Mar 2020 07:45:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32E5020724 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9FE7A6B0006; Tue, 24 Mar 2020 03:45:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AE156B000E; Tue, 24 Mar 2020 03:45:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89C186B0010; Tue, 24 Mar 2020 03:45:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0171.hostedemail.com [216.40.44.171]) by kanga.kvack.org (Postfix) with ESMTP id 6F6796B0006 for ; Tue, 24 Mar 2020 03:45:54 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C94E61803A12A for ; Tue, 24 Mar 2020 07:45:54 +0000 (UTC) X-FDA: 76629471828.17.hand68_8ae7f08436c18 X-HE-Tag: hand68_8ae7f08436c18 X-Filterd-Recvd-Size: 1735 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Mar 2020 07:45:54 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id E5EDE68BFE; Tue, 24 Mar 2020 08:45:49 +0100 (CET) Date: Tue, 24 Mar 2020 08:45:49 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Jerome Glisse , Ralph Campbell , Felix.Kuehling@amd.com, linux-mm@kvack.org, John Hubbard , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Philip Yang , Jason Gunthorpe Subject: Re: [PATCH v2 hmm 9/9] mm/hmm: return error for non-vma snapshots Message-ID: <20200324074549.GH23447@lst.de> References: <20200324011457.2817-1-jgg@ziepe.ca> <20200324011457.2817-10-jgg@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200324011457.2817-10-jgg@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 23, 2020 at 10:14:57PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > The pagewalker does not call most ops with NULL vma, those are all routed > to pte_hole instead. Does ->pte_hole > > Thus hmm_vma_fault() is only called with a NULL vma from > hmm_vma_walk_hole(), so hoist the check to there. > > Now it is clear that snapshotting with no vma is a HMM_PFN_ERROR as > without a vma we have no path to call hmm_vma_fault(). > > Signed-off-by: Jason Gunthorpe Looks good, Reviewed-by: Christoph Hellwig