From nobody Wed Nov 5 10:12:08 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1533760006686887.8135054241277; Wed, 8 Aug 2018 13:26:46 -0700 (PDT) Received: from localhost ([::1]:45354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnV2b-00087l-L3 for importer@patchew.org; Wed, 08 Aug 2018 16:26:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnUzo-0005hh-L6 for qemu-devel@nongnu.org; Wed, 08 Aug 2018 16:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnUzj-0001RM-O6 for qemu-devel@nongnu.org; Wed, 08 Aug 2018 16:23:52 -0400 Received: from legacy.ddn.com ([64.47.133.206]:26371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fnUzj-0001Qh-Gx for qemu-devel@nongnu.org; Wed, 08 Aug 2018 16:23:47 -0400 Received: from LAX-EX-CAHT3.datadirect.datadirectnet.com (10.8.103.85) by LAX-EX-CAHT3.datadirect.datadirectnet.com (10.8.103.85) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 8 Aug 2018 12:53:39 -0700 Received: from LAX-EX-CAHT1.datadirect.datadirectnet.com (10.8.103.81) by LAX-EX-CAHT3.datadirect.datadirectnet.com (10.8.103.85) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Wed, 8 Aug 2018 12:53:39 -0700 Received: from psuche.datadirect.datadirectnet.com (10.48.114.46) by LAX-EX-CAHT1.datadirect.datadirectnet.com (10.8.103.81) with Microsoft SMTP Server (TLS) id 14.3.389.1; Wed, 8 Aug 2018 12:53:18 -0700 From: Greg Edwards To: Date: Wed, 8 Aug 2018 13:52:33 -0600 Message-ID: <20180808195235.5843-2-gedwards@ddn.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180808195235.5843-1-gedwards@ddn.com> References: <20180808195235.5843-1-gedwards@ddn.com> MIME-Version: 1.0 X-Originating-IP: [10.48.114.46] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 64.47.133.206 Subject: [Qemu-devel] [PATCH 1/3] vhost-user-scsi: move host_features into VHostSCSICommon X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , "Michael S. Tsirkin" , Greg Edwards , "Nicholas A. Bellinger" , Felipe Franciosi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Felipe Franciosi --- hw/scsi/vhost-user-scsi.c | 15 ++++++++------- include/hw/virtio/vhost-scsi-common.h | 1 + include/hw/virtio/vhost-user-scsi.h | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index 9355cfdf07f9..694cb801209a 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(VirtIODev= ice *vdev, uint64_t features, Error **er= rp) { VHostUserSCSI *s =3D VHOST_USER_SCSI(vdev); + VHostSCSICommon *vsc =3D VHOST_SCSI_COMMON(s); =20 /* Turn on predefined features supported by this device */ - features |=3D s->host_features; + features |=3D vsc->host_features; =20 return vhost_scsi_common_get_features(vdev, features, errp); } @@ -157,12 +158,12 @@ static Property vhost_user_scsi_properties[] =3D { 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_CHANG= E, + true), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/include/hw/virtio/vhost-scsi-common.h b/include/hw/virtio/vhos= t-scsi-common.h index 4553be4bc378..57fb1d87b51d 100644 --- a/include/hw/virtio/vhost-scsi-common.h +++ b/include/hw/virtio/vhost-scsi-common.h @@ -35,6 +35,7 @@ typedef struct VHostSCSICommon { int channel; int target; int lun; + uint64_t host_features; } VHostSCSICommon; =20 int vhost_scsi_common_start(VHostSCSICommon *vsc); diff --git a/include/hw/virtio/vhost-user-scsi.h b/include/hw/virtio/vhost-= user-scsi.h index 3ec34ae867ab..e429cacd8e06 100644 --- a/include/hw/virtio/vhost-user-scsi.h +++ b/include/hw/virtio/vhost-user-scsi.h @@ -30,7 +30,6 @@ =20 typedef struct VHostUserSCSI { VHostSCSICommon parent_obj; - uint64_t host_features; VhostUserState *vhost_user; } VHostUserSCSI; =20 --=20 2.17.1