Change default PCI class of virtio-console to PCI_CLASS_SERIAL_OTHER

We're using PCI_CLASS_DISPLAY_OTHER now, but qemu-kvm.git is using
PCI_CLASS_OTHERS because:

  "As a PCI_CLASS_DISPLAY_OTHER, it reduces primary display somehow on
   Windows XP (possibly Windows disables acceleration since it fails
   to find a driver)."

While this is valid, many versions of X will get confused by it.
Class major number of 0 gets treated as a possibly prehistoric VGA
device, and then the autoconfig logic gets confused trying to figure
out whether the virtio console or the pv vga device are the real VGA.

We should really set a proper class ID. 0x0780 (serial / other) seems
most appropriate. This shouldn't require any kernel changes, the
modalias for virtio looks like:

  alias:          pci:v00001AF4d*sv*sd*bc*sc*i*

so won't care what the base class or subclass are.

It shows up in the guest as:

  00:05.0 Communication controller: Qumranet, Inc. Virtio console

A new qdev type is introduced to allow devices using the old class
to be created for compatibility with qemu-0.10.x.

Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2 files changed
tree: 4df2e3d4e8fbc2fe53cf3ef13007b83ad41c73c3
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. fpu/
  6. gdb-xml/
  7. hw/
  8. linux-user/
  9. pc-bios/
  10. slirp/
  11. target-alpha/
  12. target-arm/
  13. target-cris/
  14. target-i386/
  15. target-m68k/
  16. target-microblaze/
  17. target-mips/
  18. target-ppc/
  19. target-sh4/
  20. target-sparc/
  21. tcg/
  22. tests/
  23. .gitignore
  24. a.out.h
  25. acl.c
  26. acl.h
  27. aes.c
  28. aes.h
  29. aio.c
  30. alpha-dis.c
  31. alpha.ld
  32. arm-dis.c
  33. arm-semi.c
  34. arm.ld
  35. balloon.h
  36. block.c
  37. block.h
  38. block_int.h
  39. bswap.h
  40. bt-host.c
  41. bt-host.h
  42. bt-vhci.c
  43. buffered_file.c
  44. buffered_file.h
  45. cache-utils.c
  46. cache-utils.h
  47. Changelog
  48. cmd.c
  49. cmd.h
  50. cocoa.m
  51. CODING_STYLE
  52. configure
  53. console.c
  54. console.h
  55. COPYING
  56. COPYING.LIB
  57. cpu-all.h
  58. cpu-common.h
  59. cpu-defs.h
  60. cpu-exec.c
  61. cris-dis.c
  62. curses.c
  63. curses_keys.h
  64. cutils.c
  65. d3des.c
  66. d3des.h
  67. def-helper.h
  68. device_tree.c
  69. device_tree.h
  70. dis-asm.h
  71. disas.c
  72. disas.h
  73. dma-helpers.c
  74. dma.h
  75. dyngen-exec.h
  76. elf.h
  77. elf_ops.h
  78. exec-all.h
  79. exec.c
  80. feature_to_c.sh
  81. gdbstub.c
  82. gdbstub.h
  83. gen-icount.h
  84. host-utils.c
  85. host-utils.h
  86. hostregs_helper.h
  87. hpet.h
  88. hppa-dis.c
  89. hppa.ld
  90. hxtool
  91. i386-dis.c
  92. i386.ld
  93. ia64.ld
  94. ioport-user.c
  95. ioport.c
  96. ioport.h
  97. keymaps.c
  98. keymaps.h
  99. kqemu.c
  100. kqemu.h
  101. kvm-all.c
  102. kvm.h
  103. libfdt_env.h
  104. LICENSE
  105. loader.c
  106. m68k-dis.c
  107. m68k-semi.c
  108. m68k.ld
  109. MAINTAINERS
  110. Makefile
  111. Makefile.hw
  112. Makefile.target
  113. microblaze-dis.c
  114. migration-exec.c
  115. migration-tcp.c
  116. migration.c
  117. migration.h
  118. mips-dis.c
  119. mips.ld
  120. mipsel.ld
  121. module.c
  122. module.h
  123. monitor.c
  124. monitor.h
  125. nbd.c
  126. nbd.h
  127. net-checksum.c
  128. net.c
  129. net.h
  130. osdep.c
  131. osdep.h
  132. pci-ids.txt
  133. posix-aio-compat.c
  134. posix-aio-compat.h
  135. ppc-dis.c
  136. ppc.ld
  137. ppc64.ld
  138. qemu-aio.h
  139. qemu-binfmt-conf.sh
  140. qemu-char.c
  141. qemu-char.h
  142. qemu-common.h
  143. qemu-doc.texi
  144. qemu-img-cmds.hx
  145. qemu-img.c
  146. qemu-img.texi
  147. qemu-io.c
  148. qemu-lock.h
  149. qemu-log.h
  150. qemu-malloc.c
  151. qemu-monitor.hx
  152. qemu-nbd.c
  153. qemu-nbd.texi
  154. qemu-option.c
  155. qemu-option.h
  156. qemu-options.hx
  157. qemu-sockets.c
  158. qemu-tech.texi
  159. qemu-thread.c
  160. qemu-thread.h
  161. qemu-timer.h
  162. qemu-tool.c
  163. qemu.sasl
  164. qemu_socket.h
  165. readline.c
  166. readline.h
  167. README
  168. rules.mak
  169. s390-dis.c
  170. s390.ld
  171. savevm.c
  172. sdl.c
  173. sdl_keysym.h
  174. sdl_zoom.c
  175. sdl_zoom.h
  176. sdl_zoom_template.h
  177. sh4-dis.c
  178. softmmu-semi.h
  179. softmmu_defs.h
  180. softmmu_exec.h
  181. softmmu_header.h
  182. softmmu_template.h
  183. sparc-dis.c
  184. sparc.ld
  185. sparc64.ld
  186. sys-queue.h
  187. sysemu.h
  188. tap-win32.c
  189. targphys.h
  190. texi2pod.pl
  191. thunk.c
  192. thunk.h
  193. TODO
  194. tool-osdep.c
  195. translate-all.c
  196. uboot_image.h
  197. usb-bsd.c
  198. usb-linux.c
  199. usb-stub.c
  200. VERSION
  201. vgafont.h
  202. vl.c
  203. vnc-auth-sasl.c
  204. vnc-auth-sasl.h
  205. vnc-auth-vencrypt.c
  206. vnc-auth-vencrypt.h
  207. vnc-tls.c
  208. vnc-tls.h
  209. vnc.c
  210. vnc.h
  211. vnc_keysym.h
  212. vnchextile.h
  213. x86_64.ld
  214. x_keymap.c
  215. x_keymap.h