vhost: optimize out no-change assignment
commit4e789564d30a9c5f9408657857560a88386b0ac4
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 31 Mar 2011 13:45:51 +0000 (31 15:45 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Apr 2011 10:30:15 +0000 (7 13:30 +0300)
treea43046b0d27c913b9a296e1a28f92c7a66c4b034
parentf5a4e64f8e12d088a11b9a2743875cc88671e13a
vhost: optimize out no-change assignment

Cirrus VGA (at least) calls register memory region
with the same values again and again. The
registration in vhost-net slows this a lot,
optimize by checking that the same data is already registered.

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