Re: [PATCH] virtio-blk: Don't free ida when disk is in use

2012-12-19 Thread Rusty Russell
Alexander Graf ag...@suse.de writes: When a file system is mounted on a virtio-blk disk, we then remove it and then reattach it, the reattached disk gets the same disk name and ids as the hot removed one. This leads to very nasty effects - mostly rendering the newly attached device

Re: [PATCH] virtio-spec: fix thinko in multiport documentation

2012-12-13 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Dec 12, 2012 at 02:44:20PM +0530, Amit Shah wrote: On (Wed) 12 Dec 2012 [10:22:24], Michael S. Tsirkin wrote: On Sun, Sep 09, 2012 at 02:08:37PM +0300, Michael S. Tsirkin wrote: spec numbers ports port0, port 1 etc, then goes on to say

Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-11 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote: Amit Shah amit.s...@redhat.com writes: On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote: Amit Shah amit.s...@redhat.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com

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

2012-12-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program

Re: [PATCH V3 2/2] virtio: add drv_to_virtio to make code clearly

2012-12-10 Thread Rusty Russell
Wanlong Gao gaowanl...@cn.fujitsu.com writes: Add drv_to_virtio wrapper to get virtio_driver from device_driver. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Thanks, both applied. Cheers, Rusty

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

2012-12-09 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Add multiqueue support to virtio network device. Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_MQ to program

Re: [PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change

2012-12-09 Thread Rusty Russell
commit with the small diff (attached below). Please put this commit after commit e794093a52cdfef09b3fdb6294b75ab8cacb30a8 Author: Rusty Russell ru...@rustcorp.com.au Date: Tue Oct 16 23:56:14 2012 +1030 virtio_net: don't rely on virtqueue_add_buf() returning capacity. and before

Re: [PATCHv5] virtio-spec: virtio network device RFS support

2012-12-06 Thread Rusty Russell
Ben Hutchings bhutchi...@solarflare.com writes: If you want a name for the whole set of features involved, I don't see any better name than 'multiqueue'/'MQ'. OK, let's go back to multiqueue then, and perhaps refer to the current receive steering as 'automatic'. Cheers, Rusty.

Re: [PATCH 1/3] virtio: change to_vp_device to an inlined definition

2012-12-05 Thread Rusty Russell
Wanlong Gao gaowanl...@cn.fujitsu.com writes: to_vp_device is worth changing to inlined definition. Why? Thanks, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH 1/3] virtio: change to_vp_device to an inlined definition

2012-12-05 Thread Rusty Russell
Stephen Hemminger shemmin...@vyatta.com writes: On Wed, 5 Dec 2012 15:03:27 +0800 Wanlong Gao gaowanl...@cn.fujitsu.com wrote: to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- drivers/virtio/virtio_pci.c | 6 +- 1 file

Re: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-03 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On Monday, December 03, 2012 12:25:42 PM Rusty Russell wrote: + + /* Work struct for refilling if we run low on memory. */ + struct delayed_work refill; I can't really see the justificaiton for a refill per queue. Just have one work iterate all

Re: [PATCHv4] virtio-spec: virtio network device RFS support

2012-12-02 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Add RFS support to virtio network device. Add a new feature flag VIRTIO_NET_F_RFS for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_RFS to program packet

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-02 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: +static const struct ethtool_ops virtnet_ethtool_ops; + +/* + * Converting between virtqueue no. and kernel tx/rx queue no. + * 0:rx0 1:tx0 2:cvq 3:rx1 4:tx1 ... 2N+1:rxN 2N+2:txN + */ +static int vq2txq(struct virtqueue *vq) +{ + int index =

Re: [net-next rfc v7 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-02 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: To support multiqueue transmitq/receiveq, the first step is to separate queue related structure from virtnet_info. This patch introduce send_queue and receive_queue structure and use the pointer to them as the parameter in functions handling

Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-15 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Remove buffers from the out-queue when a port is removed. Rproc_serial communicates with remote processors that may crash and leave buffers in the out-queue. The virtio serial ports may have buffers in

Re: [PATCH v11 5/7] virtio_balloon: introduce migration primitives to balloon pages

2012-11-11 Thread Rusty Russell
Rafael Aquini aqu...@redhat.com writes: On Thu, Nov 08, 2012 at 09:32:18AM +1030, Rusty Russell wrote: The first one can be delayed, the second one can be delayed if the host didn't ask for VIRTIO_BALLOON_F_MUST_TELL_HOST (qemu doesn't). We could implement a proper request queue

Re: [PATCH] virtio-mmio: Fix irq parsing in command line parameter

2012-11-08 Thread Rusty Russell
Lee Jones lee.jo...@linaro.org writes: Resorted to poaching now have we Pawel? I hope you were joking! Yes, of course. I thought that was clearly indicated by the jovial winking smiley. :) I realise it wasn't obvious soley by this exchange, but Pawel and I are actually ol' friends.

Re: [PATCH] virtio: Don't access index after unregister.

2012-11-08 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: Virtio wants to release used indices after the corresponding virtio device has been unregistered. However, virtio does not hold an extra reference, giving up its last reference with device_unregister(), making accessing dev-index afterwards

Re: [PATCH v3] virtio-mmio: Fix irq parsing in command line parameter

2012-11-08 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: When the resource_size_t is 64-bit long, the sscanf() on the virtio device command line paramter string may return wrong value because its format was defined as %u. Fixed by using an intermediate local value of a known length. Also added cleaned up the

Re: [PATCH v11 5/7] virtio_balloon: introduce migration primitives to balloon pages

2012-11-07 Thread Rusty Russell
Rafael Aquini aqu...@redhat.com writes: + * virtballoon_migratepage - perform the balloon page migration on behalf of + *a compation thread. (called under page lock) + if (!mutex_trylock(vb-balloon_lock)) + return -EAGAIN; Erk, OK... + /*

Re: [PATCH resend] virtio_console: Free buffers from out-queue upon close

2012-11-07 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Free pending output buffers from the virtio out-queue when host has acknowledged port_close. Also removed WARN_ON() in remove_port_data(). Signed-off-by: Sjur Brændeland

Re: [PATCH v2] virtio-mmio: Fix irq parsing in the command line

2012-11-07 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: On 64-bit machines resource_size_t is a 64-bit value, while sscanf() format for this argument was defined as %u. Fixed by using an intermediate local value of a known length. Actually, on 32-bit machines, too (eg. x86 with PAE). Otherwise we'd just

Re: [PATCH 1/1] vhost-blk: Add vhost-blk support v4

2012-11-07 Thread Rusty Russell
Asias He as...@redhat.com writes: vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request to bio and use submit_bio() to submit I/O directly. So this version any supports raw block device as guest's disk

Re: [PATCH] virtio-mmio: Fix irq parsing in command line parameter

2012-11-07 Thread Rusty Russell
Lee Jones lee.jo...@linaro.org writes: On Mon, 05 Nov 2012, Pawel Moll wrote: On 64-bit machines resource_size_t is a 64-bit value, while sscanf() format for this argument was defined as %u. Fixed by using an intermediate local value of a known length. Also added cleaned up the resource

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-05 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Mon) 05 Nov 2012 [11:31:24], Amit Shah wrote: On (Mon) 05 Nov 2012 [09:11:45], Rusty Russell wrote: Sjur Brændeland s...@brendeland.net writes: From: Sjur Brændeland sjur.brandel...@stericsson.com This patch-set introduces a new virtio

Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-05 Thread Rusty Russell
Sjur Brændeland sju...@gmail.com writes: Hi Rusty, So, this adds another host-side virtqueue implementation. Can we combine them together conveniently? You pulled out more stuff into vring.h which is a start, but it's a bit overloaded. Perhaps we should separate the common fields into

Re: [rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-11-04 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific applications. ... + /* Only two modes were support

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-04 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: This addes multiqueue support to virtio_net driver. There's two mode supported: single queue pair mode and multiple queue pairs mode. An obvious difference compared with a physical mq card is that virtio-net reserve first two virtqueues when it is

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-04 Thread Rusty Russell
Sjur Brændeland s...@brendeland.net writes: From: Sjur Brændeland sjur.brandel...@stericsson.com This patch-set introduces a new virtio type rproc_serial for communicating with remote processors over shared memory. The driver depends on the the remoteproc framework. As preparation for

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-04 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: +struct virtnet_info { + u16 num_queue_pairs;/* # of RX/TX vq pairs */ + u16 total_queue_pairs; + + struct send_queue *sq; + struct receive_queue *rq; + struct virtqueue *cvq; + + struct virtio_device *vdev; +

Re: [PATCH 6/9] virtio_mmio: Cast resources[1].start to ‘unsigned int *’ to rid compiler warning

2012-11-04 Thread Rusty Russell
Lee Jones lee.jo...@linaro.org writes: drivers/virtio/virtio_mmio.c: In function ‘vm_cmdline_set’: drivers/virtio/virtio_mmio.c:535:4: warning: format ‘%u’ expects argument of type ‘unsigned int *’, but argument 4 has type ‘resource_size_t *’ [-Wformat] Cc: Rusty Russell ru

Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-01 Thread Rusty Russell
Sjur Brændeland s...@brendeland.net writes: Zero-Copy data transport on the modem is primary goal for CAIF Virtio. In order to achieve Zero-Copy the direction of the Virtio rings are flipped in the RX direction. So we have implemented the Virtio access-function similar to what is found in

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-01 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com @@ -1415,7 +1524,16 @@ static void remove_port_data(struct port *port) /* Remove buffers we

Re: [PATCH 14/16] virtio: Convert dev_printk(KERN_LEVEL to dev_level(

2012-10-31 Thread Rusty Russell
Joe Perches j...@perches.com writes: dev_level calls take less code than dev_printk(KERN_LEVEL and reducing object size is good. Convert if (printk_ratelimit()) dev_printk to dev_level_ratelimited. Signed-off-by: Joe Perches j...@perches.com Applied. Thanks, Rusty.

Re: [PATCH] virtio-ccw: Clarifications.

2012-10-30 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: Clarify how indicator location is communicated and that the feature bits are little-endian. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Thanks, applied! Cheers, Rusty. ___ Virtualization

Re: Linux-next changes for module and virtio trees.

2012-10-30 Thread Rusty Russell
Stephen Rothwell s...@canb.auug.org.au writes: Hi Rusty, On Tue, 02 Oct 2012 15:56:56 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Please remove my quilt tree http://ozlabs.org/~rusty/kernel/rr-latest/ from linux-next, and use my git trees from now on: git://git.kernel.org

Re: [PATCHv7 1/4] virtio_console: Free buffer if splice fails

2012-10-22 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Free the allocated scatter list if send_pages fails in function port_splice_write. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com Didn't see Amit ack this, but applied anyway. Thanks,

Re: [PATCHv7 2/4] virtio_console: Use kmalloc instead of kzalloc

2012-10-22 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Avoid the more cpu expensive kzalloc when allocating buffers. Originally kzalloc was intended for isolating the guest from the host by not sending random guest data to the host. But device isolation

Re: [PATCHv7 3/4] virtio_console: Merge struct buffer_token into struct port_buffer

2012-10-22 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Refactoring the splice functionality by unifying the approach for sending scatter-lists and regular buffers. This simplifies buffer handling and reduces code size. Splice will now allocate a

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-22 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 18, 2012 at 02:50:56PM +1030, Rusty Russell wrote: Asias He as...@redhat.com writes: +#define BLK_HDR 0 What's this for, exactly? Please add a comment. The block headr is in the first and separate buffer. Please don't assume

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-10-22 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Add a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (11) for communicating with a remote processor in an asymmetric multi-processing configuration. This implementation reuses the

Re: [PATCH] virtio: 9p: correctly pass physical address to userspace for high pages

2012-10-18 Thread Rusty Russell
Will Deacon will.dea...@arm.com writes: On Thu, Oct 18, 2012 at 03:19:06AM +0100, Rusty Russell wrote: We do have an alternate solution: masking out __GFP_HIGHMEM from the kmalloc of desc. If it fails, we will fall back to laying out the virtio request directly inside the ring; if it doesn't

Re: [PATCH] virtio: 9p: correctly pass physical address to userspace for high pages

2012-10-17 Thread Rusty Russell
Will Deacon will.dea...@arm.com writes: When using a virtio transport, the 9p net device allocates pages to back the descriptors inserted into the virtqueue. These allocations may be performed from atomic context (under the channel lock) and can therefore return high mappings which aren't

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-17 Thread Rusty Russell
Asias He as...@redhat.com writes: +#define BLK_HDR0 What's this for, exactly? Please add a comment. The block headr is in the first and separate buffer. Please don't assume this! We're trying to fix all the assumptions in qemu at the moment. vhost_net handles this correctly, taking

Re: Using PCI config space to indicate config location

2012-10-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:21:50PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote: For writes, the standard seems to be a commit latch. We could abuse

[PATCH 2/5] virtio-net: remove unused skb_vnet_hdr-num_sg field

2012-10-16 Thread Rusty Russell
From: Michael S. Tsirkin m...@redhat.com [Split from correct capacity math on ring full -- Rusty] Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/net/virtio_net.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH 4/5] virtio_net: don't rely on virtqueue_add_buf() returning capacity.

2012-10-16 Thread Rusty Russell
Now we can easily use vq-num_free to determine if there are descriptors left in the queue, we're about to change virtqueue_add_buf() to return 0 on success. The virtio_net driver is the only one which actually uses the return value, so change that. Signed-off-by: Rusty Russell ru

[PATCH 1/5] virtio: move queue_index and num_free fields into core struct virtqueue.

2012-10-16 Thread Rusty Russell
They're generic concepts, so hoist them. This also avoids accessor functions. This goes even further than Jason Wang's 17bb6d4088 patch (virtio-ring: move queue_index to vring_virtqueue) which moved the queue_index from the specific transport. Signed-off-by: Rusty Russell ru...@rustcorp.com.au

[PATCH 5/5] virtio: make virtqueue_add_buf() returning 0 on success, not capacity.

2012-10-16 Thread Rusty Russell
Now noone relies on this behavior, we simplify virtqueue_add_buf() so it return 0 or -errno. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_ring.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers

Re: [PATCH 5/5] virtio: make virtqueue_add_buf() returning 0 on success, not capacity.

2012-10-16 Thread Rusty Russell
Note: I also have minor cleanups to virtio drivers to change (ret = 0) to (ret == 0) where it would otherwise be confusing for new readers, but I didn't clutter the list with them. See my virtio-wip tree for the gory details. Cheers, Rusty. ___

Re: [PATCH 1/5] virtio: move queue_index and num_free fields into core struct virtqueue.

2012-10-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Oct 17, 2012 at 12:00:48AM +1030, Rusty Russell wrote: * @priv: a pointer for the virtqueue implementation to use. + * @index: the zero-based ordinal number for this queue. + * @num_free: number of buffers we expect to be able to fit. Only

Re: Using PCI config space to indicate config location

2012-10-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Oct 12, 2012 at 08:59:36AM +1030, Rusty Russell wrote: For writes, the standard seems to be a commit latch. We could abuse the generation count for this: the driver writes to it to commit config changes. I think this will work

Re: [PATCH] virtio-pci: use module_pci_driver to simplify the code

2012-10-11 Thread Rusty Russell
Wei Yongjun weiyj...@gmail.com writes: From: Wei Yongjun yongjun_...@trendmicro.com.cn Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch)

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-11 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 11, 2012 at 10:33:31AM +1030, Rusty Russell wrote: OK. Well, Anthony wants qemu to be robust in this regard, so I am tempted to rework all the qemu drivers to handle arbitrary layouts. They could use a good audit anyway. I agree here

Re: [PATCH] [SCSI] virtio-scsi: Add real 2-clause BSD license to header

2012-10-11 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 11/10/2012 08:41, Bryan Venteicher ha scritto: This is analogous to commit a1b383870a made by Rusty Russell to all the VirtIO headers at the time. This eases the use of the header as is by other OSes. Signed-off-by: Bryan Venteicher bry

Re: Using PCI config space to indicate config location

2012-10-11 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 11, 2012 at 11:48:22AM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: Note before anyone gets confused; we were talking about using the PCI config

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Jamie Lokier ja...@shareable.org writes: Rusty Russell wrote: I don't think it'll be that bad; reset clears the device to unknown, bar0 moves it from unknown-legacy mode, bar1/2/3 changes it from unknown-modern mode, and anything else is bad (I prefer being strict so we catch bad

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: Rusty Russell ru...@rustcorp.com.au writes: Anthony Liguori aligu...@us.ibm.com writes: We'll never remove legacy so we shouldn't plan on it. There are literally hundreds of thousands of VMs out there with the current virtio drivers installed

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Gerd Hoffmann kra...@redhat.com writes: So how about this: (1) Add a vendor specific pci capability for new-style virtio. Specifies the pci bar used for new-style virtio registers. Guests can use it to figure whenever new-style virtio is supported and to map the correct bar

Re: Proposal for virtio standardization.

2012-10-10 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Thu, 27 Sep 2012 09:59:33 +0930 Rusty Russell ru...@rustcorp.com.au wrote: 3) Various clarifications, formalizations and cleanups to the spec text, and possibly elimination of old deprecated features. 4) The only significant change

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-10 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 09/10/2012 06:59, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 05/10/2012 07:43, Rusty Russell ha scritto: That's good. But virtio_blk's scsi command is insoluble AFAICT. As I said to Anthony, the best rules are always

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Oct 10, 2012 at 08:36:12AM -0500, Anthony Liguori wrote: Rusty Russell ru...@rustcorp.com.au writes: Gerd Hoffmann kra...@redhat.com writes: So how about this: (1) Add a vendor specific pci capability for new-style virtio

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Jamie Lokier ja...@shareable.org writes: Rusty Russell wrote: I don't think it'll be that bad; reset clears the device to unknown, bar0 moves it from unknown-legacy mode, bar1/2/3 changes it from unknown-modern mode, and anything else is bad (I

Re: Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: Note before anyone gets confused; we were talking about using the PCI config space to indicate what BAR(s) the virtio stuff is in. An alternative would be to simply specify a new layout

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-08 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: Gerd Hoffmann kra...@redhat.com writes: Hi, So we could have for virtio something like this: Capabilities: [??] virtio-regs: legacy: BAR=0 offset=0 virtio-pci: BAR=1 offset=1000

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-08 Thread Rusty Russell
Anthony Liguori aligu...@us.ibm.com writes: We'll never remove legacy so we shouldn't plan on it. There are literally hundreds of thousands of VMs out there with the current virtio drivers installed in them. We'll be supporting them for a very, very long time :-) You will be supporting this

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-08 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 05/10/2012 07:43, Rusty Russell ha scritto: That's good. But virtio_blk's scsi command is insoluble AFAICT. As I said to Anthony, the best rules are always and never, so I'd really rather not have to grandfather that in. It is, but we can add

Using PCI config space to indicate config location

2012-10-07 Thread Rusty Russell
(Topic updated, cc's trimmed). Anthony Liguori aligu...@us.ibm.com writes: Rusty Russell ru...@rustcorp.com.au writes: 4) The only significant change to the spec is that we use PCI capabilities, so we can have infinite feature bits. (see http://lists.linuxfoundation.org/pipermail

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-06 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 04/10/2012 14:51, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 04/10/2012 02:11, Rusty Russell ha scritto: There's a reason I haven't done this. I really, really dislike my implemention isn't broken feature bits. We

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-04 Thread Rusty Russell
for my lack of attention :( Here's the spec change: commit 7e74459bb966ccbaad9e4bf361d1178b7f400b79 Author: Rusty Russell ru...@rustcorp.com.au Date: Thu Oct 4 17:11:27 2012 +0930 No longer assume framing is independent of messages. *sniff* Signed-off-by: Rusty Russell ru...@rustcorp.com.au

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-04 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 04/10/2012 02:11, Rusty Russell ha scritto: There's a reason I haven't done this. I really, really dislike my implemention isn't broken feature bits. We could have an infinite number of them, for each bug in each device. However

[PULL] virtio

2012-10-04 Thread Rusty Russell
): virtio-balloon: dependency fix virtio: support reserved vqs virtio: don't crash when device is buggy Peter Senna Tschudin (1): drivers/virtio/virtio_pci.c: fix error return code Rusty Russell (4): virtio_balloon: not EXPERIMENTAL any more. virtio: add help

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Virtio devices are not supposed to depend on the framing of the scatter-gather lists, but various implementations did. Safeguard this in future by adding an option to deliberately create perverse descriptors. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/Kconfig

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Michael S. Tsirkin m...@redhat.com writes: Thinking about Sasha's patches, we can reduce ring usage for virtio net small packets dramatically if we put virtio net header inline with the data. This can be done for free in case guest net stack

Re: [PATCH 2/3] virtio-net: correct capacity math on ring full

2012-10-03 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Capacity math on ring full is wrong: we are looking at num_sg but that might be optimistic because of indirect buffer use. The implementation also penalizes fast path with extra memory accesses for the benefit of ring full condition handling which

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 03/10/2012 08:44, Rusty Russell ha scritto: There's a reason I haven't done this. I really, really dislike my implemention isn't broken feature bits. We could have an infinite number of them, for each bug in each device. However, this bug

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Anthony Liguori anth...@codemonkey.ws writes: Rusty Russell ru...@rustcorp.com.au writes: Michael S. Tsirkin m...@redhat.com writes: Thinking about Sasha's patches, we can reduce ring usage for virtio net small packets dramatically if we put virtio net header inline with the data. This can

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Rusty Russell
Asias He as...@redhat.com writes: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. Hmm, are you talking about virtqueue_enable_cb_delayed()? Just the fact that virtqueue_disable_cb() prevents updates of used_index, and then we do the update in

Re: [PATCHv5 2/3] virtio_console: Add support for remoteproc serial

2012-09-26 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Add a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (11) for communicating with a remote processor in an asymmetric multi-processing configuration. ... static struct port_buffer

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-26 Thread Rusty Russell
Asias He as...@redhat.com writes: On 09/25/2012 10:36 AM, Asias He wrote: This reduces unnecessary interrupts that host could send to guest while guest is in the progress of irq handling. If one vcpu is handling the irq, while another interrupt comes, in handle_edge_irq(), the guest will

RE: [PATCH 1/3] virtio_console:Merge struct buffer_token into struct port_buffer

2012-09-26 Thread Rusty Russell
Sjur BRENDELAND sjur.brandel...@stericsson.com writes: This allocates one redundant sg entry when nrbuf 0, but I think it is OK. (just a comment) I did this on purpose for the sake of simplicity, but I can change this to something like: alloc_size = sizeof(*buf) + sizeof(buf-sg) *

Re: [PATCHv4] virtio_console: Add support for remoteproc serial

2012-09-25 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Mon) 24 Sep 2012 [23:50:01], Sjur BRENDELAND wrote: Hi Amit, I'm sorry for not being able to look at this earlier. No worries. I'll try to respin and retest this patch by tomorrow. If you by any chance could find time to review so could make it

Re: [PATCH 0/2] virtio-mmio updates for 3.7

2012-09-25 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: On Tue, 2012-09-25 at 01:11 +0100, Rusty Russell wrote: Would you be so kind and consider getting those two small fixes into 3.7 merge? All credits go to Brian, all shame on me :-) Should these also be cc'd to sta...@kernel.org? I was thinking about

Re: [PATCH 0/2] virtio-mmio updates for 3.7

2012-09-24 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: Hi Rusty, Would you be so kind and consider getting those two small fixes into 3.7 merge? All credits go to Brian, all shame on me :-) Should these also be cc'd to sta...@kernel.org? Cheers, Rusty. ___

Re: [PATCHv2] virtio_console: Add support for remoteproc serial

2012-09-19 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Add a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (0xB) for communicating with a remote processor in an asymmetric multi-processing configuration. This implementation reuses the

Re: [PATCH] drivers/virtio/virtio_pci.c: fix error return code

2012-09-18 Thread Rusty Russell
Peter Senna Tschudin peter.se...@gmail.com writes: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. Thanks! Applied, Rusty. ___ Virtualization

Re: [PATCH v10 0/5] make balloon pages movable by compaction

2012-09-18 Thread Rusty Russell
Andrew Morton a...@linux-foundation.org writes: On Mon, 17 Sep 2012 13:38:15 -0300 Rafael Aquini aqu...@redhat.com wrote: Results for STRESS-HIGHALLOC benchmark, from Mel Gorman's mmtests suite, running on a 4gB RAM KVM guest which was ballooning 1gB RAM in 256mB chunks, at every minute

Re: miscalculated vring size in virtio-0.9.5.pdf?

2012-09-18 Thread Rusty Russell
Laszlo Ersek ler...@redhat.com writes: Hi, the vring_size() formula in section 2.3 seems to miss (a) vring_avail.used_event in the first ALIGN(), and (b) vring_used.flags, vring_used.idx, vring_used.avail_event in the second ALIGN(). vring_size() in Appendix A fixes (b) (no rounding up

Re: [PATCH repost] virtio: don't crash when device is buggy

2012-09-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Sep 17, 2012 at 01:57:17PM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Because of a sanity check in virtio_dev_remove, a buggy device can crash kernel. And in case of rproc it's userspace so it's not a good

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

2012-09-18 Thread Rusty Russell
Tom Herbert therb...@google.com writes: On Tue, Sep 11, 2012 at 10:49 PM, Rusty Russell ru...@rustcorp.com.auwrote: Perhaps Tom can explain how we avoid out-of-order receive for the accelerated RFS case? It's not clear to me, but we need to be able to do that for virtio-net if it implements

Re: [PATCH repost] virtio: don't crash when device is buggy

2012-09-17 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Because of a sanity check in virtio_dev_remove, a buggy device can crash kernel. And in case of rproc it's userspace so it's not a good idea. We are unloading a driver so how bad can it be? Be less aggressive in handling this error: if it's a driver

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

2012-09-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio: don't crash when device is buggy Because of a sanity check in virtio_dev_remove, a buggy device can crash kernel. And in case of rproc it's userspace so it's not a good idea. We are unloading a driver so how bad can it be? Be less

Re: [PATCH] Add a page cache-backed balloon device driver.

2012-09-12 Thread Rusty Russell
Mike Waychison mi...@google.com writes: On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Jun 26, 2012 at 01:32:58PM

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

2012-09-12 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: A final addition: what you suggest above would be TX follows RX, right? BTW, yes. But it's a weird way to express what the nic is doing. It is in anticipation of something like that, that I made

Re: [RFCv3] virtio_console: Add support for virtio remoteproc serial

2012-09-12 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: I actually like this new approach better. It solves the issues Michael has pointed out, and we don't have to think through side effects of weired combination of feature bits. Agreed. Just one thing, should it depend on CONFIG_REMOTEPROC? And have

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

2012-09-12 Thread Rusty Russell
Thomas Lendacky t...@linux.vnet.ibm.com writes: I ran some TCP_RR and TCP_STREAM sessions, both host-to-guest and guest-to-host, with a form of the histogram patch applied against a RHEL6.3 kernel. The histogram values were reset after each test. Hey, thanks! This is exactly what I wanted to

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

2012-09-11 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: In other words RPS is a hack to speed up networking on cheapo hardware, this is one of the reasons it is off by default. Good hardware has multiple receive queues. We can implement a good one so we do not need RPS. Also not all guest OS-es support

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

2012-09-10 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: From: Sjur Brændeland sjur.brandel...@stericsson.com Add feature VIRTIO_CONSOLE_F_DMA_MEM. If the architecture has DMA support and this feature bit is set, the virtio data buffers will be allocated from DMA memory. If the device requests the feature

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

2012-09-09 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Sat) 01 Sep 2012 [23:49:37], Alexey Khoroshilov wrote: 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).

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

2012-09-09 Thread Rusty Russell
OK, I read the spec (pasted below for easy of reading), but I'm still confused over how this will work. I thought normal net drivers have the hardware provide an rxhash for each packet, and we map that to CPU to queue the packet on[1]. We hope that the receiving process migrates to that CPU, so

<    1   2   3   4   5   6   7   8   9   10   >