vhost: fix vring address handling during live migration
authorTiwei Bie <tiwei.bie@intel.com>
Mon, 19 Aug 2019 11:34:56 +0000 (19:34 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:57 +0000 (15:00 +0200)
commit72d002b3ebda4686306cc5124b7a8bdf627dba0a
tree7660b3f29ce323dbbdd3119b7022b84a3e618434
parent37f7c1b609b67d26cbdd4c16a3ebc85e8d63e6dd
vhost: fix vring address handling during live migration

When live migration starts, QEMU will set ring addrs again for
each virtqueue. In this case, we should try to translate ring
addrs after we invalidating the ring, otherwise virtqueues can
be enabled with the addrs untranslated. Besides, also leverage
the access_ok flag in non-IOMMU case to prevent the data path
accessing invalidated virtqueues.

Fixes: 5a4933e56be4 ("vhost: postpone ring address translations at kick time only")
Cc: stable@dpdk.org
Reported-by: Yilong Lv <lvyilong.lyl@alibaba-inc.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost_user.c