Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 03:53:53PM +0930, Rusty Russell wrote: > Kent Overstreet writes: > > > CONFIG_VIRTIO isn't exposed, everything else is supposed to select it > > instead. > > This is a slight mis-understanding. It's supposed to be selected by > the particular driver, probably virtio_pci

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 01:54:07PM +0800, Asias He wrote: > On 09/05/2012 01:48 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 05, 2012 at 12:22:58PM +0800, Asias He wrote: > >> On 09/04/2012 02:23 PM, Rusty Russell wrote: > >>> Kent Overstreet writes: > >>> > CONFIG_VIRTIO isn't exposed, ever

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Asias He
On 09/05/2012 01:48 PM, Michael S. Tsirkin wrote: > On Wed, Sep 05, 2012 at 12:22:58PM +0800, Asias He wrote: >> On 09/04/2012 02:23 PM, Rusty Russell wrote: >>> Kent Overstreet writes: >>> CONFIG_VIRTIO isn't exposed, everything else is supposed to select it instead. >>> >>> This is a s

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 12:22:58PM +0800, Asias He wrote: > On 09/04/2012 02:23 PM, Rusty Russell wrote: > > Kent Overstreet writes: > > > >> CONFIG_VIRTIO isn't exposed, everything else is supposed to select it > >> instead. > > > > This is a slight mis-understanding. It's supposed to be selec

Re: [PATCHv2] virtio-spec: virtio network device multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 11:34:15AM +0800, Jason Wang wrote: > On 09/03/2012 07:55 PM, Michael S. Tsirkin wrote: > >At Jason's request, I am trying to help finalize the spec for > >the new multiqueue feature. > > > >Changes from Jason's rfc: > >- reserved vq 3: this makes all rx vqs even and tx vqs

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Asias He
On 09/04/2012 02:23 PM, Rusty Russell wrote: > Kent Overstreet writes: > >> CONFIG_VIRTIO isn't exposed, everything else is supposed to select it >> instead. > > This is a slight mis-understanding. It's supposed to be selected by > the particular driver, probably virtio_pci in your case. virti

Re: [PATCHv2] virtio-spec: virtio network device multiqueue support

2012-09-04 Thread Jason Wang
On 09/03/2012 07:55 PM, Michael S. Tsirkin wrote: At Jason's request, I am trying to help finalize the spec for the new multiqueue feature. Changes from Jason's rfc: - reserved vq 3: this makes all rx vqs even and tx vqs odd, which looks nicer to me. - documented packet steering, added a gene

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Kent Overstreet
On Mon, Sep 3, 2012 at 11:23 PM, Rusty Russell wrote: > Kent Overstreet writes: > >> CONFIG_VIRTIO isn't exposed, everything else is supposed to select it >> instead. > > This is a slight mis-understanding. It's supposed to be selected by > the particular driver, probably virtio_pci in your case

Re: [RFC 1/2] virtio_console: Add support for DMA memory allocation

2012-09-04 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Also let's add a wrapper at top of file so ifdefs > do not litter the code like this. For example: > > #ifdef CONFIG_HAS_DMA > #define VIRTIO_CONSOLE_HAS_DMA (1) > #else > #define VIRTIO_CONSOLE_HAS_DMA (0) > #endif > > Now use if instead of ifdef. The driver certai

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Rusty Russell
Kent Overstreet writes: > CONFIG_VIRTIO isn't exposed, everything else is supposed to select it > instead. This is a slight mis-understanding. It's supposed to be selected by the particular driver, probably virtio_pci in your case. Cheers, Rusty. ___

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Nicholas A. Bellinger
On Tue, 2012-09-04 at 08:46 +0200, Paolo Bonzini wrote: > Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: > >> @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi > >> *vscsi, void *buf) > >>struct virtio_scsi_cmd *cmd = buf; > >>struct scsi_cmnd *sc = cmd->sc;

Re: [RFC 1/2] virtio_console: Add support for DMA memory allocation

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 06:58:47PM +0200, Sjur Brændeland wrote: > Hi Michael, > > > Exactly. Though if we just fail load it will be much less code. > > > > Generally, using a feature bit for this is a bit of a problem though: > > normally driver is expected to be able to simply ignore > > a featu

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 07:34:19PM +0300, Avi Kivity wrote: > On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: > > On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: > >> On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: > >> >> +static unsigned int indirect_alloc_thresh = 16; > >> > Why

Re: [PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Kent Overstreet
Whoops, need VIRTIO_RING too >From 79dc9ae40e40cefd6079e4197cac858a1d59e1d8 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 2 Sep 2012 21:44:37 -0700 Subject: [PATCH] virtio-blk: Fix kconfig option CONFIG_VIRTIO isn't exposed, everything else is supposed to select it instead. Signed-o

[PATCH] virtio-blk: Fix kconfig option

2012-09-04 Thread Kent Overstreet
CONFIG_VIRTIO isn't exposed, everything else is supposed to select it instead. Signed-off-by: Kent Overstreet --- drivers/block/Kconfig |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index a796407..d4e1d12 100644 --- a/drive

[PATCH] virtio: console: fix error handling in init() function

2012-09-04 Thread Alexey Khoroshilov
If register_virtio_driver() fails, virtio-ports class is not destroyed. The patch adds error handling of register_virtio_driver(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov --- drivers/char/virtio_console.c | 12 +++- 1 file chang

[PATCH 11/11] vmci_headers.patch: VMCI kernel driver public API.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/Kconfig|1 drivers/misc/Makefile |2 drivers/misc/vmw_vmci/Kconfig | 16 + drivers/misc/vmw_vmci/Makefile | 42 + drivers/misc/vmw_vmci/vmci_common_int.h | 34 + include/linux/vmw

[PATCH 10/11] vmci_route.patch: VMCI routing implementation.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_route.c | 237 drivers/misc/vmw_vmci/vmci_route.h | 30 + 2 files changed, 267 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_route.c create mode 100644 drivers/

[PATCH 09/11] vmci_resource.patch: VMCI resource hash table implementation.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_resource.c | 190 + drivers/misc/vmw_vmci/vmci_resource.h | 59 ++ 2 files changed, 249 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_resource.c create mode 1006

[PATCH 07/11] vmci_hash_table.patch: VMCI hash table implementation.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_hash_table.c | 329 +++ drivers/misc/vmw_vmci/vmci_hash_table.h | 53 + 2 files changed, 382 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_hash_table.c create mode 10064

[PATCH 06/11] vmci_handle_array.patch: VMCI array of vmci_handle.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_handle_array.c | 163 + drivers/misc/vmw_vmci/vmci_handle_array.h | 46 2 files changed, 209 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_handle_array.c create mod

[PATCH 05/11] vmci_event.patch: VMCI kernel events handling.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_event.c | 448 drivers/misc/vmw_vmci/vmci_event.h | 25 ++ 2 files changed, 473 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_event.c create mode 100644 drivers/mis

[PATCH 03/11] vmci_doorbell.patch: VMCI doorbell notification handling.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_doorbell.c | 749 + drivers/misc/vmw_vmci/vmci_doorbell.h | 54 ++ 2 files changed, 803 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_doorbell.c create mode 100644 drive

[PATCH 02/11] vmci_datagram.patch: VMCI datagram entity handling.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_datagram.c | 583 + drivers/misc/vmw_vmci/vmci_datagram.h | 55 +++ 2 files changed, 638 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_datagram.c create mode 100644 driv

[PATCH 01/11] vmci_context.patch: VMCI context list operations.

2012-09-04 Thread George Zhang
Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_context.c | 1245 ++ drivers/misc/vmw_vmci/vmci_context.h | 174 + 2 files changed, 1419 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_context.c create mode 100644 dri

[Pv-drivers] [vmw_vmci 00/11] VMCI driver for Linux

2012-09-04 Thread George Zhang
The following series implements VMware VMCI linux kernel driver. Changes includes VMCI driver public API naming conversion from upper case to lower case, some bug fixes. In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the

[Pv-drivers] [vmw_vmci 00/11] VMCI driver for Linux

2012-09-04 Thread George Zhang
The following series implements VMware VMCI linux kernel driver. Changes includes VMCI driver public API naming conversion from upper case to lower case, some bug fixes. In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the V

[PATCH] vhost: remove duplicated include from tcm_vhost.c

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun From: Wei Yongjun Remove duplicated include. Signed-off-by: Wei Yongjun --- drivers/vhost/tcm_vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index fb36654..587ca7e 100644 --- a/drivers/vhost/tcm_vhost.c +++ b

Call for Participation: The 9th ACM International Conference on Autonomic Computing (ICAC 2012) - September 17-21, 2012 in San Jose, California, USA

2012-09-04 Thread Ioan Raicu
** CALL FOR PARTICIPATION == The 9th ACM International Conference on Autonomic Computing (ICAC 2012) San Jose, California, USA September 17-21, 2012 http://icac2012.cs.fiu.edu Sponsored by ACM

Re: [RFC 1/2] virtio_console: Add support for DMA memory allocation

2012-09-04 Thread Sjur Brændeland
Hi Michael, > Exactly. Though if we just fail load it will be much less code. > > Generally, using a feature bit for this is a bit of a problem though: > normally driver is expected to be able to simply ignore > a feature bit. In this case driver is required to > do something so a feature bit is n

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-04 Thread Avi Kivity
On 09/04/2012 07:34 PM, Avi Kivity wrote: > On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: >> On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: >>> On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: >>> >> +static unsigned int indirect_alloc_thresh = 16; >>> > Why 16? Please make is M

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-04 Thread Avi Kivity
On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: > On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: >> On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: >> >> +static unsigned int indirect_alloc_thresh = 16; >> > Why 16? Please make is MAX_SG + 1 this makes some sense. >> >> Wouldn't

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 04:55:56PM +0200, Paolo Bonzini wrote: > Il 04/09/2012 16:47, Michael S. Tsirkin ha scritto: > >> > static void virtscsi_init_vq(struct virtio_scsi_vq *virtscsi_vq, > >> > - struct virtqueue *vq) > >> > + struct virtqu

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 16:47, Michael S. Tsirkin ha scritto: >> > static void virtscsi_init_vq(struct virtio_scsi_vq *virtscsi_vq, >> > - struct virtqueue *vq) >> > + struct virtqueue *vq, bool affinity) >> > { >> >spin_lock_init(&virtscsi_vq->vq_lock); >> >

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:17PM +0200, Paolo Bonzini wrote: > @@ -575,15 +630,19 @@ static struct scsi_host_template virtscsi_host_template > = { > &__val, sizeof(__val)); \ > }) > > + Pls don't add empty lines. > static void virtscsi_init_vq(struct vi

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 04:30:35PM +0200, Paolo Bonzini wrote: > Il 04/09/2012 16:21, Michael S. Tsirkin ha scritto: > > > One reason is that, even though in practice I expect roughly the same > > > number of targets and VCPUs, hotplug means the number of targets is > > > difficult to predict and i

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 16:21, Michael S. Tsirkin ha scritto: > > One reason is that, even though in practice I expect roughly the same > > number of targets and VCPUs, hotplug means the number of targets is > > difficult to predict and is usually fixed to 256. > > > > The other reason is that per-target vq

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 16:19, Michael S. Tsirkin ha scritto: > > > Also - some kind of comment explaining why a similar race can not happen > > > with this lock in place would be nice: I see why this specific race can > > > not trigger but since lock is dropped later before you submit command, I > > > have

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 03:49:42PM +0200, Paolo Bonzini wrote: > Il 04/09/2012 14:48, Michael S. Tsirkin ha scritto: > >> > This patch adds queue steering to virtio-scsi. When a target is sent > >> > multiple requests, we always drive them to the same queue so that FIFO > >> > processing order is

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 03:45:57PM +0200, Paolo Bonzini wrote: > > Also - some kind of comment explaining why a similar race can not happen > > with this lock in place would be nice: I see why this specific race can > > not trigger but since lock is dropped later before you submit command, I > > ha

Re: [PATCH] virtio: Don't access device data after unregistration.

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 02:12:33PM +0200, Sjur Brændeland wrote: > Hi Michael, > > >> >> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. > >> > > >> > What's the root cause of the panic? > >> > >> I believe the cause of the panic is calling > >> ida_simple_remove(&virtio_index_ida, dev->index

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 14:48, Michael S. Tsirkin ha scritto: >> > This patch adds queue steering to virtio-scsi. When a target is sent >> > multiple requests, we always drive them to the same queue so that FIFO >> > processing order is kept. However, if a target was idle, we can choose >> > a queue arbitr

Re: [RFC 1/2] virtio_console: Add support for DMA memory allocation

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 01:28:36PM +0200, Sjur Brændeland wrote: > Hi Michael, > > >> If an architecture do not support DMA you will get > >> a link error: "unknown symbol" for dma_alloc_coherent. > > > > Yes, it even seems intentional. > > But I have a question: can the device work without DMA? >

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 15:35, Michael S. Tsirkin ha scritto: > I see. I guess you can rewrite this as: > atomic_inc > if (atomic_read() == 1) > which is a bit cheaper, and make the fact > that you do not need increment and return to be atomic, > explicit. It seems more complicated to me for hardly any rea

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 01:18:31PM +0200, Paolo Bonzini wrote: > Il 04/09/2012 13:09, Michael S. Tsirkin ha scritto: > >> > queuecommand on CPU #0 queuecommand #2 on CPU #1 > >> > -- > >> > atomic_inc_return(...) == 1 > >

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:17PM +0200, Paolo Bonzini wrote: > This patch adds queue steering to virtio-scsi. When a target is sent > multiple requests, we always drive them to the same queue so that FIFO > processing order is kept. However, if a target was idle, we can choose > a queue arbitra

Re: [PATCH] virtio: Don't access device data after unregistration.

2012-09-04 Thread Sjur Brændeland
Hi Michael, >> >> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. >> > >> > What's the root cause of the panic? >> >> I believe the cause of the panic is calling >> ida_simple_remove(&virtio_index_ida, dev->index); >> when the dev structure is "poisoned" after kfree. >> It might be the "BUG_O

Re: [RFC 1/2] virtio_console: Add support for DMA memory allocation

2012-09-04 Thread Sjur Brændeland
Hi Michael, >> If an architecture do not support DMA you will get >> a link error: "unknown symbol" for dma_alloc_coherent. > > Yes, it even seems intentional. > But I have a question: can the device work without DMA? The main dependency is actually on the dma-allocation. In my case I do dma_decl

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 13:09, Michael S. Tsirkin ha scritto: >> > queuecommand on CPU #0 queuecommand #2 on CPU #1 >> > -- >> > atomic_inc_return(...) == 1 >> >atomic_inc_return(...) == 2 >> >

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 12:25:03PM +0200, Paolo Bonzini wrote: > Il 04/09/2012 10:46, Michael S. Tsirkin ha scritto: > +static int virtscsi_queuecommand_multi(struct Scsi_Host *sh, > + struct scsi_cmnd *sc) > +{ > +struct virtio_scsi

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 10:46, Michael S. Tsirkin ha scritto: +static int virtscsi_queuecommand_multi(struct Scsi_Host *sh, + struct scsi_cmnd *sc) +{ + struct virtio_scsi *vscsi = shost_priv(sh); + struct virtio_scsi_target_state *tgt = vscsi->tgt[s

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 08:46:12AM +0200, Paolo Bonzini wrote: > Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: > >> @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi > >> *vscsi, void *buf) > >>struct virtio_scsi_cmd *cmd = buf; > >>struct scsi_cmnd *sc = cm