Make page_find() return 0 for too-large addresses (Eduardo Habkost)

On some cases, such as under KVM, tb_invalidate_phys_page_range()
may be called for large addresses, when qemu is configured to more than
4GB of RAM.

On these cases, qemu was crashing because it was using an index too
large for l1_map[], that supports only 32-bit addresses when compiling
without CONFIG_USER_ONLY.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5227 c046a42c-6fe2-441c-8c8c-71466251a162
1 file changed
tree: 993cc3e06302d0d179bf5da2e846f2dac7b76c94
  1. audio/
  2. darwin-user/
  3. fpu/
  4. hw/
  5. keymaps/
  6. linux-user/
  7. pc-bios/
  8. slirp/
  9. target-alpha/
  10. target-arm/
  11. target-cris/
  12. target-i386/
  13. target-m68k/
  14. target-mips/
  15. target-ppc/
  16. target-sh4/
  17. target-sparc/
  18. tcg/
  19. tests/
  20. .gitignore
  21. a.out.h
  22. aes.c
  23. aes.h
  24. alpha-dis.c
  25. alpha.ld
  26. arm-dis.c
  27. arm-semi.c
  28. arm.ld
  29. block-bochs.c
  30. block-cloop.c
  31. block-cow.c
  32. block-dmg.c
  33. block-nbd.c
  34. block-parallels.c
  35. block-qcow.c
  36. block-qcow2.c
  37. block-raw-posix.c
  38. block-raw-win32.c
  39. block-vmdk.c
  40. block-vpc.c
  41. block-vvfat.c
  42. block.c
  43. block.h
  44. block_int.h
  45. bswap.h
  46. Changelog
  47. check_ops.sh
  48. cocoa.m
  49. compatfd.c
  50. compatfd.h
  51. configure
  52. console.c
  53. console.h
  54. COPYING
  55. COPYING.LIB
  56. cpu-all.h
  57. cpu-defs.h
  58. cpu-exec.c
  59. cris-dis.c
  60. curses.c
  61. curses_keys.h
  62. cutils.c
  63. d3des.c
  64. d3des.h
  65. dis-asm.h
  66. disas.c
  67. disas.h
  68. dyngen-exec.h
  69. dyngen.c
  70. elf.h
  71. elf_ops.h
  72. exec-all.h
  73. exec.c
  74. gdbstub.c
  75. gdbstub.h
  76. gen-icount.h
  77. host-utils.c
  78. host-utils.h
  79. hostregs_helper.h
  80. hpet.h
  81. hppa-dis.c
  82. hppa.ld
  83. i386-dis.c
  84. i386.ld
  85. ia64.ld
  86. keymaps.c
  87. kqemu.c
  88. kqemu.h
  89. LICENSE
  90. loader.c
  91. m68k-dis.c
  92. m68k-semi.c
  93. m68k.ld
  94. MAINTAINERS
  95. Makefile
  96. Makefile.target
  97. mips-dis.c
  98. mips.ld
  99. mipsel.ld
  100. monitor.c
  101. nbd.c
  102. nbd.h
  103. net-checksum.c
  104. net.h
  105. osdep.c
  106. osdep.h
  107. ppc-dis.c
  108. ppc.ld
  109. ppc64.ld
  110. qemu-binfmt-conf.sh
  111. qemu-char.h
  112. qemu-common.h
  113. qemu-doc.texi
  114. qemu-img.c
  115. qemu-img.texi
  116. qemu-lock.h
  117. qemu-log.h
  118. qemu-malloc.c
  119. qemu-nbd.c
  120. qemu-nbd.texi
  121. qemu-tech.texi
  122. qemu-timer.h
  123. qemu-tool.c
  124. qemu_socket.h
  125. readline.c
  126. README
  127. s390-dis.c
  128. s390.ld
  129. sdl.c
  130. sdl_keysym.h
  131. sh4-dis.c
  132. softmmu-semi.h
  133. softmmu_defs.h
  134. softmmu_exec.h
  135. softmmu_header.h
  136. softmmu_template.h
  137. sparc-dis.c
  138. sparc.ld
  139. sparc64.ld
  140. sys-queue.h
  141. sysemu.h
  142. tap-win32.c
  143. texi2pod.pl
  144. thunk.c
  145. thunk.h
  146. TODO
  147. translate-all.c
  148. uboot_image.h
  149. usb-linux.c
  150. VERSION
  151. vgafont.h
  152. vl.c
  153. vnc.c
  154. vnc_keysym.h
  155. vnchextile.h
  156. x86_64.ld
  157. x_keymap.c