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] [day] [month] [year] [list]
Message-ID: <87jzzamerk.fsf@redhat.com>
Date:   Tue, 21 Mar 2023 14:10:23 +0100
From:   Cornelia Huck <cohuck@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>,
        Viktor Prutyanov <viktor@...nix.com>
Cc:     Jason Wang <jasowang@...hat.com>, pasic@...ux.ibm.com,
        farman@...ux.ibm.com, linux-s390@...r.kernel.org,
        kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, yan@...nix.com
Subject: Re: [PATCH v2] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support

On Tue, Mar 21 2023, "Michael S. Tsirkin" <mst@...hat.com> wrote:

> On Tue, Mar 21, 2023 at 12:00:42PM +0300, Viktor Prutyanov wrote:
>> On Tue, Mar 21, 2023 at 5:29 AM Jason Wang <jasowang@...hat.com> wrote:
>> >
>> > On Tue, Mar 21, 2023 at 7:21 AM Viktor Prutyanov <viktor@...nix.com> wrote:
>> > >
>> > > According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature
>> > > indicates that the driver passes extra data along with the queue
>> > > notifications.
>> > >
>> > > In a split queue case, the extra data is 16-bit available index. In a
>> > > packed queue case, the extra data is 1-bit wrap counter and 15-bit
>> > > available index.
>> > >
>> > > Add support for this feature for MMIO and PCI transports. Channel I/O
>> > > transport will not accept this feature.
>> > >
>> > > Signed-off-by: Viktor Prutyanov <viktor@...nix.com>
>> > > ---
>> > >
>> > >  v2: reject the feature in virtio_ccw, replace __le32 with u32
>> > >
>> > >  drivers/s390/virtio/virtio_ccw.c   |  4 +---
>> > >  drivers/virtio/virtio_mmio.c       | 15 ++++++++++++++-
>> > >  drivers/virtio/virtio_pci_common.c | 10 ++++++++++
>> > >  drivers/virtio/virtio_pci_common.h |  4 ++++
>> > >  drivers/virtio/virtio_pci_legacy.c |  2 +-
>> > >  drivers/virtio/virtio_pci_modern.c |  2 +-
>> > >  drivers/virtio/virtio_ring.c       | 17 +++++++++++++++++
>> > >  include/linux/virtio_ring.h        |  2 ++
>> > >  include/uapi/linux/virtio_config.h |  6 ++++++
>> > >  9 files changed, 56 insertions(+), 6 deletions(-)
>> > >
>> > > diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c
>> > > index a10dbe632ef9..d72a59415527 100644
>> > > --- a/drivers/s390/virtio/virtio_ccw.c
>> > > +++ b/drivers/s390/virtio/virtio_ccw.c
>> > > @@ -789,9 +789,7 @@ static u64 virtio_ccw_get_features(struct virtio_device *vdev)
>> > >
>> > >  static void ccw_transport_features(struct virtio_device *vdev)
>> > >  {
>> > > -       /*
>> > > -        * Currently nothing to do here.
>> > > -        */
>> > > +       __virtio_clear_bit(vdev, VIRTIO_F_NOTIFICATION_DATA);
>> >
>> > Is there any restriction that prevents us from implementing
>> > VIRTIO_F_NOTIFICATION_DATA? (Spec seems doesn't limit us from this)
>> 
>> Most likely, nothing.
>
> So pls code it up. It's the same format.

FWIW, the notification data needs to go via the third parameter of
kvm_hypercall3() in virtio_ccw_kvm_notify().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ