virtio-serial-bus: use virtio wrappers to access headers
commite0ab7fac65dc75573d3f02105c80981be4f49c2d
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Jun 2014 17:49:31 +0000 (24 19:49 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 29 Jun 2014 16:39:43 +0000 (29 19:39 +0300)
tree7882cd5b7aa199debd7be38d3ad77cca5088536a
parent8c085dbe6d1e3fb3f18cdd05e67980a529a3ba4a
virtio-serial-bus: use virtio wrappers to access headers

We also fix max_nr_ports at reset time as the device endianness may have
changed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
[ pass VirtIODevice * to memory accessors,
  fix max_nr_ports at reset time,
  Greg Kurz <gkurz@linux.vnet.ibm.com> ]
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/char/virtio-serial-bus.c