[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abs
From: |
Felipe Franciosi |
Subject: |
Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction |
Date: |
Tue, 30 May 2017 14:06:40 +0000 |
> On 30 May 2017, at 14:11, Stefan Hajnoczi <address@hidden> wrote:
>
> On Fri, May 05, 2017 at 12:13:37PM +0200, Paolo Bonzini wrote:
>> From: Felipe Franciosi <address@hidden>
>>
>> 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 <address@hidden>
>> Message-Id: <address@hidden>
>> ---
>> 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 <address@hidden>
>> + *
>> + * This work is largely based on the "vhost-scsi" implementation by:
>> + * Stefan Hajnoczi <address@hidden>
>> + * Nicholas Bellinger <address@hidden>
>> + *
>> + * 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
- [Qemu-devel] [PULL 09/21] vmw_pvscsi: check message ring page count at initialisation, (continued)
- [Qemu-devel] [PULL 09/21] vmw_pvscsi: check message ring page count at initialisation, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 14/21] Fix the -accel parameter and the documentation for 'hax', Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 15/21] MAINTAINERS: Add "R:" tag for self-appointed reviewers, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 16/21] get_maintainer: Teach get_maintainer.pl about the new "R:" tag, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 19/21] get_maintainer: add subsystem to reviewer output, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 17/21] get_maintainer: it's '--pattern-depth', not '-pattern-depth', Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 20/21] libvhost-user: replace vasprintf() to fix build, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 18/21] get_maintainer: --r (list reviewer) is on by default, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Paolo Bonzini, 2017/05/05
Re: [Qemu-devel] [PULL 00/21] Misc patches for 2017-05-05, Stefan Hajnoczi, 2017/05/08
Re: [Qemu-devel] [PULL 00/21] Misc patches for 2017-05-05, Stefan Hajnoczi, 2017/05/30