]> git.baikalelectronics.ru Git - kernel.git/commit
vhost-net: flush outstanding DMAs on memory change
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Dec 2012 22:17:14 +0000 (00:17 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 6 Dec 2012 15:09:18 +0000 (17:09 +0200)
commit0f97eddf067693735628cca3d65c829b9cf4d2bd
tree6b488908fab086a906656894801544210bd64335
parentab54518f0df03e1d3e92114051ed591b40caac6f
vhost-net: flush outstanding DMAs on memory change

When memory map changes, we need to flush outstanding
DMAs as they might in theory reference old memory addresses.
To do this simply stop initiating new DMAs
and wait for ubufs ref count to drop to 0.
Afterwards reset the count back to 1.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/net.c