vhost: fix dirty page logging missing

Packets data are directly copied when doing batch enqueue, add missed
dirty page logging after memory copy.

Fixes: ef861692c3 ("vhost: add packed ring batch enqueue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
Marvin Liu 2019-11-04 19:15:47 +08:00 committed by Ferruh Yigit
parent a76552d48f
commit 4da3dd4885

View File

@ -1108,6 +1108,10 @@ virtio_dev_rx_batch_packed(struct virtio_net *dev,
pkts[i]->pkt_len);
}
vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)
vhost_log_cache_write_iova(dev, vq, descs[avail_idx + i].addr,
lens[i]);
vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE)
ids[i] = descs[avail_idx + i].id;