linux/drivers/virtio
Ying Gao 528d92bfc0 virtio_input: Improve freeze handling
When executing suspend to ram, if lacking the operations
to reset device and free unused buffers before deleting
a vq, resource leaks and inconsistent device status will
appear.

According to chapter "3.3.1 Driver Requirements: Device Cleanup:"
of virtio-specification:
  Driver MUST ensure a virtqueue isn’t live
  (by device reset) before removing exposed
  buffers.

Therefore, modify the virtinput_freeze function to reset the
device and delete the unused buffers before deleting the
virtqueue, just like virtinput_remove does.

Co-developed-by: Ying Xu <ying123.xu@samsung.com>
Signed-off-by: Ying Xu <ying123.xu@samsung.com>
Co-developed-by: Junnan Wu <junnan01.wu@samsung.com>
Signed-off-by: Junnan Wu <junnan01.wu@samsung.com>
Signed-off-by: Ying Gao <ying01.gao@samsung.com>
Message-Id: <20250812095118.3622717-1-ying01.gao@samsung.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-08-26 03:38:19 -04:00
..
Kconfig virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
Makefile virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio.c virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00
virtio_anchor.c
virtio_balloon.c mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize() 2025-07-13 16:38:25 -07:00
virtio_debug.c virtio: introduce extended features 2025-07-08 18:04:58 +02:00
virtio_dma_buf.c virtio: virtio_dma_buf: fix missing parameter documentation 2025-08-01 09:11:08 -04:00
virtio_input.c virtio_input: Improve freeze handling 2025-08-26 03:38:19 -04:00
virtio_mem.c mm/page_isolation: remove migratetype parameter from more functions 2025-07-13 16:38:18 -07:00
virtio_mmio.c virtio-mmio: Remove virtqueue list from mmio device 2025-08-01 09:11:07 -04:00
virtio_pci_admin_legacy_io.c virtio-pci: Introduce APIs to execute legacy IO admin commands 2023-12-19 11:51:33 -07:00
virtio_pci_common.c virtio_pci: Add support for PCIe Function Level Reset 2025-01-27 09:39:26 -05:00
virtio_pci_common.h VFIO updates for v6.13 2024-11-27 12:57:03 -08:00
virtio_pci_legacy.c virtio: rename find_vqs_info() op to find_vqs() 2024-07-17 05:20:57 -04:00
virtio_pci_legacy_dev.c virtio_pci: Fix misleading comment for queue vector 2025-08-26 03:38:10 -04:00
virtio_pci_modern.c virtio_pci_modern: allow configuring extended features 2025-07-08 18:05:07 +02:00
virtio_pci_modern_dev.c virtio_pci: Fix misleading comment for queue vector 2025-08-26 03:38:10 -04:00
virtio_ring.c virtio: document ENOSPC 2025-08-01 09:11:07 -04:00
virtio_rtc_arm.c virtio_rtc: Add Arm Generic Timer cross-timestamping 2025-05-27 10:27:54 -04:00
virtio_rtc_class.c virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_driver.c virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_internal.h virtio_rtc: Add RTC class driver 2025-05-27 10:27:54 -04:00
virtio_rtc_ptp.c virtio_rtc: Add PTP clocks 2025-05-27 10:27:54 -04:00
virtio_vdpa.c virtio, vhost: features, fixes 2025-08-01 14:17:48 -07:00