[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIF
From: |
Eugenio Perez Martin |
Subject: |
Re: [PATCH v1 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA |
Date: |
Tue, 5 Mar 2024 09:05:33 +0100 |
On Mon, Mar 4, 2024 at 8:46 PM Jonah Palmer <jonah.palmer@oracle.com> wrote:
>
> Prevent ioeventfd from being enabled/disabled when a virtio-mmio device
> has negotiated the VIRTIO_F_NOTIFICATION_DATA transport feature.
>
> Due to 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-mmio devices using this feature.
>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> ---
> hw/virtio/virtio-mmio.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> index f99d5851a2..f42ed5c512 100644
> --- a/hw/virtio/virtio-mmio.c
> +++ b/hw/virtio/virtio-mmio.c
> @@ -421,7 +421,8 @@ static void virtio_mmio_write(void *opaque, hwaddr
> offset, uint64_t value,
> virtio_update_irq(vdev);
> break;
> case VIRTIO_MMIO_STATUS:
> - if (!(value & VIRTIO_CONFIG_S_DRIVER_OK)) {
> + if (!(value & VIRTIO_CONFIG_S_DRIVER_OK) &&
> + !virtio_vdev_has_feature(vdev, VIRTIO_F_NOTIFICATION_DATA)) {
> virtio_mmio_stop_ioeventfd(proxy);
> }
>
> @@ -433,7 +434,8 @@ static void virtio_mmio_write(void *opaque, hwaddr
> offset, uint64_t value,
>
> virtio_set_status(vdev, value & 0xff);
>
> - if (value & VIRTIO_CONFIG_S_DRIVER_OK) {
> + if ((value & VIRTIO_CONFIG_S_DRIVER_OK) &&
> + !virtio_vdev_has_feature(vdev, VIRTIO_F_NOTIFICATION_DATA)) {
> virtio_mmio_start_ioeventfd(proxy);
> }
>
> --
> 2.39.3
>
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, (continued)
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Michael S. Tsirkin, 2024/03/08
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Eugenio Perez Martin, 2024/03/08
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/08
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Michael S. Tsirkin, 2024/03/08
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/11
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Michael S. Tsirkin, 2024/03/11
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/12
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Michael S. Tsirkin, 2024/03/12
- Re: [PATCH v1 2/8] virtio-pci: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/12
[PATCH v1 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/04
- Re: [PATCH v1 4/8] virtio-mmio: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA,
Eugenio Perez Martin <=
[PATCH v1 8/8] virtio: Add VIRTIO_F_NOTIFICATION_DATA property definition, Jonah Palmer, 2024/03/04
[PATCH v1 5/8] virtio-ccw: Handle extra notification data, Jonah Palmer, 2024/03/04
[PATCH v1 6/8] virtio-ccw: Lock ioeventfd state with VIRTIO_F_NOTIFICATION_DATA, Jonah Palmer, 2024/03/04
[PATCH v1 3/8] virtio-mmio: Handle extra notification data, Jonah Palmer, 2024/03/04
[PATCH v1 7/8] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits, Jonah Palmer, 2024/03/04
Re: [PATCH v1 0/8] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support, Jason Wang, 2024/03/06