scsi-disk: rd/wr/vr-protect !=0 is an error

The QEMU SCSI emulation does not support protection information,
so any READ/WRITE/VERIFY commands that has the protect bits set to
non-zero should fail with ILLEGAL_REQUEST/INVALID_FIELD_IN_CDB

From SCSI SBC :
If the logical unit does not support protection information,
then the device server should terminate the command with CHECK CONDITION
status with the sense key set to ILLEGAL REQUEST and the additional sense
code set to INVALID FIELD IN CDB.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
[ Rebase after scsi_dma_reqops introduction - Paolo ]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 file changed
tree: 6795107821c66af1a125e55b2952c277f5608ecf
  1. audio/
  2. block/
  3. bsd-user/
  4. default-configs/
  5. docs/
  6. fpu/
  7. fsdev/
  8. gdb-xml/
  9. hw/
  10. include/
  11. libcacard/
  12. linux-headers/
  13. linux-user/
  14. net/
  15. pc-bios/
  16. qapi/
  17. qga/
  18. QMP/
  19. qom/
  20. roms/
  21. scripts/
  22. slirp/
  23. sysconfigs/
  24. target-alpha/
  25. target-arm/
  26. target-cris/
  27. target-i386/
  28. target-lm32/
  29. target-m68k/
  30. target-microblaze/
  31. target-mips/
  32. target-ppc/
  33. target-s390x/
  34. target-sh4/
  35. target-sparc/
  36. target-unicore32/
  37. target-xtensa/
  38. tcg/
  39. tests/
  40. trace/
  41. ui/
  42. .gitignore
  43. .gitmodules
  44. .mailmap
  45. a.out.h
  46. acl.c
  47. acl.h
  48. aes.c
  49. aes.h
  50. aio.c
  51. alpha-dis.c
  52. alpha.ld
  53. arch_init.c
  54. arch_init.h
  55. arm-dis.c
  56. arm.ld
  57. async.c
  58. balloon.c
  59. balloon.h
  60. bitmap.c
  61. bitmap.h
  62. bitops.c
  63. bitops.h
  64. block-migration.c
  65. block-migration.h
  66. block.c
  67. block.h
  68. block_int.h
  69. blockdev.c
  70. blockdev.h
  71. bswap.h
  72. bt-host.c
  73. bt-host.h
  74. bt-vhci.c
  75. buffered_file.c
  76. buffered_file.h
  77. cache-utils.c
  78. cache-utils.h
  79. Changelog
  80. cmd.c
  81. cmd.h
  82. CODING_STYLE
  83. compatfd.c
  84. compatfd.h
  85. compiler.h
  86. config.h
  87. configure
  88. console.c
  89. console.h
  90. COPYING
  91. COPYING.LIB
  92. coroutine-gthread.c
  93. coroutine-sigaltstack.c
  94. coroutine-ucontext.c
  95. coroutine-win32.c
  96. cpu-all.h
  97. cpu-common.h
  98. cpu-defs.h
  99. cpu-exec.c
  100. cpus.c
  101. cpus.h
  102. cputlb.c
  103. cputlb.h
  104. cris-dis.c
  105. cursor.c
  106. cursor_hidden.xpm
  107. cursor_left_ptr.xpm
  108. cutils.c
  109. def-helper.h
  110. device_tree.c
  111. device_tree.h
  112. dis-asm.h
  113. disas.c
  114. disas.h
  115. dma-helpers.c
  116. dma.h
  117. dump-stub.c
  118. dump.c
  119. dump.h
  120. dyngen-exec.h
  121. elf.h
  122. envlist.c
  123. envlist.h
  124. error.c
  125. error.h
  126. error_int.h
  127. event_notifier.c
  128. event_notifier.h
  129. exec-all.h
  130. exec-memory.h
  131. exec-obsolete.h
  132. exec.c
  133. gdbstub.c
  134. gdbstub.h
  135. gen-icount.h
  136. HACKING
  137. hmp-commands.hx
  138. hmp.c
  139. hmp.h
  140. host-utils.c
  141. host-utils.h
  142. hppa-dis.c
  143. hppa.ld
  144. i386-dis.c
  145. i386.ld
  146. ia64-dis.c
  147. ia64.ld
  148. input.c
  149. int128.h
  150. iohandler.c
  151. ioport.c
  152. ioport.h
  153. iorange.h
  154. iov.c
  155. iov.h
  156. json-lexer.c
  157. json-lexer.h
  158. json-parser.c
  159. json-parser.h
  160. json-streamer.c
  161. json-streamer.h
  162. kvm-all.c
  163. kvm-stub.c
  164. kvm.h
  165. libfdt_env.h
  166. LICENSE
  167. linux-aio.c
  168. lm32-dis.c
  169. m68k-dis.c
  170. m68k.ld
  171. main-loop.c
  172. main-loop.h
  173. MAINTAINERS
  174. Makefile
  175. Makefile.dis
  176. Makefile.hw
  177. Makefile.objs
  178. Makefile.target
  179. Makefile.user
  180. memory.c
  181. memory.h
  182. memory_mapping-stub.c
  183. memory_mapping.c
  184. memory_mapping.h
  185. microblaze-dis.c
  186. migration-exec.c
  187. migration-fd.c
  188. migration-tcp.c
  189. migration-unix.c
  190. migration.c
  191. migration.h
  192. mips-dis.c
  193. mips.ld
  194. module.c
  195. module.h
  196. monitor.c
  197. monitor.h
  198. nbd.c
  199. nbd.h
  200. net.c
  201. net.h
  202. notify.c
  203. notify.h
  204. os-posix.c
  205. os-win32.c
  206. osdep.c
  207. osdep.h
  208. oslib-posix.c
  209. oslib-win32.c
  210. path.c
  211. pci-ids.txt
  212. pflib.c
  213. pflib.h
  214. poison.h
  215. posix-aio-compat.c
  216. ppc-dis.c
  217. ppc.ld
  218. ppc64.ld
  219. qapi-schema-guest.json
  220. qapi-schema-test.json
  221. qapi-schema.json
  222. qbool.c
  223. qbool.h
  224. qdict-test-data.txt
  225. qdict.c
  226. qdict.h
  227. qemu-aio.h
  228. qemu-barrier.h
  229. qemu-bridge-helper.c
  230. qemu-char.c
  231. qemu-char.h
  232. qemu-common.h
  233. qemu-config.c
  234. qemu-config.h
  235. qemu-coroutine-int.h
  236. qemu-coroutine-io.c
  237. qemu-coroutine-lock.c
  238. qemu-coroutine-sleep.c
  239. qemu-coroutine.c
  240. qemu-coroutine.h
  241. qemu-doc.texi
  242. qemu-error.c
  243. qemu-error.h
  244. qemu-file.h
  245. qemu-ga.c
  246. qemu-img-cmds.hx
  247. qemu-img.c
  248. qemu-img.texi
  249. qemu-io.c
  250. qemu-lock.h
  251. qemu-log.c
  252. qemu-log.h
  253. qemu-nbd.c
  254. qemu-nbd.texi
  255. qemu-objects.h
  256. qemu-option-internal.h
  257. qemu-option.c
  258. qemu-option.h
  259. qemu-options-wrapper.h
  260. qemu-options.h
  261. qemu-options.hx
  262. qemu-os-posix.h
  263. qemu-os-win32.h
  264. qemu-progress.c
  265. qemu-queue.h
  266. qemu-sockets.c
  267. qemu-tech.texi
  268. qemu-thread-posix.c
  269. qemu-thread-posix.h
  270. qemu-thread-win32.c
  271. qemu-thread-win32.h
  272. qemu-thread.h
  273. qemu-timer-common.c
  274. qemu-timer.c
  275. qemu-timer.h
  276. qemu-tls.h
  277. qemu-tool.c
  278. qemu-user.c
  279. qemu-x509.h
  280. qemu-xattr.h
  281. qemu.sasl
  282. qemu_socket.h
  283. qerror.c
  284. qerror.h
  285. qfloat.c
  286. qfloat.h
  287. qint.c
  288. qint.h
  289. qjson.c
  290. qjson.h
  291. qlist.c
  292. qlist.h
  293. qmp-commands.hx
  294. qmp.c
  295. qobject.h
  296. qstring.c
  297. qstring.h
  298. qtest.c
  299. qtest.h
  300. range.h
  301. readline.c
  302. readline.h
  303. README
  304. rules.mak
  305. s390-dis.c
  306. s390.ld
  307. savevm.c
  308. sh4-dis.c
  309. softmmu-semi.h
  310. softmmu_defs.h
  311. softmmu_exec.h
  312. softmmu_header.h
  313. softmmu_template.h
  314. sparc-dis.c
  315. sparc.ld
  316. sparc64.ld
  317. spice-qemu-char.c
  318. sysemu.h
  319. targphys.h
  320. tcg-runtime.c
  321. tci-dis.c
  322. tci.c
  323. thunk.c
  324. thunk.h
  325. TODO
  326. trace-events
  327. translate-all.c
  328. uboot_image.h
  329. user-exec.c
  330. VERSION
  331. version.rc
  332. vgafont.h
  333. vl.c
  334. vmstate.h
  335. x86_64.ld
  336. xen-all.c
  337. xen-mapcache.c
  338. xen-mapcache.h
  339. xen-stub.c