[PATCH 0/2] s390x/ap: fix hang when mdev attached to guest is removed

Tony Krowiak posted 2 patches 11 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230530225544.280031-1-akrowiak@linux.ibm.com
Maintainers: Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>, Thomas Huth <thuth@redhat.com>, Tony Krowiak <akrowiak@linux.ibm.com>, Halil Pasic <pasic@linux.ibm.com>, Jason Herne <jjherne@linux.ibm.com>, "Michael S. Tsirkin" <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
hw/vfio/ap.c               | 113 +++++++++++++++++++++++++++++++++++++
linux-headers/linux/vfio.h |   9 +++
2 files changed, 122 insertions(+)
[PATCH 0/2] s390x/ap: fix hang when mdev attached to guest is removed
Posted by Tony Krowiak 11 months, 1 week ago
When a user attempts to remove a vfio-ap mediated device attached to a
guest, the operation hangs until the mdev's fd is closed by the guest
(i.e., the guest is shut down). This patch series provides userspace 
(i.e., qemu) code to handle device unplug requests for AP. When notified
that the mdev is being removed, the handler will unplug the device, thus
avoiding the hang condition.

Tony Krowiak (2):
  linux-headers: Update with vfio_ap IRQ index mapping
  s390x/ap: Wire up the device request notifier interface

 hw/vfio/ap.c               | 113 +++++++++++++++++++++++++++++++++++++
 linux-headers/linux/vfio.h |   9 +++
 2 files changed, 122 insertions(+)

-- 
2.31.1
Re: [PATCH 0/2] s390x/ap: fix hang when mdev attached to guest is removed
Posted by Anthony Krowiak 11 months, 1 week ago
The required kernel changes associated with the patch are here:

https://lore.kernel.org/linux-s390/20230530223538.279198-1-akrowiak@linux.ibm.com/

On 5/30/23 6:55 PM, Tony Krowiak wrote:
> When a user attempts to remove a vfio-ap mediated device attached to a
> guest, the operation hangs until the mdev's fd is closed by the guest
> (i.e., the guest is shut down). This patch series provides userspace
> (i.e., qemu) code to handle device unplug requests for AP. When notified
> that the mdev is being removed, the handler will unplug the device, thus
> avoiding the hang condition.
> 
> Tony Krowiak (2):
>    linux-headers: Update with vfio_ap IRQ index mapping
>    s390x/ap: Wire up the device request notifier interface
> 
>   hw/vfio/ap.c               | 113 +++++++++++++++++++++++++++++++++++++
>   linux-headers/linux/vfio.h |   9 +++
>   2 files changed, 122 insertions(+)
>