[PATCH 2/5] hw_random: use reference counts on each struct hwrng.

2014-09-17 Thread Rusty Russell
under the rng_mutex), but a standard pattern. This also solves the problem that the hwrng_fillfn thread was accessing current_rng without a lock, which could change (eg. to NULL) underneath it. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/hw_random/core.c | 135

[PATCH 1/5] hw_random: place mutex around read functions and buffers.

2014-09-17 Thread Rusty Russell
(it leaves the current lock untouched), just adds a lock to protect the read function and the static buffers, in preparation for transition. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/hw_random/core.c | 20 +--- 1 file changed, 17 insertions(+), 3

[PATCH 4/5] hw_random: don't double-check old_rng.

2014-09-17 Thread Rusty Russell
Interesting anti-pattern. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/hw_random/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index b4a21e9521cf..6a34feca6b43 100644

Re: [PATCH 2/2] virtio-rng: fix stuck in catting hwrng attributes

2014-09-16 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: On Sun, Sep 14, 2014 at 01:12:58AM +0800, Amos Kong wrote: On Thu, Sep 11, 2014 at 09:08:03PM +0930, Rusty Russell wrote: Amos Kong ak...@redhat.com writes: When I check hwrng attributes in sysfs, cat process always gets stuck if guest has only 1 vcpu

Re: Rusty away 18th September -- 11th October

2014-09-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Sep 12, 2014 at 10:58:03AM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, Sep 11, 2014 at 10:26:52AM +0930, Rusty Russell wrote: Hi all, Probably won't read mail. Linus, I'll have pull requests

Re: [PATCH v3 2/2] virtio-rng: skip reading when we start to remove the device

2014-09-12 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Wed) 10 Sep 2014 [14:11:37], Amos Kong wrote: Before we really unregister the hwrng device, reading will get stuck if the virtio device is reset. We should return error for reading when we start to remove the device. Signed-off-by: Amos Kong

Re: Rusty away 18th September -- 11th October

2014-09-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Sep 11, 2014 at 10:26:52AM +0930, Rusty Russell wrote: Hi all, Probably won't read mail. Linus, I'll have pull requests early next week; if there's anything needed I'm sure Michael Tsirkin can handle it. Sure. Rusty, there's

Re: [PATCH 2/2] virtio-rng: fix stuck in catting hwrng attributes

2014-09-11 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: When I check hwrng attributes in sysfs, cat process always gets stuck if guest has only 1 vcpu and uses a slow rng backend. Currently we check if there is any tasks waiting to be run on current cpu in rng_dev_read() by need_resched(). But need_resched()

Re: [PATCH v3 1/2] virtio-rng: fix stuck of hot-unplugging busy device

2014-09-11 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Wed) 10 Sep 2014 [14:11:36], Amos Kong wrote: When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng driver hangs at wait_for_completion_killable(). This patch exits the waiting by

Rusty away 18th September -- 11th October

2014-09-10 Thread Rusty Russell
Hi all, Probably won't read mail. Linus, I'll have pull requests early next week; if there's anything needed I'm sure Michael Tsirkin can handle it. Cheers, Rusty. PS. England and Italy for a holiday; my daughter chose them (somehow I forgot to inform her of the existence of Euro

Re: [PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro

2014-09-08 Thread Rusty Russell
Jingoo Han jg1@samsung.com writes: Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. Signed-off-by: Jingoo Han jg1@samsung.com This patch is obviously wrong. It won't compile without CONFIG_PM_SLEEP. Cheers, Rusty. --- drivers/virtio/virtio_pci.c | 9 +++-- 1

Re: [PATCH v4 0/4] virtio: Clean up scatterlists and use the DMA API

2014-09-04 Thread Rusty Russell
Andy Lutomirski l...@amacapital.net writes: On Sep 2, 2014 11:53 PM, Rusty Russell ru...@rustcorp.com.au wrote: Andy Lutomirski l...@amacapital.net writes: There really are virtio devices that are pieces of silicon and not figments of a hypervisor's imagination [1]. Hi Andy

Re: [PATCH v4 0/4] virtio: Clean up scatterlists and use the DMA API

2014-09-04 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Sep 03, 2014 at 04:12:01PM +0930, Rusty Russell wrote: Andy Lutomirski l...@amacapital.net writes: There really are virtio devices that are pieces of silicon and not figments of a hypervisor's imagination [1]. Hi Andy

Re: [PATCH 3/3] virtio_ring: unify direct/indirect code paths.

2014-09-04 Thread Rusty Russell
Andy Lutomirski l...@amacapital.net writes: On Tue, Sep 2, 2014 at 9:29 PM, Rusty Russell ru...@rustcorp.com.au wrote: virtqueue_add() populates the virtqueue descriptor table from the sgs given. If it uses an indirect descriptor table, then it puts a single descriptor in the descriptor table

Re: [PATCH v4 0/4] virtio: Clean up scatterlists and use the DMA API

2014-09-03 Thread Rusty Russell
Andy Lutomirski l...@amacapital.net writes: There really are virtio devices that are pieces of silicon and not figments of a hypervisor's imagination [1]. Hi Andy, As you're discovering, there's a reason no one has done the DMA API before. So the problem is that ppc64's IOMMU is a

[PATCH 3/3] virtio_ring: unify direct/indirect code paths.

2014-09-02 Thread Rusty Russell
+/-0.92)Mb/sec (331190672-334572768(3.33325e+08+/-9.6e+05)bps) errors: 0 pktgen after: 710542-719195(714898+/-2.4e+03)pps 329-333(331.15+/-1.1)Mb/sec (329691488-333706480(3.31713e+08+/-1.1e+06)bps) errors: 0 Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_ring.c | 125

[PATCH 2/3] virtio_ring: assume sgs are always well-formed.

2014-09-02 Thread Rusty Russell
(793165+/-2.4e+03)pps 365-369(367.5+/-1.2)Mb/sec (365530384-369498976(3.68028e+08+/-1.1e+06)bps) errors: 0 Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_ring.c | 68 +--- 1 file changed, 19 insertions(+), 49 deletions(-) diff

[PATCH 0/3] virtio: simplify virtio_ring.

2014-09-02 Thread Rusty Russell
I resurrected these patches after prompting from Andy Lutomirski's recent patches. I put them on the back-burner because vring_bench had a 15% slowdown on my laptop: pktgen testing revealed a speedup, if anything, so I've cleaned them up. Rusty Russell (3): virtio_net: pass well-formed sgs

[PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()

2014-09-02 Thread Rusty Russell
Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/net/virtio_net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 59caa06f34a6..31cac511b3c3 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net

Re: [PATCH 1/3] virtio_ring: Remove sg_next indirection

2014-08-31 Thread Rusty Russell
. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8a852b5f215f..63299b04cdf2 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -590,6 +590,8 @@ static int add_recvbuf_big(struct receive_queue *rq, gfp_t

Re: virtio DMA API?

2014-08-27 Thread Rusty Russell
Andy Lutomirski l...@amacapital.net writes: Currently, a lot of the virtio code assumes that bus (i.e. hypervisor) addresses are the same as physical address. This is false on Xen, so virtio is completely broken. I wouldn't be surprised if it also becomes a problem the first time that

[PULL] virtio-next

2014-08-10 Thread Rusty Russell
The following changes since commit 15ba2236f3556fc01b9ca91394465152b5ea74b6: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2014-07-21 22:46:01 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git

Re: [PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready

2014-07-22 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Mon) 21 Jul 2014 [17:15:51], Amit Shah wrote: Instead of calling hwrng_register() in the probe routing, call it in the scan routine. This ensures that when hwrng_register() is successful, and it requests a few random bytes to seed the kernel's pool

Re: [PATCH net-next] virtio-net: rx busy polling support

2014-07-16 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: Add basic support for rx busy polling. 1 byte netperf tcp_rr on mlx4 shows 116% improvement: the transaction rate was increased from 9151.94 to 19787.37. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Cc: Vlad Yasevich

Re: [PATCH RFC 1/2] virtio: support for urgent descriptors

2014-07-08 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Below should be useful for some experiments Jason is doing. I thought I'd send it out for early review/feedback. Compiled-only at this point. It's not a terrible idea, but it will come down to how effective it is in practice. I'm tempted to make it

Re: [PATCH v3 0/2] block: virtio-blk: support multi vq per virtio-blk

2014-07-08 Thread Rusty Russell
Christoph Hellwig h...@infradead.org writes: On Mon, Jun 30, 2014 at 09:01:07PM -0600, Jens Axboe wrote: I appreciate very much that one of you may queue these two patches into your tree so that userspace work can be kicked off, since Michael has acked both patches and all comments have been

Re: [PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive

2014-07-08 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Sun) 29 Jun 2014 [10:41:33], Fabian Frederick wrote: Fix checkpatch warning: WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required Cc: Amit Shah amit.s...@redhat.com Cc: Arnd Bergmann a...@arndb.de Cc:

Re: [PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk

2014-07-08 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: Rusty, do you want to ack this (and I'll slurp it up for 3.17) or take this yourself? Or something else? I'm happy with the idea, and importantly, the new feature bit. So once the implementation is tweaked, please add: Acked-by: Rusty Russell ru

Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device

2014-06-16 Thread Rusty Russell
Ming Lei ming@canonical.com writes: + if (virtio_has_feature(vdev, VIRTIO_BLK_F_MQ)) + err = virtio_cread_feature(vdev, VIRTIO_BLK_F_MQ, +struct virtio_blk_config, num_queues, +num_vqs); + else +

Re: [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ

2014-06-16 Thread Rusty Russell
Ming Lei ming@canonical.com writes: Current virtio-blk spec only supports one virtual queue for transfering data between VM and host, and inside VM all kinds of operations on the virtual queue needs to hold one lock, so cause below problems: - no scalability - bad throughput

Re: Why is virtio_console not a tty?

2014-06-12 Thread Rusty Russell
H. Peter Anvin h...@zytor.com writes: I have gotten scattered reports of strange problems caused by the fact that virtio_console doesn't behave like a normal tty (support termios and so on.) This seems to be an odd restriction -- is there any fundamental reason for this design choice? Not

Re: Using virtio for inter-VM communication

2014-06-12 Thread Rusty Russell
Jan Kiszka jan.kis...@siemens.com writes: On 2014-06-12 04:27, Rusty Russell wrote: Henning Schild henning.sch...@siemens.com writes: It was also never implemented, and remains a thought experiment. However, implementing it in lguest should be fairly easy. The reason why a trusted helper

Re: Using virtio for inter-VM communication

2014-06-11 Thread Rusty Russell
Henning Schild henning.sch...@siemens.com writes: Hi, i am working on the jailhouse[1] project and am currently looking at inter-VM communication. We want to connect guests directly with virtual consoles based on shared memory. The code complexity in the hypervisor should be minimal, it

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-06-01 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: On 2014-05-30 00:10, Rusty Russell wrote: Jens Axboe ax...@kernel.dk writes: If Rusty agrees, I'd like to add it for 3.16 with a stable marker. Really stable? It improves performance, which is nice. But every patch which goes into the kernel fixes a bug

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-05-30 Thread Rusty Russell
Jens Axboe ax...@kernel.dk writes: If Rusty agrees, I'd like to add it for 3.16 with a stable marker. Really stable? It improves performance, which is nice. But every patch which goes into the kernel fixes a bug, improves clarity, improves performance or adds a feature. I've now seen all four

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-05-30 Thread Rusty Russell
numjobs=4 ioengine=libaio iodepth=64 filename=/dev/vdc group_reporting=1 [f1] rw=randread Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Cc: virtualization@lists.linux-foundation.org Signed-off-by: Ming Lei ming

Re: [PATCH] virtio-rng: support multiple virtio-rng devices

2014-04-28 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices.

Re: [PATCH 1/1] virtio_ccw: introduce device_lost in virtio_ccw_device

2014-04-27 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: When a device is lost, the common I/O layer calls the notification handler with CIO_GONE: In that event, flag device_lost as true. In case the device had been flagged as lost when the remove/offline callbacks are called, call the new

Re: virtio: virtio_break_device() to mark all virtqueues broken.

2014-04-22 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hello Rusty, the subject patch was part of your original patch series on January 15th. When is that planned to go upstream? Heinz I wanted to make sure you were comfortable with that patch first. And if I introduce it now, it has no users.

Re: [PATCH 1/3] tools: Unify export.h

2014-04-22 Thread Rusty Russell
now. Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty. Cc: Sasha Levin sasha.le...@oracle.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Paul Mackerras pau...@samba.org Cc: Ingo Molnar mi...@redhat.com Cc: Arnaldo Carvalho de Melo a...@ghostprotocols.net Cc: Rusty Russell ru

Re: [PATCH] virtio-blk: make the queue depth the max supportable by the hypervisor

2014-04-03 Thread Rusty Russell
Stefan Hajnoczi stefa...@gmail.com writes: On Tue, Apr 1, 2014 at 4:27 AM, Theodore Ts'o ty...@mit.edu wrote: On Mon, Mar 31, 2014 at 02:22:50PM +1030, Rusty Russell wrote: It's head of my virtio-next tree. Hey Rusty, While we have your attention --- what's your opinion about adding TRIM

[PULL] virtio-next

2014-04-01 Thread Rusty Russell
copies of headers tools/virtio: fix missing kmemleak_ignore symbol tools/virtio: add a missing ) Randy Dunlap (1): MAINTAINERS: virtio-dev is subscribers only Rusty Russell (8): virtio_balloon: don't softlockup on huge balloon changes. virtio_net: don't crash if virtqueue

Re: [PATCH] virtio-blk: make the queue depth the max supportable by the hypervisor

2014-03-30 Thread Rusty Russell
Venkatesh Srinivas venkate...@google.com writes: On Wed, Mar 19, 2014 at 10:48 AM, Venkatesh Srinivas venkate...@google.com wrote: And I rewrote it substantially, mainly to take VIRTIO_RING_F_INDIRECT_DESC into account. As QEMU sets the vq size for PCI to 128, Venkatash's patch wouldn't

Re: [PATCH] virtio-blk: make the queue depth the max supportable by the hypervisor

2014-03-19 Thread Rusty Russell
ty...@mit.edu writes: On Mon, Mar 17, 2014 at 11:12:15AM +1030, Rusty Russell wrote: Note that with indirect descriptors (which is supported by Almost Everyone), we can actually use the full index, so this value is a bit pessimistic. But it's OK as a starting point. So is this something

Re: [PATCH] virtio-blk: make the queue depth configurable

2014-03-19 Thread Rusty Russell
Joe Perches j...@perches.com writes: On Sun, 2014-03-16 at 22:00 -0700, Joe Perches wrote: On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: Erk, our tests are insufficient. Testbuilding an allmodconfig with this now: Good idea. diff --git a/include/linux/moduleparam.h b

Re: [PATCH] virtio-blk: make the queue depth configurable

2014-03-19 Thread Rusty Russell
Bjorn Helgaas bhelg...@google.com writes: On Wed, Mar 19, 2014 at 12:37 AM, Rusty Russell ru...@rustcorp.com.au wrote: Side effect of stricter permissions means removing the unnecessary S_IFREG from drivers/pci/slot.c. Suggested-by: Joe Perches j...@perches.com Cc: Bjorn Helgaas bhelg

Re: [PATCH] virtio-blk: make the queue depth configurable

2014-03-19 Thread Rusty Russell
...@google.com for drivers/pci/slot.c Acked-by: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Miklos Szeredi mik...@szeredi.hu Cc: Mark Fasheh mfas...@suse.com Cc: Joel Becker jl...@evilplan.org Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c

Re: [PATCH] virtio-blk: make the queue depth the max supportable by the hypervisor

2014-03-16 Thread Rusty Russell
Theodore Ts'o ty...@mit.edu writes: The current virtio block sets a queue depth of 64, which is insufficient for very fast devices. It has been demonstrated that with a high IOPS device, using a queue depth of 256 can double the IOPS which can be sustained. As suggested by Venkatash

Re: [PATCH] virtio-blk: make the queue depth configurable

2014-03-16 Thread Rusty Russell
Theodore Ts'o ty...@mit.edu writes: On Fri, Mar 14, 2014 at 10:38:40AM -0700, Joe Perches wrote: +static int queue_depth = 64; +module_param(queue_depth, int, 444); 444? Really Ted? Oops, *blush*. Thanks for catching that. Erk, our tests are insufficient. Testbuilding an

Re: [PATCH] tools: Unify export.h

2014-02-25 Thread Rusty Russell
Borislav Petkov b...@suse.de writes: On Tue, Feb 25, 2014 at 12:09:23PM +1030, Rusty Russell wrote: Should we get more ambitious and start a fake-kernel/ directory where we can put userspace equivs/stubs of kernel functionality? Dunno - people like to do that now, it seems. In any case

Re: [PATCH] tools: Unify export.h

2014-02-24 Thread Rusty Russell
Borislav Petkov b...@alien8.de writes: From: Borislav Petkov b...@suse.de So tools/ has been growing three, at a different stage of their development export.h headers and so we should unite into one. Add tools/include/ to the include path of virtio and liblockdep to pick the shared header

Re: [PATCH v2] virtio: Use pci_enable_msix_exact() instead of pci_enable_msix()

2014-02-23 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Feb 21, 2014 at 06:01:28PM +0100, Alexander Gordeev wrote: As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new

Re: [PATCH net V2] virtio-net: alloc big buffers also when guest can receive UFO

2014-02-23 Thread Rusty Russell
. Tsirkin m...@redhat.com Indeed. Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2014-02-20 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 29/01/14 07:31, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 23/01/14 05:51, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov

Re: Users of ballooning, please come forth!

2014-02-20 Thread Rusty Russell
Adam Litke ali...@redhat.com writes: On 20/02/14 14:53 +1030, Rusty Russell wrote: I think we're headed to the same destination here; the variant which I came up with (and suggested to Daniel and Luiz, CC'd) is similar: the guest self-balloons, giving up pages when it can, but the host sets

Re: Users of ballooning, please come forth!

2014-02-19 Thread Rusty Russell
Adam Litke ali...@redhat.com writes: On Tue Feb 11 06:01:10 UTC 2014, Rusty Russell wrote: Hi all! We're debating the design of the balloon for the OASIS spec. Noone likes the current one, but there are fundamental usage pattern questions which we're fumbling with. So if you know

Re: [PATCH] virtio: Use pci_enable_msix_range() instead of pci_enable_msix()

2014-02-19 Thread Rusty Russell
-off-by: Alexander Gordeev agord...@redhat.com Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Cc: virtio-...@lists.oasis-open.org Cc: virtualization@lists.linux-foundation.org Cc: linux-...@vger.kernel.org --- drivers/virtio/virtio_pci.c |8 +++- 1

Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test

2014-02-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote: Recent changes to drivers/virtio broke compilation for the tests in tools/virtio. The following patches are build fixes for those changes, as well as a fix for a typo that would have

Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test

2014-02-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote: Recent changes to drivers/virtio broke compilation for the tests in tools/virtio. The following patches are build fixes for those changes, as well as a fix for a typo that would have

Users of ballooning, please come forth!

2014-02-11 Thread Rusty Russell
Hi all! We're debating the design of the balloon for the OASIS spec. Noone likes the current one, but there are fundamental usage pattern questions which we're fumbling with. So if you know anyone who is using it in production? If, so, how? In particular, would you be happy with guests

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2014-01-28 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 23/01/14 05:51, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. Hi Heinz, I didn't get a response on my 'break all the virtqueues' patch

Re: [PATCH] virtio_balloon: don't call virtio_has_feature() twice on init_vqs()

2014-01-27 Thread Rusty Russell
Leandro Dorileo l...@dorileo.org writes: Cchange init_vqs() to avoid calling twice the virtio_has_feature() - attempting to find out if VIRTIO_BALLOON_F_STATS_VQ feature was negotiated - consequently we prevent unnecessarily running the drivers' feature_table more than needed. Signed-off-by:

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2014-01-22 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. Hi Heinz, I didn't get a response on my 'break all the virtqueues' patch series. Could your System Z code work with this? Rusty. When an active virtio block

Re: [PATCH net-next RFC] virtio-net: drop rq-max and rq-num

2014-01-15 Thread Rusty Russell
check vq-num_free instead. - rq-num was required to be increased or decreased explicitly after each get/put which results a bad API. So this patch removes them both to make the code simpler. Nice. These fields date from when the vq struct was opaque. Applied, Rusty. Cc: Rusty Russell ru

Re: [PATCH net-next RFC] virtio-net: drop rq-max and rq-num

2014-01-15 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Jason Wang jasow...@redhat.com writes: It looks like there's no need for those two fields: - Unless there's a failure for the first refill try, rq-max should be always equal to the vring size. - rq-num is only used to determine the condition

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2014-01-14 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 19/12/13 01:19, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 17/12/13 04:42, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov

Re: [PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2014-01-14 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: From: Asias He asias.he...@gmail.com vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Fixes:

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2013-12-20 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: On 17/12/13 04:42, Rusty Russell wrote: Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. When an active virtio block device is hot-unplugged from a KVM guest, affected

Re: [PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device

2013-12-16 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Hi, here is my v4 patch-set update to the v3 RFC submitted on Nov 27th. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost device. This

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-12-16 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: On 10/28/2013 04:01 PM, Asias He wrote: vqs are freed in virtscsi_freeze but the hotcpu_notifier is not unregistered. We will have a use-after-free usage when the notifier callback is called after virtscsi_freeze. Signed-off-by: Asias He

Re: [PATCH] drivers: virtio: Mark function virtballoon_migratepage() as static in virtio_balloon.c

2013-12-16 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Dec 16, 2013 at 06:23:38AM -0800, Josh Triplett wrote: On Mon, Dec 16, 2013 at 04:54:08PM +0530, Rashika Kheria wrote: Mark the function virtballoon_migratepage() as static in virtio_balloon.c because it is not used outside this file.

Re: [PATCH v2] virtio-net: free bufs correctly on invalid packet length

2013-12-06 Thread Rusty Russell
Michael Dalton mwdal...@google.com writes: When a packet with invalid length arrives, ensure that the packet is freed correctly if mergeable packet buffers and big packets (GUEST_TSO4) are both enabled. Signed-off-by: Michael Dalton mwdal...@google.com Acked-by: Rusty Russell ru

Re: [PATCH 2/2] virtio: delete napi structures from netdev before releasing memory

2013-12-06 Thread Rusty Russell
] __list_del_entry+0x29/0xd0 RSP 8800379e1dd0 ---[ end trace d5931cd3f87c9763 ]--- Fixes: 986a4f4d452d (virtio_net: multiqueue support) Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Andrey Vagin ava...@openvz.org --- drivers/net/virtio_net.c | 5

Re: [PATCH 1/2] virtio-net: determine type of bufs correctly

2013-12-06 Thread Rusty Russell
[a00345f3] free_unused_bufs+0xc3/0x190 [virtio_net] RSP 8800aed33dd8 ---[ end trace edb570ea923cce9c ]--- Fixes: 2613af0ed18a (virtio_net: migrate mergeable rx buffers to page frag allocators) Cc: Michael Dalton mwdal...@google.com Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S

Re: [PATCH v3 RFC 2/4] virtio_blk: avoid further request queueing on device loss

2013-12-03 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Code is added to the remove callback to verify if a device was lost. In case of a device loss further request queueing should be prevented by setting appropriate queue flags prior to invoking del_gendisk(). Blocking of request queueing leads to

Re: [PATCH] virtio: pci: remove unnecessary pci_set_drvdata()

2013-12-01 Thread Rusty Russell
Jingoo Han jg1@samsung.com writes: The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han jg1@samsung.com Applied. Thanks, Rusty. ---

Re: [PATCH RFC 1/3] virtio: add notify() callback to virtio_driver

2013-11-20 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Add an optional notify() callback to virtio_driver. A backend driver can provide this callback to perform actions for a lost device. notify() event values are inherited from virtio_ccw's notify() callback. We might want to support even more of

Re: [PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance

2013-11-19 Thread Rusty Russell
Eric Dumazet eric.duma...@gmail.com writes: On Wed, 2013-11-13 at 15:10 +0800, Jason Wang wrote: There's one concern with EWMA. How well does it handle multiple streams each with different packet size? E.g there may be two flows, one with 256 bytes each packet another is 64K. Looks like it

Re: [PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()

2013-11-04 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: If virtqueue_get_buf() returned with a NULL pointer avoid a possibly endless loop by checking for a broken virtqueue. Signed-off-by: Heinz Graalfs graa...@linux.vnet.ibm.com Thanks, applied. Cheers, Rusty.

Re: [PATCH net-next 2/2] virtio-net: coalesce rx frags when possible during rx

2013-10-31 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: Commit 2613af0ed18a11d5c566a81f9a6510b73180660a (virtio_net: migrate mergeable rx buffers to page frag allocators) try to increase the payload/truesize for MTU-sized traffic. But this will introduce the extra overhead for GSO packets received because of

Re: [PATCH V2 RFC 1/9] virtio_ring: change host notification API

2013-10-28 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Rusty, here is just patch 1 (using bool as return value in notify API). Thanks. Heinz Graalfs (9): virtio_ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool virtio_net: verify if

Re: [PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()

2013-10-28 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: If virtqueue_get_buf() returned with a NULL pointer avoid a possibly endless loop by checking for a broken virtqueue. Signed-off-by: Heinz Graalfs graa...@linux.vnet.ibm.com --- drivers/scsi/virtio_scsi.c | 3 ++- 1 file changed, 2

Re: [PATCH net-next] virtio_net: migrate mergeable rx buffers to page frag allocators

2013-10-28 Thread Rusty Russell
?) for that value. Because it's not the maximum packet we can receive for mergable buffers. Thanks, Rusty. Subject: virtio_net: remove anachronistic MAX_PACKET_LEN constant. From: Rusty Russell ru...@rustcorp.com.au The initial implementation of virtio_net only allowed ethernet-style MTU packets; with more

Re: [PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()

2013-10-27 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: If virtqueue_get_buf() returned with a NULL pointer avoid a possibly endless loop by checking for a broken virtqueue. Signed-off-by: Heinz Graalfs graa...@linux.vnet.ibm.com Yes, these look good. Please just repost the first one, and I'll

Re: [PATCH V2 RFC 1/9] virtio_ring: change host notification API

2013-10-27 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Currently a host kick error is silently ignored and not reflected in the virtqueue of a particular virtio device. Changing the notify API for guest-host notification seems to be one prerequisite in order to be able to handle such errors in the

Re: [PATCH RFC 1/7] virtio_ring: add new functions virtqueue{_set_broken()/_is_broken()}

2013-10-22 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: This patch adds 2 new functions: virtqueue_set_broken(): to be called when a virtqueue kick operation fails. virtqueue_is_broken(): can be called to query the virtqueue state after a host was kicked. Signed-off-by: Heinz Graalfs

Re: [PATCH RFC 4/7] virtio_blk: use dummy virtqueue_notify() to detect host kick error

2013-10-22 Thread Rusty Russell
Heinz Graalfs graa...@linux.vnet.ibm.com writes: Deleting the disk and partitions in virtblk_remove() via del_gendisk() causes never ending waits when trying to synch dirty inode pages. A dummy virtqueue_notify() in virtblk_remove() is used to detect a host notification error, latter occurs

Re: QueuePFN peculiarity in virtio-mmio

2013-10-22 Thread Rusty Russell
Laszlo Ersek ler...@redhat.com writes: Hi, Appendix X: virtio-mmio in the virtio spec says Hi Laszlo, You're in luck! We're currently revising the virtio spec under the OASIS banner. I'd really like you to post your suggestion to their mailing list

Re: [PATCH net V2 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready

2013-10-18 Thread Rusty Russell
David Miller da...@davemloft.net writes: From: Rusty Russell ru...@rustcorp.com.au Date: Fri, 18 Oct 2013 11:30:15 +1030 Asking people to express 'CC: stable' in words is error-prone; if Dave wants to filter it, he's quite capable. Filtering it one time is one thing. Potentially acting

Re: [PATCH net V2 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready

2013-10-17 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 17, 2013 at 09:57:41AM +1030, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: We're trying to re-configure the affinity unconditionally in cpu hotplug callback. This may lead the issue during resuming from s3/s4 since

Re: [PATCH net V2 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready

2013-10-16 Thread Rusty Russell
the affinity. Fix this issue by checking the config_enable and do nothing is we're not ready. The bug were introduced by commit 8de4b2f3ae90c8fc0f17eeaab87d5a951b66ee17 (virtio-net: reset virtqueue affinity when doing cpu hotplug). Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m

Re: Kmemleak: false-positive in vring_add_indirect ?

2013-10-07 Thread Rusty Russell
Christoph Paasch christoph.paa...@gmail.com writes: On Fri, Oct 4, 2013 at 1:59 AM, Rusty Russell ru...@rustcorp.com.au wrote: Thanks! Does this work? virtio_ring: plug kmemleak false positive. Yes, it does work. Tested-by: Christoph Paasch christoph.paa...@uclouvain.be This patch

Re: Kmemleak: false-positive in vring_add_indirect ?

2013-10-03 Thread Rusty Russell
...@uclouvain.be Typing-done-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 6b4a4db..6547d46 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -173,6

Re: [net-next PATCH V2] virtio-net: switch to use XPS to choose txq

2013-09-30 Thread Rusty Russell
. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Acked-by: Michael S. Tsirkin m...@redhat.com Acked-by: Rusty Russell ru...@rustcorp.com.au Dave, please apply. Cheers, Rusty

Re: [PATCH net-next] virtio-net: switch to use XPS to choose txq

2013-09-29 Thread Rusty Russell
this patch switches to use XPS and suggest a default mapping when the number of cpus is equal to the number of queues. With XPS support, there's no need for keeping per-cpu vq_index and .ndo_select_queue(), so they were removed also. Cc: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin

Re: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM

2013-09-08 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Fri) 06 Sep 2013 [10:28:36], Aaron Lu wrote: The virtio_pci_freeze/restore are defined under CONFIG_PM but is used by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but

Re: [PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP

2013-09-08 Thread Rusty Russell
Aaron Lu aaron...@intel.com writes: On 09/06/2013 04:22 PM, Amit Shah wrote: On (Fri) 06 Sep 2013 [16:20:05], Aaron Lu wrote: This patchset replace CONFIG_PM with CONFIG_PM_SLEEP for all virtio drivers and virtio pci driver. With patch 1/2, two compile warnings are eliminated for virtio pci

Re: [PATCH] virtio-net: Set RXCSUM feature if GUEST_CSUM is available

2013-09-01 Thread Rusty Russell
...@linux.vnet.ibm.com Can one of the virtio_net folks please review this? Hmm, so NETIF_F_RXCSUM only exists for ethtool's benefit. Weird. But this patch is correct: Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty. ___ Virtualization mailing

Re: [PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.

2013-08-05 Thread Rusty Russell
Sudeep Dutt sudeep.d...@intel.com writes: On Mon, 2013-07-29 at 10:05 +0300, Michael S. Tsirkin wrote: On Wed, Jul 24, 2013 at 08:31:34PM -0700, Sudeep Dutt wrote: From: Ashutosh Dixit ashutosh.di...@intel.com This patch introduces the host Virtio over PCIe interface for Intel MIC. It

Re: [PATCH v3 9/9] virtio: console: prevent use-after-free of port name in port unplug

2013-07-31 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Mon) 29 Jul 2013 [14:26:09], Rusty Russell wrote: Amit Shah amit.s...@redhat.com writes: Remove the debugfs path before freeing port-name, to prevent a possible use-after-free. Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Amit

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