Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1341906ybs; Mon, 25 May 2020 13:30:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsv4sNM1D3sIb71ts03vt3yxB1Q5BkoPbTok65BfaYYwMdenbUoWd9lrET4u5IJDeQXWBH X-Received: by 2002:a05:6402:1bd9:: with SMTP id ch25mr16101105edb.15.1590438639038; Mon, 25 May 2020 13:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590438639; cv=none; d=google.com; s=arc-20160816; b=uaFh65psmd1HsPk8na5Q4BaO+kc1QYMS2qJelQm8OywawNGVGazWpfYMDODlcgIobL KMbiZCXCXCvGnGhYBhEqUzLMi2E5kHXQLHPjAtQfi63oneDbZSCuu/+D6bCbqAkt2XxQ 7vMIrBPhlfzr55B4Bianmt+q8KnZ+t9on6A9bWgUl1hsOieYz6V+hOfekdk+X1GYqjmK eaO2f58YKxyM9Zw7sOAwip4jqWZussiRmWCFIbG3n+s0cjMW6aD3nTEskSbP96LuudEh +CjgC+dwaFbX4FbTtN3ePr1C33GqK9v9RfSDONTuohWDkSvgJpJgScCTN8f0unGPWs7m 7mvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=v+B1785OZUouPASW2jrMekMBCWgZaLFpUTHdleb2VxA=; b=Q1GG/o1I69rCDovC46EAfRg/jPFjjDIsij/ZAuUk0KYaTctlqYWsxi9nw2PBo+X2NP 3sVtMbRyxdNdW/uEKmNaWlbT/4bg2A7cFwa34+ulypv5fy3kk5xgdyBXqel1dtiDhFGw TPQ8P0lCVuvNHctgchsCW+TUDZ7PmGd6F+rxI4z2V0VWakMHn4J2dTTY7ei8qWhzgFg/ Y3rq8uFsCPZZFJhvhxTACs9v18ZNdzKT3vlgaHASmdm2O0pzjWXkmUFUzIjYbJ3rvOM/ rOM6LpFdckEAZFk4NU/VJHQPmeOOfLpKr6YCktaoKPOTr8LXqwPa1+YAP55wUkj7fKgf Z+jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=M8B6svJX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si9948547ejg.711.2020.05.25.13.30.12; Mon, 25 May 2020 13:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=M8B6svJX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390360AbgEYM0K (ORCPT + 99 others); Mon, 25 May 2020 08:26:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390505AbgEYM0J (ORCPT ); Mon, 25 May 2020 08:26:09 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53917C05BD43 for ; Mon, 25 May 2020 05:26:09 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id i68so13647849qtb.5 for ; Mon, 25 May 2020 05:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=v+B1785OZUouPASW2jrMekMBCWgZaLFpUTHdleb2VxA=; b=M8B6svJXr54wgpkQnxJoxOPnFoG3xoaPb76kANRmbKzt4nMw3qxD/q1sXASpcEEWgF gHuA1+7j+0GHGEQqXQhNV3CKJGJ9y8q3jm3bRbRkWZKx1ilA8ceQcZUG0kUCYhtO2MZ7 o4kqO2LyZq2faf/NlIVIMBkKLeXoa88R/AW3tpprsWHR3SjzEi7iaSys03D2VbMtewxD KWhdY5a9O/4fZ5uesQirQ2lMyaFJfuB2R2HsT37n64J/gUu+48rbi4zf1W71+HPlLCgg RS6kJEq84BAk2ESnQHLB8txIWUSWrjJBBQcE2f/WAF2FVslapUIbMMvrwY16wMa3EvYc Oywg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=v+B1785OZUouPASW2jrMekMBCWgZaLFpUTHdleb2VxA=; b=oC7WKjOyRX1sPtMYcz5URt5vsWLUAyK1jnhK7rHw4kcUtO7Qr8dyRDQHzjjMcGrjLu Jese0AVGs3tJYJvFNldPUOkRtjtep2jZjNEjSCYSsLBWPRuyxV8ZA7JiY1keyM/8o18E S55mUmqMGBMpeHUQJH1A7wkj7ClNTZn4gSG+CB/TQTYLhk94a87gwpwg2V3nI3/OJ+9T HpQI+/mIO7RD876R3/Q6Qm9lZFn/1dlMzQS7pqUmZYqGVS6eOC//lWrTALHl9UREfd5Q iRfjbqe+KdiPK8VdRcyj+zZNHtpfm9cVk/gjjhhb9PbrPobhHuSbIkluPN3kEpUluX2l whYA== X-Gm-Message-State: AOAM531HqMUbeaUsi4NRiEC55wW7z7ACv6bK/4YGeWPZOaYC2QQlEx4E vsfrdpyyA05vF8NJz6mzpBzY9w== X-Received: by 2002:aed:278d:: with SMTP id a13mr2961124qtd.23.1590409568569; Mon, 25 May 2020 05:26:08 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id l2sm13637889qkd.57.2020.05.25.05.26.07 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 May 2020 05:26:08 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jdCBD-0007ON-FH; Mon, 25 May 2020 09:26:07 -0300 Date: Mon, 25 May 2020 09:26:07 -0300 From: Jason Gunthorpe To: Peter Xu Cc: Alex Williamson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, cohuck@redhat.com, cai@lca.pw Subject: Re: [PATCH v3 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory Message-ID: <20200525122607.GC744@ziepe.ca> References: <159017449210.18853.15037950701494323009.stgit@gimli.home> <159017506369.18853.17306023099999811263.stgit@gimli.home> <20200523193417.GI766834@xz-x1> <20200523170602.5eb09a66@x1.home> <20200523235257.GC939059@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200523235257.GC939059@xz-x1> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 23, 2020 at 07:52:57PM -0400, Peter Xu wrote: > For what I understand now, IMHO we should still need all those handlings of > FAULT_FLAG_RETRY_NOWAIT like in the initial version. E.g., IIUC KVM gup will > try with FOLL_NOWAIT when async is allowed, before the complete slow path. I'm > not sure what would be the side effect of that if fault() blocked it. E.g., > the caller could be in an atomic context. AFAICT FAULT_FLAG_RETRY_NOWAIT only impacts what happens when VM_FAULT_RETRY is returned, which this doesn't do? It is not a generic 'do not sleep' Do you know different? Jason