lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 31 Aug 2022 06:14:37 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Jason Gunthorpe <jgg@...pe.ca>
CC:     Zhenyu Wang <zhenyuw@...ux.intel.com>,
        "Wang, Zhi A" <zhi.a.wang@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        "Joonas Lahtinen" <joonas.lahtinen@...ux.intel.com>,
        "Vivi, Rodrigo" <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Eric Farman <farman@...ux.ibm.com>,
        Matthew Rosato <mjrosato@...ux.ibm.com>,
        Halil Pasic <pasic@...ux.ibm.com>,
        Vineeth Vijayan <vneethv@...ux.ibm.com>,
        "Peter Oberparleiter" <oberpar@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>,
        Tony Krowiak <akrowiak@...ux.ibm.com>,
        Jason Herne <jjherne@...ux.ibm.com>,
        Harald Freudenberger <freude@...ux.ibm.com>,
        Diana Craciun <diana.craciun@....nxp.com>,
        "Alex Williamson" <alex.williamson@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>,
        Longfang Liu <liulongfang@...wei.com>,
        Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Eric Auger <eric.auger@...hat.com>,
        Kirti Wankhede <kwankhede@...dia.com>,
        Leon Romanovsky <leon@...nel.org>,
        Abhishek Sahu <abhsahu@...dia.com>,
        "intel-gvt-dev@...ts.freedesktop.org" 
        <intel-gvt-dev@...ts.freedesktop.org>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "Liu, Yi L" <yi.l.liu@...el.com>
Subject: RE: [PATCH 15/15] vfio: Add struct device to vfio_device

> From: Jason Gunthorpe <jgg@...pe.ca>
> Sent: Wednesday, August 31, 2022 8:32 AM
> 
> On Sun, Aug 28, 2022 at 01:10:37AM +0800, Kevin Tian wrote:
> > From: Yi Liu <yi.l.liu@...el.com>
> >
> > and replace kref. With it a 'vfio-dev/vfioX' node is created under the
> > sysfs path of the parent, indicating the device is bound to a vfio
> > driver, e.g.:
> >
> > /sys/devices/pci0000\:6f/0000\:6f\:01.0/vfio-dev/vfio0
> >
> > It is also a preparatory step toward adding cdev for supporting future
> > device-oriented uAPI.
> >
> > Suggested-by: Jason Gunthorpe <jgg@...dia.com>
> > Signed-off-by: Yi Liu <yi.l.liu@...el.com>
> > Signed-off-by: Kevin Tian <kevin.tian@...el.com>
> > ---
> >  drivers/vfio/vfio_main.c | 70 +++++++++++++++++++++++++++++++++-------
> >  include/linux/vfio.h     |  6 ++--
> >  2 files changed, 61 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
> > index 0c5d120aeced..9ad0cbb83f1c 100644
> > --- a/drivers/vfio/vfio_main.c
> > +++ b/drivers/vfio/vfio_main.c
> > @@ -46,6 +46,8 @@ static struct vfio {
> >  	struct mutex			group_lock; /* locks group_list */
> >  	struct ida			group_ida;
> >  	dev_t				group_devt;
> > +	struct class			*device_class;
> > +	struct ida			device_ida;
> >  } vfio;
> >
> >  struct vfio_iommu_driver {
> > @@ -524,11 +526,19 @@ EXPORT_SYMBOL_GPL(_vfio_alloc_device);
> >   *
> >   * Only vfio-ccw driver should call this interface.
> >   */
> > +static void vfio_device_release(struct device *dev);
> 
> Since you added this new function in patch 1, it would be nice to
> place it in a way that avoids this forward reference in this patch
> 
> >  	ret = alloc_chrdev_region(&vfio.group_devt, 0, MINORMASK + 1,
> "vfio");
> 
> I think we should change this "vfio" string at this point, it is
> really the group fd, so "vfio_group" ?
> 
> It only shows in procfs.
> 

All make sense and fixed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ