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>
2 files changed
tree: 3c888d6b0e8e568ac6be729b94102de1e1f8f871
  1. .exrc
  2. .gitignore
  3. .gitmodules
  4. .mailmap
  5. .travis.yml
  6. CODING_STYLE
  7. COPYING
  8. COPYING.LIB
  9. Changelog
  10. HACKING
  11. LICENSE
  12. MAINTAINERS
  13. Makefile
  14. Makefile.objs
  15. Makefile.target
  16. README
  17. VERSION
  18. accel.c
  19. aio-posix.c
  20. aio-win32.c
  21. arch_init.c
  22. async.c
  23. audio/
  24. backends/
  25. balloon.c
  26. block.c
  27. block/
  28. blockdev-nbd.c
  29. blockdev.c
  30. blockjob.c
  31. bootdevice.c
  32. bsd-user/
  33. bt-host.c
  34. bt-vhci.c
  35. configure
  36. coroutine-gthread.c
  37. coroutine-sigaltstack.c
  38. coroutine-ucontext.c
  39. coroutine-win32.c
  40. cpu-exec.c
  41. cpus.c
  42. cputlb.c
  43. default-configs/
  44. device-hotplug.c
  45. device_tree.c
  46. disas.c
  47. disas/
  48. dma-helpers.c
  49. docs/
  50. dump.c
  51. exec.c
  52. fpu/
  53. fsdev/
  54. gdb-xml/
  55. gdbstub.c
  56. hmp-commands.hx
  57. hmp.c
  58. hmp.h
  59. hw/
  60. include/
  61. iohandler.c
  62. ioport.c
  63. iothread.c
  64. kvm-all.c
  65. kvm-stub.c
  66. libcacard/
  67. libdecnumber/
  68. linux-headers/
  69. linux-user/
  70. main-loop.c
  71. memory.c
  72. memory_mapping.c
  73. migration/
  74. module-common.c
  75. monitor.c
  76. nbd.c
  77. net/
  78. numa.c
  79. os-posix.c
  80. os-win32.c
  81. page_cache.c
  82. pc-bios/
  83. po/
  84. qapi-schema.json
  85. qapi/
  86. qdev-monitor.c
  87. qdict-test-data.txt
  88. qemu-bridge-helper.c
  89. qemu-char.c
  90. qemu-coroutine-io.c
  91. qemu-coroutine-lock.c
  92. qemu-coroutine-sleep.c
  93. qemu-coroutine.c
  94. qemu-doc.texi
  95. qemu-img-cmds.hx
  96. qemu-img.c
  97. qemu-img.texi
  98. qemu-io-cmds.c
  99. qemu-io.c
  100. qemu-log.c
  101. qemu-nbd.c
  102. qemu-nbd.texi
  103. qemu-options-wrapper.h
  104. qemu-options.h
  105. qemu-options.hx
  106. qemu-seccomp.c
  107. qemu-tech.texi
  108. qemu-timer.c
  109. qemu.nsi
  110. qemu.sasl
  111. qga/
  112. qmp-commands.hx
  113. qmp.c
  114. qobject/
  115. qom/
  116. qtest.c
  117. roms/
  118. rules.mak
  119. savevm.c
  120. scripts/
  121. slirp/
  122. softmmu_template.h
  123. spice-qemu-char.c
  124. stubs/
  125. sysconfigs/
  126. target-alpha/
  127. target-arm/
  128. target-cris/
  129. target-i386/
  130. target-lm32/
  131. target-m68k/
  132. target-microblaze/
  133. target-mips/
  134. target-moxie/
  135. target-openrisc/
  136. target-ppc/
  137. target-s390x/
  138. target-sh4/
  139. target-sparc/
  140. target-tricore/
  141. target-unicore32/
  142. target-xtensa/
  143. tcg-runtime.c
  144. tcg/
  145. tci.c
  146. tests/
  147. thread-pool.c
  148. thunk.c
  149. tpm.c
  150. trace-events
  151. trace/
  152. translate-all.c
  153. translate-all.h
  154. ui/
  155. user-exec.c
  156. util/
  157. version.rc
  158. vl.c
  159. xen-common-stub.c
  160. xen-common.c
  161. xen-hvm-stub.c
  162. xen-hvm.c
  163. xen-mapcache.c