aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/vhost-scsi.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-09-30 16:45:34 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-09-30 16:45:35 +0100
commit1831e150606a221898bf46ffaf0453e9952cbbc4 (patch)
tree448102b635faec91c394305f43500a97710f095f /hw/scsi/vhost-scsi.c
parent7be3c1408ab7ac0ded770729ec1c4565feead5ab (diff)
parenta9fe4c957b762dbb814c254204c082bab93c8459 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
This update brings dataplane to virtio-scsi (NOT yet 100% thread-safe, though, which makes it really, really experimental. It also brings asynchronous cancellation to the SCSI subsystem and implements it in virtio-scsi. This is a pretty important feature. Almost all the work here was done by Fam Zheng. I also included the virtio refcount fixes from Gonglei, because they had a small conflict with virtio-scsi dataplane. This pull request is using the new subkey 4E6B09D7. # gpg: Signature made Tue 30 Sep 2014 12:31:02 BST using RSA key ID 4E6B09D7 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: (39 commits) block/iscsi: handle failure on malloc of the allocationmap util: introduce bitmap_try_new virtio-scsi: Handle TMF request cancellation asynchronously scsi: Introduce scsi_req_cancel_async scsi: Introduce scsi_req_cancel_complete scsi: Drop SCSIReqOps.cancel_io scsi: Unify request unref in scsi_req_cancel scsi-generic: Handle canceled request in scsi_command_complete scsi: Drop scsi_req_abort virtio-scsi: Process ".iothread" property virtio-scsi: Call bdrv_io_plug/bdrv_io_unplug in cmd request handling virtio-scsi: Batched prepare for cmd reqs virtio-scsi: Two stages processing of cmd request virtio-scsi: Add migration state notifier for dataplane code virtio-scsi: Hook up with dataplane virtio-scsi-dataplane: Code to run virtio-scsi on iothread virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq virtio-scsi: Add 'iothread' property to virtio-scsi virtio: add a wrapper for virtio-backend initialization virtio-9p: fix virtio-9p child refcount in transports ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/scsi/vhost-scsi.c')
-rw-r--r--hw/scsi/vhost-scsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 7146e0ec49..308b393f96 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -23,6 +23,7 @@
#include "hw/virtio/vhost.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/virtio-bus.h"
+#include "hw/virtio/virtio-access.h"
/* Features supported by host kernel. */
static const int kernel_feature_bits[] = {
@@ -163,8 +164,8 @@ static void vhost_scsi_set_config(VirtIODevice *vdev,
VirtIOSCSIConfig *scsiconf = (VirtIOSCSIConfig *)config;
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
- if ((uint32_t) ldl_p(&scsiconf->sense_size) != vs->sense_size ||
- (uint32_t) ldl_p(&scsiconf->cdb_size) != vs->cdb_size) {
+ if ((uint32_t) virtio_ldl_p(vdev, &scsiconf->sense_size) != vs->sense_size ||
+ (uint32_t) virtio_ldl_p(vdev, &scsiconf->cdb_size) != vs->cdb_size) {
error_report("vhost-scsi does not support changing the sense data and CDB sizes");
exit(1);
}