]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: max s/g to match qemu
authorJason Wang <jasowang@redhat.com>
Tue, 14 Sep 2010 15:53:05 +0000 (23:53 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 5 Oct 2010 11:33:43 +0000 (13:33 +0200)
commitb14f8d1210e8c4e137017ee5ef25aa752cbaa30e
treed31f3ee226e91854bc97d948a30b80c18b21fa47
parent5eca8f194a28911b4a5773afe1598d62ed08af8f
vhost: max s/g to match qemu

Qemu supports up to UIO_MAXIOV s/g so we have to match that because guest
drivers may rely on this.

Allocate indirect and log arrays dynamically to avoid using too much contigious
memory and make the length of hdr array to match the header length since each
iovec entry has a least one byte.

Test with copying large files w/ and w/o migration in both linux and windows
guests.

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