s390x: Implement SAM{24,31,64}

The SAM instructions simply change 2 bits in PSW.MASK to advertise
the current memory mode. While we can't fully guarantee that 31 bit
mode (or even remotely 24 bit mode) actually work correctly, we don't
check whether lpswe modifies these bits, so we shouldn't keep the
guest from executing SAM instructions either.

This patch implements all SAM instrutions with their actual PSW changing
semantics, making more recent Linux kernels boot properly which do issue
a SAM31 call during early boot.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2 files changed
tree: bb77e6559a5509aeefd3fbb7f59b42316c63f6d2
  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-migration.c
  27. block.c
  28. block/
  29. blockdev-nbd.c
  30. blockdev.c
  31. blockjob.c
  32. bootdevice.c
  33. bsd-user/
  34. bt-host.c
  35. bt-vhci.c
  36. configure
  37. coroutine-gthread.c
  38. coroutine-sigaltstack.c
  39. coroutine-ucontext.c
  40. coroutine-win32.c
  41. cpu-exec.c
  42. cpus.c
  43. cputlb.c
  44. default-configs/
  45. device-hotplug.c
  46. device_tree.c
  47. disas.c
  48. disas/
  49. dma-helpers.c
  50. docs/
  51. dump.c
  52. exec.c
  53. fpu/
  54. fsdev/
  55. gdb-xml/
  56. gdbstub.c
  57. hmp-commands.hx
  58. hmp.c
  59. hmp.h
  60. hw/
  61. include/
  62. iohandler.c
  63. ioport.c
  64. iothread.c
  65. kvm-all.c
  66. kvm-stub.c
  67. libcacard/
  68. libdecnumber/
  69. linux-headers/
  70. linux-user/
  71. main-loop.c
  72. memory.c
  73. memory_mapping.c
  74. migration-exec.c
  75. migration-fd.c
  76. migration-rdma.c
  77. migration-tcp.c
  78. migration-unix.c
  79. migration.c
  80. module-common.c
  81. monitor.c
  82. nbd.c
  83. net/
  84. numa.c
  85. os-posix.c
  86. os-win32.c
  87. page_cache.c
  88. pc-bios/
  89. po/
  90. qapi-schema.json
  91. qapi/
  92. qdev-monitor.c
  93. qdict-test-data.txt
  94. qemu-bridge-helper.c
  95. qemu-char.c
  96. qemu-coroutine-io.c
  97. qemu-coroutine-lock.c
  98. qemu-coroutine-sleep.c
  99. qemu-coroutine.c
  100. qemu-doc.texi
  101. qemu-file-stdio.c
  102. qemu-file-unix.c
  103. qemu-file.c
  104. qemu-img-cmds.hx
  105. qemu-img.c
  106. qemu-img.texi
  107. qemu-io-cmds.c
  108. qemu-io.c
  109. qemu-log.c
  110. qemu-nbd.c
  111. qemu-nbd.texi
  112. qemu-options-wrapper.h
  113. qemu-options.h
  114. qemu-options.hx
  115. qemu-seccomp.c
  116. qemu-tech.texi
  117. qemu-timer.c
  118. qemu.nsi
  119. qemu.sasl
  120. qga/
  121. qmp-commands.hx
  122. qmp.c
  123. qobject/
  124. qom/
  125. qtest.c
  126. roms/
  127. rules.mak
  128. savevm.c
  129. scripts/
  130. slirp/
  131. softmmu_template.h
  132. spice-qemu-char.c
  133. stubs/
  134. sysconfigs/
  135. target-alpha/
  136. target-arm/
  137. target-cris/
  138. target-i386/
  139. target-lm32/
  140. target-m68k/
  141. target-microblaze/
  142. target-mips/
  143. target-moxie/
  144. target-openrisc/
  145. target-ppc/
  146. target-s390x/
  147. target-sh4/
  148. target-sparc/
  149. target-tricore/
  150. target-unicore32/
  151. target-xtensa/
  152. tcg-runtime.c
  153. tcg/
  154. tci.c
  155. tests/
  156. thread-pool.c
  157. thunk.c
  158. tpm.c
  159. trace-events
  160. trace/
  161. translate-all.c
  162. translate-all.h
  163. ui/
  164. user-exec.c
  165. util/
  166. version.rc
  167. vl.c
  168. vmstate.c
  169. xbzrle.c
  170. xen-common-stub.c
  171. xen-common.c
  172. xen-hvm-stub.c
  173. xen-hvm.c
  174. xen-mapcache.c