aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-03-27 17:34:50 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-03-27 17:34:50 +0100
commiteb06c9e2d3c8f026a206e8402b0ffa201060ec8e (patch)
treea85e2ad6fe3d61e7e3665be8574543e9e1913fdb /include/hw/virtio
parent9366f53d509ae31bf7acb33e2eb7804e16fe70d4 (diff)
parentbed58b4443b001227b953dca80ce76fa76ea0fc1 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* MTTCG fix for win32 * virtio-scsi assertion failure * mem-prealloc coverity fix * x86 migration revert which requires more thought * x86 instruction limit (avoids >2 page translation blocks) * nbd dead code cleanup * small memory.c logic fix # gpg: Signature made Mon 27 Mar 2017 17:03:04 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: scsi-generic: Fill in opt_xfer_len in INQUIRY reply if it is zero Revert "apic: save apic_delivered flag" nbd: drop unused NBDClientSession.is_unix field win32: replace custom mutex and condition variable with native primitives mem-prealloc: fix sysconf(_SC_NPROCESSORS_ONLN) failure case. tcg/i386: Check the size of instruction being translated virtio-scsi: Fix acquire/release in dataplane handlers virtio-scsi: Make virtio_scsi_acquire/release public clear pending status before calling memory commit Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/virtio')
-rw-r--r--include/hw/virtio/virtio-scsi.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index f536f77e68..8ae0acaa1f 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -121,6 +121,20 @@ typedef struct VirtIOSCSIReq {
} req;
} VirtIOSCSIReq;
+static inline void virtio_scsi_acquire(VirtIOSCSI *s)
+{
+ if (s->ctx) {
+ aio_context_acquire(s->ctx);
+ }
+}
+
+static inline void virtio_scsi_release(VirtIOSCSI *s)
+{
+ if (s->ctx) {
+ aio_context_release(s->ctx);
+ }
+}
+
void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
VirtIOHandleOutput ctrl, VirtIOHandleOutput evt,
VirtIOHandleOutput cmd);