]> xenbits.xensource.com Git - qemu-xen.git/commit
virtio-serial: Don't keep a persistent copy of config space
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 19 Dec 2014 03:57:27 +0000 (14:57 +1100)
committerAmit Shah <amit.shah@redhat.com>
Mon, 5 Jan 2015 07:20:27 +0000 (12:50 +0530)
commit08f432aa3eb62d6d781eaa085e161e8628a9a538
tree3c888d6b0e8e568ac6be729b94102de1e1f8f871
parentf2f6e00b2e27b65edaa6ce5cb01770c973cbf8fb
virtio-serial: Don't keep a persistent copy of config space

The 'config' field in the VirtIOSerial structure keeps a copy of the virtio
console's config space as visible to the guest, that is to say, in guest
endianness.  This is fiddly to maintain, because on some targets, such as
powerpc, the "guest endianness" can change when a new guest OS boots.

In fact, there's no need to maintain such a guest view of config space -
instead we can reconstruct it from host-format data when it is accessed
with get_config.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
hw/char/virtio-serial-bus.c
include/hw/virtio/virtio-serial.h