> On 30 May 2017, at 14:11, Stefan Hajnoczi <stefa...@gmail.com> wrote:
> 
> On Fri, May 05, 2017 at 12:13:37PM +0200, Paolo Bonzini wrote:
>> From: Felipe Franciosi <fel...@nutanix.com>
>> 
>> In order to introduce a new vhost-user-scsi host device type, it makes
>> sense to abstract part of vhost-scsi into a common parent class. This
>> commit does exactly that.
>> 
>> Signed-off-by: Felipe Franciosi <fel...@nutanix.com>
>> Message-Id: <1488479153-21203-3-git-send-email-fel...@nutanix.com>
>> ---
>> hw/scsi/Makefile.objs                 |   2 +-
>> hw/scsi/vhost-scsi-common.c           | 143 +++++++++++++++++++++++++
>> hw/scsi/vhost-scsi.c                  | 194 
>> ++++++++++------------------------
>> include/hw/virtio/vhost-scsi-common.h |  48 +++++++++
>> include/hw/virtio/vhost-scsi.h        |  11 +-
>> include/hw/virtio/virtio-scsi.h       |   2 +
>> 6 files changed, 252 insertions(+), 148 deletions(-)
>> create mode 100644 hw/scsi/vhost-scsi-common.c
>> create mode 100644 include/hw/virtio/vhost-scsi-common.h
>> 
>> diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
>> index 5a2248be36..54d8754e9a 100644
>> --- a/hw/scsi/Makefile.objs
>> +++ b/hw/scsi/Makefile.objs
>> @@ -10,5 +10,5 @@ obj-$(CONFIG_PSERIES) += spapr_vscsi.o
>> 
>> ifeq ($(CONFIG_VIRTIO),y)
>> obj-y += virtio-scsi.o virtio-scsi-dataplane.o
>> -obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o
>> +obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-common.o vhost-scsi.o
>> endif
>> diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c
>> new file mode 100644
>> index 0000000000..e41c0314db
>> --- /dev/null
>> +++ b/hw/scsi/vhost-scsi-common.c
>> @@ -0,0 +1,143 @@
>> +/*
>> + * vhost-scsi-common
>> + *
>> + * Copyright (c) 2016 Nutanix Inc. All rights reserved.
>> + *
>> + * Author:
>> + *  Felipe Franciosi <fel...@nutanix.com>
>> + *
>> + * This work is largely based on the "vhost-scsi" implementation by:
>> + *  Stefan Hajnoczi    <stefa...@linux.vnet.ibm.com>
>> + *  Nicholas Bellinger <n...@risingtidesystems.com>
>> + *
>> + * This work is licensed under the terms of the GNU LGPL, version 2 or 
>> later.
>> + * See the COPYING.LIB file in the top-level directory.
>> + *
>> + */
>> +
>> +#include "qemu/osdep.h"
>> +#include <linux/vhost.h>
> 
> This breaks the mingw build:
> 
>  hw/scsi/vhost-scsi-common.c:19:25: fatal error: linux/vhost.h: No such file 
> or directory
>   #include <linux/vhost.h>
>                         ^
>  compilation terminated.

Thanks for the report.

Paolo: I know you wanted this enabled by default whenever virtio was built, but 
maybe we should stick to a configure switch live vhost-net, vhost-scsi and 
vhost-vsock?

Let me know what you think and I'll send an extra patch for it straight away.

Felipe


Reply via email to