linux-stable/drivers/vdpa
Si-Wei Liu 86f6c224c9 vdpa_sim: implement .reset_map support
In order to reduce excessive memory mapping cost in live migration and
VM reboot, it is desirable to decouple the vhost-vdpa IOTLB abstraction
from the virtio device life cycle, i.e. mappings can be kept intact
across virtio device reset. Leverage the .reset_map callback, which is
meant to destroy the iotlb on the given ASID and recreate the 1:1
passthrough/identity mapping. To be consistent, the mapping on device
creation is initiailized to passthrough/identity with PA 1:1 mapped as
IOVA. With this the device .reset op doesn't have to maintain and clean
up memory mappings by itself.

Additionally, implement .compat_reset to cater for older userspace,
which may wish to see mapping to be cleared during reset.

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Tested-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <1697880319-4937-8-git-send-email-si-wei.liu@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
2023-11-01 09:20:00 -04:00
..
alibaba vdpa: multiple address spaces support 2022-05-31 12:44:27 -04:00
ifcvf vDPA/ifcvf: implement new accessors for vq_state 2023-07-03 12:15:12 -04:00
mlx5 vdpa/mlx5: implement .reset_map driver op 2023-11-01 09:20:00 -04:00
pds pds_vdpa: fix up debugfs feature bit printing 2023-08-10 15:51:46 -04:00
solidrun vdpa/snet: implement the resume vDPA callback 2023-06-27 10:47:08 -04:00
vdpa_sim vdpa_sim: implement .reset_map support 2023-11-01 09:20:00 -04:00
vdpa_user vduse: make vduse_class constant 2023-11-01 09:19:59 -04:00
virtio_pci vp_vdpa: fix the crash in hot unplug with vp_vdpa 2023-03-10 03:48:27 -05:00
Kconfig pds_vdpa: pds_vdps.rst and Kconfig 2023-06-27 10:47:09 -04:00
Makefile pds_vdpa: Add new vDPA driver for AMD/Pensando DSC 2023-06-27 10:47:08 -04:00
vdpa.c vdpa: Enable strict validation for netlinks ops 2023-08-10 15:24:28 -04:00