Check if the i8254 timer is active before deactivating it (Alexander Graf)

The HPET emulation can disable the i8254 when the HPET is
in legacy mode, thus emulating the i8254's behavior.

But if it does, the i8254 doesn't have to be running, so
let's check to see if the timer works and not disable it
if it's not.

This fixes a segmentation fault when running Mac OS X as
guest os.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6460 c046a42c-6fe2-441c-8c8c-71466251a162
1 file changed
tree: ec117bd87c4c4e5307d14741fbfae9eb6a4f4f22
  1. audio/
  2. bsd-user/
  3. darwin-user/
  4. fpu/
  5. gdb-xml/
  6. hw/
  7. keymaps/
  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-mips/
  17. target-ppc/
  18. target-sh4/
  19. target-sparc/
  20. tcg/
  21. tests/
  22. .gitignore
  23. a.out.h
  24. aes.c
  25. aes.h
  26. aio.c
  27. alpha-dis.c
  28. alpha.ld
  29. arm-dis.c
  30. arm-semi.c
  31. arm.ld
  32. balloon.h
  33. block-bochs.c
  34. block-cloop.c
  35. block-cow.c
  36. block-dmg.c
  37. block-nbd.c
  38. block-parallels.c
  39. block-qcow.c
  40. block-qcow2.c
  41. block-raw-posix.c
  42. block-raw-win32.c
  43. block-vmdk.c
  44. block-vpc.c
  45. block-vvfat.c
  46. block.c
  47. block.h
  48. block_int.h
  49. bswap.h
  50. bt-host.c
  51. bt-vhci.c
  52. buffered_file.c
  53. buffered_file.h
  54. cache-utils.c
  55. cache-utils.h
  56. Changelog
  57. cocoa.m
  58. configure
  59. console.c
  60. console.h
  61. COPYING
  62. COPYING.LIB
  63. cpu-all.h
  64. cpu-defs.h
  65. cpu-exec.c
  66. cris-dis.c
  67. curses.c
  68. curses_keys.h
  69. cutils.c
  70. d3des.c
  71. d3des.h
  72. def-helper.h
  73. device_tree.c
  74. device_tree.h
  75. dis-asm.h
  76. disas.c
  77. disas.h
  78. dyngen-exec.h
  79. elf.h
  80. elf_ops.h
  81. exec-all.h
  82. exec.c
  83. feature_to_c.sh
  84. gdbstub.c
  85. gdbstub.h
  86. gen-icount.h
  87. host-utils.c
  88. host-utils.h
  89. hostregs_helper.h
  90. hpet.h
  91. hppa-dis.c
  92. hppa.ld
  93. i386-dis.c
  94. i386.ld
  95. ia64.ld
  96. keymaps.c
  97. kqemu.c
  98. kqemu.h
  99. kvm-all.c
  100. kvm.h
  101. libfdt_env.h
  102. LICENSE
  103. loader.c
  104. m68k-dis.c
  105. m68k-semi.c
  106. m68k.ld
  107. MAINTAINERS
  108. Makefile
  109. Makefile.target
  110. migration-exec.c
  111. migration-tcp.c
  112. migration.c
  113. migration.h
  114. mips-dis.c
  115. mips.ld
  116. mipsel.ld
  117. monitor.c
  118. nbd.c
  119. nbd.h
  120. net-checksum.c
  121. net.c
  122. net.h
  123. osdep.c
  124. osdep.h
  125. pci-ids.txt
  126. posix-aio-compat.c
  127. posix-aio-compat.h
  128. ppc-dis.c
  129. ppc.ld
  130. ppc64.ld
  131. qemu-aio.h
  132. qemu-binfmt-conf.sh
  133. qemu-char.c
  134. qemu-char.h
  135. qemu-common.h
  136. qemu-doc.texi
  137. qemu-img.c
  138. qemu-img.texi
  139. qemu-lock.h
  140. qemu-log.h
  141. qemu-malloc.c
  142. qemu-nbd.c
  143. qemu-nbd.texi
  144. qemu-sockets.c
  145. qemu-tech.texi
  146. qemu-timer.h
  147. qemu-tool.c
  148. qemu_socket.h
  149. readline.c
  150. README
  151. rules.mak
  152. s390-dis.c
  153. s390.ld
  154. savevm.c
  155. sdl.c
  156. sdl_keysym.h
  157. sh4-dis.c
  158. softmmu-semi.h
  159. softmmu_defs.h
  160. softmmu_exec.h
  161. softmmu_header.h
  162. softmmu_template.h
  163. sparc-dis.c
  164. sparc.ld
  165. sparc64.ld
  166. sys-queue.h
  167. sysemu.h
  168. tap-win32.c
  169. texi2pod.pl
  170. thunk.c
  171. thunk.h
  172. TODO
  173. translate-all.c
  174. uboot_image.h
  175. usb-bsd.c
  176. usb-linux.c
  177. usb-stub.c
  178. VERSION
  179. vgafont.h
  180. vl.c
  181. vnc.c
  182. vnc_keysym.h
  183. vnchextile.h
  184. x86_64.ld
  185. x_keymap.c