lkml.org 
[lkml]   [2021]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v1 01/14] vfio: Create vfio_fs_type with inode per device
On Fri, 9 Apr 2021 04:54:23 +0000
"Zengtao (B)" <prime.zeng@hisilicon.com> wrote:

> > -----邮件原件-----
> > 发件人: Alex Williamson [mailto:alex.williamson@redhat.com]
> > 发送时间: 2021年3月9日 5:47
> > 收件人: alex.williamson@redhat.com
> > 抄送: cohuck@redhat.com; kvm@vger.kernel.org;
> > linux-kernel@vger.kernel.org; jgg@nvidia.com; peterx@redhat.com
> > 主题: [PATCH v1 01/14] vfio: Create vfio_fs_type with inode per device
> >
> > By linking all the device fds we provide to userspace to an address space
> > through a new pseudo fs, we can use tools like
> > unmap_mapping_range() to zap all vmas associated with a device.
> >
> > Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> > Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > ---
> > drivers/vfio/vfio.c | 54
> > +++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 54 insertions(+)
> >
> > 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 <linux/vfio.h>
> > #include <linux/wait.h>
> > #include <linux/sched/signal.h>
> > +#include <linux/pseudo_fs.h>
> > +#include <linux/mount.h>
> 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.

> >
> > #define DRIVER_VERSION "0.3"
> > #define DRIVER_AUTHOR "Alex Williamson <alex.williamson@redhat.com>"
> > #define DRIVER_DESC "VFIO - User Level meta-driver"
> >
> > +#define VFIO_MAGIC 0x5646494f /* "VFIO" */
> Move to include/uapi/linux/magic.h ?

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

\
 
 \ /
  Last update: 2021-04-09 16:25    [W:0.068 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site