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>
This commit is contained in:
David Gibson 2014-12-19 14:57:27 +11:00 committed by Amit Shah
parent f2f6e00b2e
commit 08f432aa3e
2 changed files with 13 additions and 16 deletions

View file

@ -207,8 +207,6 @@ struct VirtIOSerial {
/* bitmap for identifying active ports */
uint32_t *ports_map;
struct virtio_console_config config;
struct VirtIOSerialPostLoad *post_load;
virtio_serial_conf serial;