summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorSi-Wei Liu <si-wei.liu@oracle.com>2023-10-21 12:25:19 +0300
committerMichael S. Tsirkin <mst@redhat.com>2023-11-01 16:20:00 +0300
commit86f6c224c97911b4392cb7b402e6a4ed323a449e (patch)
tree8e390d759719a35753e486accf0480511e08eb80 /drivers/virtio
parent2eacf4b5e3ebe771f0fca0c8913c5a10a1953b72 (diff)
downloadlinux-86f6c224c97911b4392cb7b402e6a4ed323a449e.tar.xz
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>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions