qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

# gpg: Signature made Fri 20 Dec 2019 10:25:11 GMT
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh
docs: fix rst syntax errors in unbuilt docs
virtio-blk: deprecate SCSI passthrough

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+27 -15
+3 -3
docs/arm-cpu-features.rst
··· 41 41 Below are some examples where `scripts/qmp/qmp-shell` (see the top comment 42 42 block in the script for usage) is used to issue the QMP commands. 43 43 44 - (1) Determine which CPU features are available for the `max` CPU type 45 - (Note, we started QEMU with qemu-system-aarch64, so `max` is 46 - implementing the ARMv8-A reference manual in this case):: 44 + 1. Determine which CPU features are available for the `max` CPU type 45 + (Note, we started QEMU with qemu-system-aarch64, so `max` is 46 + implementing the ARMv8-A reference manual in this case):: 47 47 48 48 (QEMU) query-cpu-model-expansion type=full model={"name":"max"} 49 49 { "return": {
+2 -2
docs/virtio-net-failover.rst
··· 1 - ======================== 1 + ====================================== 2 2 QEMU virtio-net standby (net_failover) 3 - ======================== 3 + ====================================== 4 4 5 5 This document explains the setup and usage of virtio-net standby feature which 6 6 is used to create a net_failover pair of devices.
+10 -9
docs/virtio-pmem.rst
··· 27 27 ----------------- 28 28 29 29 A virtio pmem device backed by a memory-backend-file can be created on 30 - the QEMU command line as in the following example: 30 + the QEMU command line as in the following example:: 31 31 32 - -object memory-backend-file,id=mem1,share,mem-path=./virtio_pmem.img,size=4G 33 - -device virtio-pmem-pci,memdev=mem1,id=nv1 32 + -object memory-backend-file,id=mem1,share,mem-path=./virtio_pmem.img,size=4G 33 + -device virtio-pmem-pci,memdev=mem1,id=nv1 34 34 35 - where: 36 - - "object memory-backend-file,id=mem1,share,mem-path=<image>, size=<image size>" 37 - creates a backend file with the specified size. 35 + where: 36 + 37 + - "object memory-backend-file,id=mem1,share,mem-path=<image>, size=<image size>" 38 + creates a backend file with the specified size. 38 39 39 - - "device virtio-pmem-pci,id=nvdimm1,memdev=mem1" creates a virtio pmem 40 - pci device whose storage is provided by above memory backend device. 40 + - "device virtio-pmem-pci,id=nvdimm1,memdev=mem1" creates a virtio pmem 41 + pci device whose storage is provided by above memory backend device. 41 42 42 43 Multiple virtio pmem devices can be created if multiple pairs of "-object" 43 44 and "-device" are provided. ··· 50 51 pmem device can be added via 'device_add'. 51 52 52 53 For example, the following commands add another 4GB virtio pmem device to 53 - the guest: 54 + the guest:: 54 55 55 56 (qemu) object_add memory-backend-file,id=mem2,share=on,mem-path=virtio_pmem2.img,size=4G 56 57 (qemu) device_add virtio-pmem-pci,id=virtio_pmem2,memdev=mem2
+1 -1
hw/block/dataplane/virtio-blk.c
··· 67 67 memset(s->batch_notify_vqs, 0, sizeof(bitmap)); 68 68 69 69 for (j = 0; j < nvqs; j += BITS_PER_LONG) { 70 - unsigned long bits = bitmap[j]; 70 + unsigned long bits = bitmap[j / BITS_PER_LONG]; 71 71 72 72 while (bits != 0) { 73 73 unsigned i = j + ctzl(bits);
+11
qemu-deprecated.texi
··· 284 284 285 285 @section Device options 286 286 287 + @subsection Emulated device options 288 + 289 + @subsubsection -device virtio-blk,scsi=on|off (since 5.0.0) 290 + 291 + The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 292 + and later do not support it because the virtio-scsi device was introduced for 293 + full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. 294 + 295 + Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an 296 + alias. 297 + 287 298 @subsection Block device options 288 299 289 300 @subsubsection "backing": "" (since 2.12.0)