aboutsummaryrefslogtreecommitdiff
path: root/hw/watchdog
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-01-31 11:29:01 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-02-06 20:44:08 +0200
commit3b3b0628217e2726069990ff9942a5d6d9816bd7 (patch)
tree0e6f5e0f5d38ceb536ccd51bb6092c6d8c1e94a7 /hw/watchdog
parent3724650db07057333879484c8bc7d900b5c1bf8e (diff)
downloadqemu-3b3b0628217e2726069990ff9942a5d6d9816bd7.zip
qemu-3b3b0628217e2726069990ff9942a5d6d9816bd7.tar.gz
qemu-3b3b0628217e2726069990ff9942a5d6d9816bd7.tar.bz2
virtio: slim down allocation of VirtQueueElements
Build the addresses and s/g lists on the stack, and then copy them to a VirtQueueElement that is just as big as required to contain this particular s/g list. The cost of the copy is minimal compared to that of a large malloc. When virtqueue_map is used on the destination side of migration or on loadvm, the iovecs have already been split at memory region boundary, so we can just reuse the out_num/in_num we find in the file. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/watchdog')
0 files changed, 0 insertions, 0 deletions