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]
Message-ID: <20211105083108.kfubtzdbucs2drzs@steredhat>
Date:   Fri, 5 Nov 2021 09:31:08 +0100
From:   Stefano Garzarella <sgarzare@...hat.com>
To:     Jason Wang <jasowang@...hat.com>
Cc:     virtualization <virtualization@...ts.linux-foundation.org>,
        Parav Pandit <parav@...dia.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] vdpa: add driver_override support

On Fri, Nov 05, 2021 at 04:26:44PM +0800, Jason Wang wrote:
>On Fri, Nov 5, 2021 at 4:05 PM Stefano Garzarella <sgarzare@...hat.com> wrote:
>>
>> On Fri, Nov 05, 2021 at 11:01:30AM +0800, Jason Wang wrote:
>> >On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella <sgarzare@...hat.com> wrote:
>> >>
>> >> `driver_override` allows to control which of the vDPA bus drivers
>> >> binds to a vDPA device.
>> >>
>> >> If `driver_override` is not set, the previous behaviour is followed:
>> >> devices use the first vDPA bus driver loaded (unless auto binding
>> >> is disabled).
>> >>
>> >> Tested on Fedora 34 with driverctl(8):
>> >>   $ modprobe virtio-vdpa
>> >>   $ modprobe vhost-vdpa
>> >>   $ modprobe vdpa-sim-net
>> >>
>> >>   $ vdpa dev add mgmtdev vdpasim_net name dev1
>> >>
>> >>   # dev1 is attached to the first vDPA bus driver loaded
>> >>   $ driverctl -b vdpa list-devices
>> >>     dev1 virtio_vdpa
>> >>
>> >>   $ driverctl -b vdpa set-override dev1 vhost_vdpa
>> >>
>> >>   $ driverctl -b vdpa list-devices
>> >>     dev1 vhost_vdpa [*]
>> >>
>> >>   Note: driverctl(8) integrates with udev so the binding is
>> >>   preserved.
>> >>
>> >> Suggested-by: Jason Wang <jasowang@...hat.com>
>> >> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
>> >> ---
>> >>  include/linux/vdpa.h |  2 ++
>> >>  drivers/vdpa/vdpa.c  | 74 ++++++++++++++++++++++++++++++++++++++++++++
>> >>  2 files changed, 76 insertions(+)
>> >>
>> >> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
>> >> index c3011ccda430..ae34015b37b7 100644
>> >> --- a/include/linux/vdpa.h
>> >> +++ b/include/linux/vdpa.h
>> >> @@ -64,6 +64,7 @@ struct vdpa_mgmt_dev;
>> >>   * struct vdpa_device - representation of a vDPA device
>> >>   * @dev: underlying device
>> >>   * @dma_dev: the actual device that is performing DMA
>> >> + * @driver_override: driver name to force a match
>> >
>> >This seems useless?
>>
>> I'm a bit lost, do you mean we should remove the documentation of
>> `driver_override`?
>
>I misread the code which was misled by vdpa_mgmt_dev above:(

Yeah, the same thing happened to me now while double checking ;-)

>
>The code should be fine.
>
>So:
>
>Acked-by: Jason Wang <jasowang@...hat.com>
>

Thanks,
Stefano

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ