From nobody Wed Nov 5 14:37:10 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; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534873875772184.3729936569472; Tue, 21 Aug 2018 10:51:15 -0700 (PDT) Received: from localhost ([::1]:55191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsAoE-0007m4-Kr for importer@patchew.org; Tue, 21 Aug 2018 13:51:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsA4n-0002IL-TC for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:04:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsA4Z-0006tV-0d for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:04:11 -0400 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:50856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsA4Y-0006qv-En for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:04:02 -0400 Received: by mail-wm0-x22c.google.com with SMTP id s12-v6so3661136wmc.0 for ; Tue, 21 Aug 2018 10:04:02 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-184-244.clienti.tiscali.it. [78.12.184.244]) by smtp.gmail.com with ESMTPSA id v6-v6sm2608955wmc.43.2018.08.21.10.04.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 10:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=weJgwL2qgLJdagQECL4ducOP9c6PbqF7pDqodxiyQUU=; b=XoKYgGGyI4+x/suD01QG0DosmFsd9UnJw1I14T149HU2pJP6GZqdyom0ETPMfz4yoN Ynaph8lQiVdkorHGl7jDzZfARR3sBuFl1t+0xnJ+I31O6oUuXKzqP0fYn9CDp7V1aA26 G/uopnKLNvVb6t3hvjhdLNZckB6C/8eq0L60E/bNYAO7QyN4shJKQ+IDEzLpjfwuBe3R dFlDYjHbAxe21+g2KlhQyO+0qQKhasaUPIQpFWMwGiBhgNE36H7toMQCzLLxDrtc7Jfq wQM90vhGtukZSmLd0hevunhp9IxGdSZxAuxxuG261RWRioY3OyDZ48ZBaKM2auBcRE6a Lsmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=weJgwL2qgLJdagQECL4ducOP9c6PbqF7pDqodxiyQUU=; b=P6PKEZz9fpgB1pYpQXvINHZFeGBLvKK+l+gXqrJoixdCDdLVRILHYEy+daq9Ay2r73 8Iq0z/YPIegNwV0QshwS1LUZy9LspR98LUucwYrp6t3CD4mJ/29h5VQBVE+ZORnyt4qh cP3Iupwh/Q+FeoRqaHApBLTOBClUDsRa//RWRZPxEttDptZNTM1uR1QHTVG7Cc9xkR6m uwFSTFSJ5a0ONPXzZIuZ8FVlImUOtlPGysTbREL8ckieS0fQAKTy9jbAThXE13DtE7EC WI8mA1lBATQLyfFEs/wjzCUc8eWN78hYIfEcQr7zSRj45tJpMCihmjZGvkcnA8fCA6jf OcPg== X-Gm-Message-State: APzg51C80/UelfQVi2FO/O8fKTQ+rpuq7s9YVM2+GnG5cWVmUzy6HcoR XKSBCQ3ONeQBtlkNS5DDMIoeBaK+ X-Google-Smtp-Source: ANB0VdbLRJJeA7JFo2Zwab4wXmJcmU0StJXrxs/ydtVeKeaLcekaJVH3l2VhdII81+inSzuE0pcv5Q== X-Received: by 2002:a1c:385:: with SMTP id 127-v6mr156598wmd.92.1534871041093; Tue, 21 Aug 2018 10:04:01 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 21 Aug 2018 19:02:26 +0200 Message-Id: <1534870966-9287-55-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> References: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c Subject: [Qemu-devel] [PULL 54/74] 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: Greg Edwards Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Greg Edwards 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 Message-Id: <20180808195235.5843-2-gedwards@ddn.com> Reviewed-by: Felipe Franciosi Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- 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 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(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 4553be4..57fb1d8 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 3ec34ae..e429cac 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 1.8.3.1