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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 AF4EAC433ED for ; Fri, 9 Apr 2021 14:24:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7653361185 for ; Fri, 9 Apr 2021 14:24:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233688AbhDIOYY (ORCPT ); Fri, 9 Apr 2021 10:24:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:45146 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbhDIOYW (ORCPT ); Fri, 9 Apr 2021 10:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617978248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mWB8fVtvsr+ttGoY+PfMzLEn/1c7gqQBkhb46FX5nXY=; b=bCGs5f/iAMX7YBY/GoETFODOg5ZCXu1SNrZpDPR/vd6+smaIPrQbUrpeIVgeFMoTPuQHX/ 1qxItRzYAwtdboyIUcht194XqBYb+AuATKXzWuxZIuAcQ3rJ00booXpix0WSOfmPGwrOt/ it+hDCUzXBIPtkmNJ2Vn3RULUYt8ziw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-hGyyGkOOPFWQmHdgXIXzHg-1; Fri, 09 Apr 2021 10:24:07 -0400 X-MC-Unique: hGyyGkOOPFWQmHdgXIXzHg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 423631020C22; Fri, 9 Apr 2021 14:24:06 +0000 (UTC) Received: from x1.home.shazbot.org (ovpn-117-254.rdu2.redhat.com [10.10.117.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8324D19C66; Fri, 9 Apr 2021 14:24:01 +0000 (UTC) Date: Fri, 9 Apr 2021 08:24:00 -0600 From: Alex Williamson To: "Zengtao (B)" Cc: "cohuck@redhat.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jgg@nvidia.com" , "peterx@redhat.com" Subject: Re: [PATCH v1 01/14] vfio: Create vfio_fs_type with inode per device Message-ID: <20210409082400.1004fcef@x1.home.shazbot.org> In-Reply-To: References: <161523878883.3480.12103845207889888280.stgit@gimli.home> <161524004828.3480.1817334832614722574.stgit@gimli.home> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Apr 2021 04:54:23 +0000 "Zengtao (B)" wrote: > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Alex Williamson [mailto:alex.williamson@re= dhat.com] > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B43=E6=9C=889=E6=97=A5= 5:47 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: alex.williamson@redhat.com > > =E6=8A=84=E9=80=81: cohuck@redhat.com; kvm@vger.kernel.org; > > linux-kernel@vger.kernel.org; jgg@nvidia.com; peterx@redhat.com > > =E4=B8=BB=E9=A2=98: [PATCH v1 01/14] vfio: Create vfio_fs_type with ino= de per device > >=20 > > By linking all the device fds we provide to userspace to an address spa= ce > > through a new pseudo fs, we can use tools like > > unmap_mapping_range() to zap all vmas associated with a device. > >=20 > > Suggested-by: Jason Gunthorpe > > Signed-off-by: Alex Williamson > > --- > > drivers/vfio/vfio.c | 54 > > +++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 54 insertions(+) > >=20 > > diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index > > 38779e6fd80c..abdf8d52a911 100644 > > --- a/drivers/vfio/vfio.c > > +++ b/drivers/vfio/vfio.c > > @@ -32,11 +32,18 @@ > > #include > > #include > > #include > > +#include > > +#include =20 > Minor: keep the headers in alphabetical order. They started out that way, but various tree-wide changes ignoring that, and likely oversights on my part as well, has left us with numerous breaks in that rule already. > >=20 > > #define DRIVER_VERSION "0.3" > > #define DRIVER_AUTHOR "Alex Williamson " > > #define DRIVER_DESC "VFIO - User Level meta-driver" > >=20 > > +#define VFIO_MAGIC 0x5646494f /* "VFIO" */ =20 > Move to include/uapi/linux/magic.h ?=20 Hmm, yeah, I suppose it probably should go there. Thanks. FWIW, I'm still working on a next version of this series, currently struggling how to handle an arbitrary number of vmas per user DMA mapping. Thanks, Alex