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:   Mon, 18 Jan 2021 14:16:26 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Cornelia Huck <cohuck@...hat.com>
CC:     Max Gurtovoy <mgurtovoy@...dia.com>, <alex.williamson@...hat.com>,
        <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <liranl@...dia.com>, <oren@...dia.com>, <tzahio@...dia.com>,
        <leonro@...dia.com>, <yarong@...dia.com>, <aviadye@...dia.com>,
        <shahafs@...dia.com>, <artemp@...dia.com>, <kwankhede@...dia.com>,
        <ACurrid@...dia.com>, <gmataev@...dia.com>, <cjia@...dia.com>
Subject: Re: [PATCH RFC v1 0/3] Introduce vfio-pci-core subsystem

On Mon, Jan 18, 2021 at 05:00:09PM +0100, Cornelia Huck wrote:

> > You can say that all the HW specific things are in the mlx5_vfio_pci
> > driver. It is an unusual driver because it must bind to both the PCI
> > VF with a pci_driver and to the mlx5_core PF using an
> > auxiliary_driver. This is needed for the object lifetimes to be
> > correct.
> 
> Hm... I might be confused about the usage of the term 'driver' here.
> IIUC, there are two drivers, one on the pci bus and one on the
> auxiliary bus. Is the 'driver' you're talking about here more the
> module you load (and not a driver in the driver core sense?)

Here "driver" would be the common term meaning the code that realizes
a subsytem for HW - so mlx5_vfio_pci is a VFIO driver because it
ultimately creates a /dev/vfio* through the vfio subsystem.

The same way we usually call something like mlx5_en an "ethernet
driver" not just a "pci driver"

> Yes, sure. But it also shows that mlx5_vfio_pci aka the device-specific
> code is rather small in comparison to the common vfio-pci code.
> Therefore my question whether it will gain more specific changes (that
> cannot be covered via the auxiliary driver.)

I'm not sure what you mean "via the auxiliary driver" - there is only
one mlx5_vfio_pci, and the non-RFC version with all the migration code
is fairly big.

The pci_driver contributes a 'struct pci_device *' and the
auxiliary_driver contributes a 'struct mlx5_core_dev *'. mlx5_vfio_pci
fuses them together into a VFIO device. Depending on the VFIO
callback, it may use an API from the pci_device or from the
mlx5_core_dev device, or both.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ