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: <CAPv0NP79iv=s-tdTWwb_3cWbucJSH7LTDYo0VxjdnWvpjguK3Q@mail.gmail.com>
Date:   Wed, 22 Mar 2023 20:21:12 +0300
From:   Viktor Prutyanov <viktor@...nix.com>
To:     Cornelia Huck <cohuck@...hat.com>
Cc:     "Michael S. Tsirkin" <mst@...hat.com>, 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 v4] virtio: add VIRTIO_F_NOTIFICATION_DATA feature support

On Wed, Mar 22, 2023 at 7:42 PM Cornelia Huck <cohuck@...hat.com> wrote:
>
> On Wed, Mar 22 2023, "Michael S. Tsirkin" <mst@...hat.com> wrote:
>
> > On Wed, Mar 22, 2023 at 05:10:31PM +0300, Viktor Prutyanov 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, channel I/O and modern PCI
> >> transports.
> >>
> >> Signed-off-by: Viktor Prutyanov <viktor@...nix.com>
> >> ---
> >>  v4: remove VP_NOTIFY macro and legacy PCI support, add
> >>     virtio_ccw_kvm_notify_with_data to virtio_ccw
> >>  v3: support feature in virtio_ccw, remove VM_NOTIFY, use avail_idx_shadow,
> >>     remove byte swap, rename to vring_notification_data
> >>  v2: reject the feature in virtio_ccw, replace __le32 with u32
> >>
> >>  Tested with disabled VIRTIO_F_NOTIFICATION_DATA on qemu-system-s390x
> >>  (virtio-blk-ccw), qemu-system-riscv64 (virtio-blk-device,
> >>  virtio-rng-device), qemu-system-x86_64 (virtio-blk-pci, virtio-net-pci)
> >>  to make sure nothing is broken.
> >>  Tested with enabled VIRTIO_F_NOTIFICATION_DATA on 64-bit RISC-V Linux
> >>  and my hardware implementation of virtio-rng.
> >
> > what did you test? virtio pci? mmio? guessing not ccw...
> >
> > Cornelia could you hack up something to quickly test ccw?
>
> Hm, I'm not entirely sure how notification data is supposed to be used
> in real life -- Viktor, what is your virtio-rng implementation doing;
> can this be hacked into all transports?

In hardware implementation of split VirtIO queue, the notification data feature
saves time on a memory request to avail_idx from the device side. I can
definitely say about MMIO, but most likely it is also useful for PCI.
It is also written here that this feature was added for efficiency:
https://www.mail-archive.com/virtio-dev@lists.oasis-open.org/msg02728.html
Also DPDK has support for this feature in VirtIO PCI:
https://github.com/DPDK/dpdk/commit/7e72f3ec1a8abefd9321a61e484846e16177f5b1

>
> (Also, if the other ccw folks have something handy, please speak up :)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ