aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/vhost-scsi-common.c
diff options
context:
space:
mode:
authorGreg Edwards <gedwards@ddn.com>2018-08-08 13:52:34 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-23 18:46:25 +0200
commitb1110d833c74c09c90c26235aed1b7eb5e85910a (patch)
treef92a1c770c8dd9ef9bc80ca30f8757fe43490275 /hw/scsi/vhost-scsi-common.c
parenteb5757fcbe149a3ea20bc9987d3147efe7e3866a (diff)
downloadqemu-b1110d833c74c09c90c26235aed1b7eb5e85910a.zip
qemu-b1110d833c74c09c90c26235aed1b7eb5e85910a.tar.gz
qemu-b1110d833c74c09c90c26235aed1b7eb5e85910a.tar.bz2
vhost-scsi: unify vhost-scsi get_features implementations
Move the enablement of preset host features into the common vhost_scsi_common_get_features() function. This is in preparation for having vhost-scsi also make use of host_features. Signed-off-by: Greg Edwards <gedwards@ddn.com> Message-Id: <20180808195235.5843-3-gedwards@ddn.com> Reviewed-by: Felipe Franciosi <felipe@nutanix.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/vhost-scsi-common.c')
-rw-r--r--hw/scsi/vhost-scsi-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
index e2a5828..b7fbab6 100644
--- a/hw/scsi/vhost-scsi-common.c
+++ b/hw/scsi/vhost-scsi-common.c
@@ -96,6 +96,9 @@ uint64_t vhost_scsi_common_get_features(VirtIODevice *vdev, uint64_t features,
{
VHostSCSICommon *vsc = VHOST_SCSI_COMMON(vdev);
+ /* Turn on predefined features supported by this device */
+ features |= vsc->host_features;
+
return vhost_get_features(&vsc->dev, vsc->feature_bits, features);
}