From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcwsR-0000gm-Tl for qemu-devel@nongnu.org; Fri, 18 Sep 2015 10:43:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcwsJ-000430-Ia for qemu-devel@nongnu.org; Fri, 18 Sep 2015 10:42:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcwsJ-00042n-E4 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 10:42:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 259E18E6EC for ; Fri, 18 Sep 2015 14:42:55 +0000 (UTC) References: <1442585920-28373-1-git-send-email-marcandre.lureau@redhat.com> From: Paolo Bonzini Message-ID: <55FC22EB.9020009@redhat.com> Date: Fri, 18 Sep 2015 16:42:51 +0200 MIME-Version: 1.0 In-Reply-To: <1442585920-28373-1-git-send-email-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] vhost-scsi: include linux/vhost.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org On 18/09/2015 16:18, marcandre.lureau@redhat.com wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > Replace ad-hoc declarations with the linux header. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > hw/scsi/vhost-scsi.c | 1 + > include/hw/virtio/vhost-scsi.h | 25 ------------------------- > 2 files changed, 1 insertion(+), 25 deletions(-) >=20 > diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c > index bac9ddb..fb7983d 100644 > --- a/hw/scsi/vhost-scsi.c > +++ b/hw/scsi/vhost-scsi.c > @@ -26,6 +26,7 @@ > #include "hw/virtio/virtio-bus.h" > #include "hw/virtio/virtio-access.h" > #include "hw/fw-path-provider.h" > +#include "linux/vhost.h" > =20 > /* Features supported by host kernel. */ > static const int kernel_feature_bits[] =3D { > diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-s= csi.h > index 701bfee..9fd63df 100644 > --- a/include/hw/virtio/vhost-scsi.h > +++ b/include/hw/virtio/vhost-scsi.h > @@ -19,37 +19,12 @@ > #include "hw/virtio/virtio-scsi.h" > #include "hw/virtio/vhost.h" > =20 > -/* > - * Used by QEMU userspace to ensure a consistent vhost-scsi ABI. > - * > - * ABI Rev 0: July 2012 version starting point for v3.6-rc merge candi= date + > - * RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl = usage > - * ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_sc= si_target. > - * All the targets under vhost_wwpn can be seen and used by gue= st. > - */ > - > -#define VHOST_SCSI_ABI_VERSION 1 > - > -/* TODO #include properly */ > -/* For VHOST_SCSI_SET_ENDPOINT/VHOST_SCSI_CLEAR_ENDPOINT ioctl */ > -struct vhost_scsi_target { > - int abi_version; > - char vhost_wwpn[224]; > - unsigned short vhost_tpgt; > - unsigned short reserved; > -}; > - > enum vhost_scsi_vq_list { > VHOST_SCSI_VQ_CONTROL =3D 0, > VHOST_SCSI_VQ_EVENT =3D 1, > VHOST_SCSI_VQ_NUM_FIXED =3D 2, > }; > =20 > -#define VHOST_VIRTIO 0xAF > -#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_= scsi_target) > -#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhos= t_scsi_target) > -#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int) > - > #define TYPE_VHOST_SCSI "vhost-scsi" > #define VHOST_SCSI(obj) \ > OBJECT_CHECK(VHostSCSI, (obj), TYPE_VHOST_SCSI) >=20 Thanks, looks good. Paolo