All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Jonah Palmer <jonah.palmer@oracle.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com, jasowang@redhat.com, eperezma@redhat.com,
	si-wei.liu@oracle.com, boris.ostrovsky@oracle.com,
	raphael@enfabrica.net, kwolf@redhat.com, hreitz@redhat.com,
	pasic@linux.ibm.com, borntraeger@linux.ibm.com,
	farman@linux.ibm.com, richard.henderson@linaro.org,
	david@redhat.com, iii@linux.ibm.com, cohuck@redhat.com,
	pbonzini@redhat.com, fam@euphon.net, stefanha@redhat.com,
	qemu-block@nongnu.org, qemu-s390x@nongnu.org,
	virtio-fs@lists.linux.dev
Subject: Re: [RFC 6/8] virtio-ccw: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA
Date: Sat, 2 Mar 2024 16:35:08 +0100	[thread overview]
Message-ID: <356dff14-af44-403b-9a9c-b4ea9e156f19@redhat.com> (raw)
In-Reply-To: <20240301134330.4191007-7-jonah.palmer@oracle.com>

On 01/03/2024 14.43, Jonah Palmer wrote:
> Prevent ioeventfd from being enabled/disabled when a virtio-ccw device
> has negotiated the VIRTIO_F_NOTIFICATION_DATA transport feature.
> 
> Due to the ioeventfd not being able to carry the extra data associated
> with this feature, the ioeventfd should be left in a disabled state for
> emulated virtio-ccw devices using this feature.
> 
> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> ---
>   hw/s390x/virtio-ccw.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index b4676909dd..936ba78fda 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -530,14 +530,16 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
>               if (ret) {
>                   break;
>               }
> -            if (!(status & VIRTIO_CONFIG_S_DRIVER_OK)) {
> +            if (!(status & VIRTIO_CONFIG_S_DRIVER_OK) &&
> +                !virtio_vdev_has_feature(vdev, VIRTIO_F_NOTIFICATION_DATA)) {
>                   virtio_ccw_stop_ioeventfd(dev);
>               }
>               if (virtio_set_status(vdev, status) == 0) {
>                   if (vdev->status == 0) {
>                       virtio_ccw_reset_virtio(dev);
>                   }
> -                if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
> +                if ((status & VIRTIO_CONFIG_S_DRIVER_OK) &&
> +                    !virtio_vdev_has_feature(vdev, VIRTIO_F_NOTIFICATION_DATA)) {
>                       virtio_ccw_start_ioeventfd(dev);
>                   }
>                   sch->curr_status.scsw.count = ccw.count - sizeof(status);

Acked-by: Thomas Huth <thuth@redhat.com>


  reply	other threads:[~2024-03-02 15:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 13:43 [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support Jonah Palmer
2024-03-01 13:43 ` [RFC 1/8] virtio/virtio-pci: Handle extra notification data Jonah Palmer
2024-03-01 19:31   ` Eugenio Perez Martin
2024-03-04 17:04     ` Jonah Palmer
2024-03-04 17:24       ` Eugenio Perez Martin
2024-03-04 17:32         ` Jonah Palmer
2024-03-01 19:55   ` Eugenio Perez Martin
2024-03-04 17:08     ` Jonah Palmer
2024-03-01 13:43 ` [RFC 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA Jonah Palmer
2024-03-01 19:44   ` Eugenio Perez Martin
2024-03-01 13:43 ` [RFC 3/8] virtio-mmio: Handle extra notification data Jonah Palmer
2024-03-01 13:43 ` [RFC 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA Jonah Palmer
2024-03-01 13:43 ` [RFC 5/8] virtio-ccw: Handle extra notification data Jonah Palmer
2024-03-02 15:33   ` Thomas Huth
2024-03-01 13:43 ` [RFC 6/8] virtio-ccw: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA Jonah Palmer
2024-03-02 15:35   ` Thomas Huth [this message]
2024-03-01 13:43 ` [RFC 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits Jonah Palmer
2024-03-01 20:04   ` Eugenio Perez Martin
2024-03-04 17:12     ` Jonah Palmer
2024-03-01 13:43 ` [RFC 8/8] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition Jonah Palmer
2024-03-01 20:05   ` Eugenio Perez Martin
2024-03-01 20:32 ` [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support Eugenio Perez Martin
2024-03-05  3:21   ` Xinying Yu
2024-03-05  6:56     ` Thomas Huth
2024-03-05  8:09     ` Eugenio Perez Martin
2024-03-06  9:17       ` Xinying Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=356dff14-af44-403b-9a9c-b4ea9e156f19@redhat.com \
    --to=thuth@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=fam@euphon.net \
    --cc=farman@linux.ibm.com \
    --cc=hreitz@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=jonah.palmer@oracle.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=raphael@enfabrica.net \
    --cc=richard.henderson@linaro.org \
    --cc=si-wei.liu@oracle.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-fs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.