vhost: fix guest to host physical address mapping
authorYuan Wang <yuanx.wang@intel.com>
Mon, 17 Jan 2022 16:20:27 +0000 (16:20 +0000)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 8 Feb 2022 11:13:22 +0000 (12:13 +0100)
commit8b764f460f168505b9335bdbd0e0fead8edbc188
tree527a1c97de9da7797de4461dcfa607095a5187c4
parent38e0f108c44fe963db1d52d3cb7bd832962ba280
vhost: fix guest to host physical address mapping

Async copy fails when looking up hpa in the gpa to hpa mapping table.
This happens because the gpa is matched exactly in the merged
mapping table, and the merge loses the mapping entries.
A new range comparison method is introduced to solve this issue.

Fixes: 6563cf92380a ("vhost: fix async copy on multi-page buffers")
Cc: stable@dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/vhost/vhost.h