OSDN Git Service

vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()
authorXie Yongji <xieyongji@bytedance.com>
Tue, 31 Aug 2021 10:36:30 +0000 (18:36 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 6 Sep 2021 11:20:57 +0000 (07:20 -0400)
commit22af48cf91aae5f2fd32fe811d9be1c52d7a801b
treea6073f9bcdd78790114bf3b4be8aaf35acd46106
parentc10fb9454adc80c062151c6a436047e1fa59e99f
vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()

The upcoming patch is going to support VA mapping/unmapping.
So let's factor out the logic of PA mapping/unmapping firstly
to make the code more readable.

Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210831103634.33-10-xieyongji@bytedance.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vdpa.c