aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi
diff options
context:
space:
mode:
authorGreg Edwards <gedwards@ddn.com>2018-08-08 13:52:33 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-23 18:46:25 +0200
commiteb5757fcbe149a3ea20bc9987d3147efe7e3866a (patch)
treec882ade700231850670ecceee755dcb1f69fa711 /hw/scsi
parentf2a4ad6d49e0683f4abb12e89797da889e4aadb9 (diff)
downloadqemu-eb5757fcbe149a3ea20bc9987d3147efe7e3866a.zip
qemu-eb5757fcbe149a3ea20bc9987d3147efe7e3866a.tar.gz
qemu-eb5757fcbe149a3ea20bc9987d3147efe7e3866a.tar.bz2
vhost-user-scsi: move host_features into VHostSCSICommon
In preparation for having vhost-scsi also make use of host_features, move it from struct VHostUserSCSI into struct VHostSCSICommon. Signed-off-by: Greg Edwards <gedwards@ddn.com> Message-Id: <20180808195235.5843-2-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')
-rw-r--r--hw/scsi/vhost-user-scsi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 9355cfd..694cb80 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost-user-scsi.c
@@ -141,9 +141,10 @@ static uint64_t vhost_user_scsi_get_features(VirtIODevice *vdev,
uint64_t features, Error **errp)
{
VHostUserSCSI *s = VHOST_USER_SCSI(vdev);
+ VHostSCSICommon *vsc = VHOST_SCSI_COMMON(s);
/* Turn on predefined features supported by this device */
- features |= s->host_features;
+ features |= vsc->host_features;
return vhost_scsi_common_get_features(vdev, features, errp);
}
@@ -157,12 +158,12 @@ static Property vhost_user_scsi_properties[] = {
DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
0xFFFF),
DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),
- DEFINE_PROP_BIT64("hotplug", VHostUserSCSI, host_features,
- VIRTIO_SCSI_F_HOTPLUG,
- true),
- DEFINE_PROP_BIT64("param_change", VHostUserSCSI, host_features,
- VIRTIO_SCSI_F_CHANGE,
- true),
+ DEFINE_PROP_BIT64("hotplug", VHostSCSICommon, host_features,
+ VIRTIO_SCSI_F_HOTPLUG,
+ true),
+ DEFINE_PROP_BIT64("param_change", VHostSCSICommon, host_features,
+ VIRTIO_SCSI_F_CHANGE,
+ true),
DEFINE_PROP_END_OF_LIST(),
};