Re: [PATCH] trans_virtio: use virtqueue_xxx wrappers

2010-04-20 Thread Rusty Russell
On Tue, 13 Apr 2010 10:41:50 pm Michael S. Tsirkin wrote: Switch trans_virtio to new virtqueue_xxx wrappers. Thanks, I've applied all these. Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

[PULL] lguest fixes: for lguest-under-kvm and older CPU configs

2010-04-14 Thread Rusty Russell
-for-linus.git master Rusty Russell (2): lguest: workaround cmpxchg8b_emu by ignoring cli in the guest. lguest: stop using KVM hypercall mechanism arch/x86/include/asm/lguest_hcall.h | 29 +--- arch/x86/lguest/boot.c | 61 +-- arch

[PULL] virtio console fixes

2010-04-07 Thread Rusty Russell
): virtio: disable multiport console support. Rusty Russell (1): virtio: console makes incorrect assumption about virtio API MAINTAINERS| 13 drivers/char/hvc_console.c |4 -- drivers/char/virtio_console.c | 65

Re: [PATCH 07/10] virtio: console: Use a control message to add ports

2010-04-05 Thread Rusty Russell
On Mon, 5 Apr 2010 11:24:11 pm Amit Shah wrote: @@ -1431,13 +1414,20 @@ static int __devinit virtcons_probe(struct virtio_device *vdev) err = -ENOMEM; goto free_vqs; } + } Minor nit: gratuitous whitespace addition. Cheers,

Re: [PATCH 0/7] virtio: console: Fixes, new flexible way of discovering ports

2010-03-29 Thread Rusty Russell
On Tue, 23 Mar 2010 07:27:53 pm Amit Shah wrote: Hello all, This new patchset switches over to using the control queue for port discovery so that we can stay in sync with the host for port enumeration and also don't use bitmaps to limit us to config space sizes. This changes the ABI, so

[PATCH 1/4] MAINTAINERS: Put the virtio-console entry in correct alphabetical order

2010-03-29 Thread Rusty Russell
From: Amit Shah amit.s...@redhat.com Move around the entry for virtio-console to keep the file sorted. Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- MAINTAINERS | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

[PATCH 2/4] virtio: console: Fix early_put_chars usage

2010-03-29 Thread Rusty Russell
Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/virtio_console.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 18b1b06..f33ceaa 100644

[PATCH 3/4] virtio: console makes incorrect assumption about virtio API

2010-03-29 Thread Rusty Russell
The get_buf() API sets the second arg to the number of bytes *written* by the other side; in this case it should be zero as these are output buffers. lguest gets this right (obviously kvm's console doesn't), resulting in continual buildup of console writes. Signed-off-by: Rusty Russell ru

Re: virtio: console: Barrier needed before dropping early_put_chars?

2010-02-23 Thread Rusty Russell
On Wed, 24 Feb 2010 03:40:22 am Amit Shah wrote: Hey Rusty, Christian, Christoph Hellwig asked why we don't need a barrier before this code in virtcons_probe(): + /* Start using the new console output. */ + early_put_chars = NULL; return 0; Since only s390 uses

[PULL] virtio lguest

2010-02-23 Thread Rusty Russell
to virtio_pci_remove Michael S. Tsirkin (1): virtio: use smp_XX barriers on SMP Rusty Russell (9): virtio: fix balloon without VIRTIO_BALLOON_F_STATS_VQ lguest: remove unneeded zlib.h include in example launcher virtio: remove bogus barriers from DEBUG version of virtio_ring.c virtio

Re: [PATCH 0/6] virtio: console: Fixes

2010-02-12 Thread Rusty Russell
On Fri, 12 Feb 2010 03:32:13 pm Amit Shah wrote: Hey Rusty, Here are a few fixes for virtio and virtio_console. The first patch ensures the data elements of vqs are properly initialised at allocation-time so that we don't trigger BUG_ONs. I found this when hot-unplugging ports and there

Re: [PATCH 1/6] virtio: Initialize vq-data entries to NULL

2010-02-12 Thread Rusty Russell
On Fri, 12 Feb 2010 03:32:14 pm Amit Shah wrote: vq operations depend on vq-data[i] being NULL to figure out if the vq entry is in use. We have to initialize them to NULL to ensure we don't work with junk data and trigger false BUG_ONs. Not really. We wouldn't detect some bogus get_buf()

Re: [PATCH] virtio-spec: document indirect descriptors

2010-02-10 Thread Rusty Russell
On Wed, 10 Feb 2010 11:30:39 pm Michael S. Tsirkin wrote: Add documentation for indirect descriptors Thanks, that's awesome! I added an entry to the Reserved Feature table in appendix B, and applied it. We're now at 0.8.5. Cheers, Rusty. ___

Re: [PATCH] vhost-net: switch to smp barriers

2010-02-08 Thread Rusty Russell
and not mandatory barriers for memory access ordering, as suggested by Documentation/memory-barriers.txt Signed-off-by: Michael S. Tsirkin m...@redhat.com Rusty, any feedback on this one? Thanks! Yep. barrier() is correct on UP to guard against preemption. Acked-by: Rusty Russell ru

[PATCH] virtio: fix balloon without VIRTIO_BALLOON_F_STATS_VQ

2010-02-08 Thread Rusty Russell
] ? schedule+0x327/0x9d0 [c88251f0] ? balloon+0x0/0x440 [virtio_balloon] [c014a2d4] ? kthread+0x74/0x80 [c014a260] ? kthread+0x0/0x80 [c0103b36] ? kernel_thread_helper+0x6/0x30 need_stats_update should be zero-initialized. Signed-off-by: Rusty Russell ru

Re: [PATCH 0/2] virtio net improvements

2010-02-02 Thread Rusty Russell
On Fri, 29 Jan 2010 11:46:43 pm Rusty Russell wrote: Hi Dave, Nice driver optimization from Shirley, but requires a new virtio hook. Do you want to take both? I have nothing else overlapping it. Dave, any news on this? Shirley, I note that your final commit message did not contain

Re: [PATCH 21/31] virtio: console: Prepare for writing to userspace buffers

2010-01-31 Thread Rusty Russell
On Sat, 30 Jan 2010 12:12:40 am Amit Shah wrote: When ports get advertised as char devices, the buffers will come from userspace. Equip the fill_readbuf function with the ability to write to userspace buffers. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c

[PATCH 0/2] virtio net improvements

2010-01-29 Thread Rusty Russell
Hi Dave, Nice driver optimization from Shirley, but requires a new virtio hook. Do you want to take both? I have nothing else overlapping it. Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

[PATCH 1/2] virtio: Add ability to detach unused buffers from vrings

2010-01-29 Thread Rusty Russell
...@us.ibm.com Signed-off-by: Amit Shah amit.s...@redhat.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_ring.c | 25 + include/linux/virtio.h |4 2 files changed, 29 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b

[PATCH 2/2] virtio_net: Defer skb allocation in receive path Date: Wed, 13 Jan 2010 12:53:38 -0800

2010-01-29 Thread Rusty Russell
...@us.ibm.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/net/virtio_net.c | 427 +++ 1 file changed, 248 insertions(+), 179 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c708ecc..72b3f21 100644 --- a/drivers

Re: [PATCHv2] virtio: use smp_XX barriers on SMP

2010-01-29 Thread Rusty Russell
On Fri, 29 Jan 2010 09:57:18 pm Michael S. Tsirkin wrote: On Fri, Jan 29, 2010 at 07:44:59AM +1030, Rusty Russell wrote: These barriers are actually trying to make sure in_use is set in a timely manner (this is debug code). They're bogus AFAICT: So .. let's just drop these barriers

Re: virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes

2010-01-29 Thread Rusty Russell
On Sat, 30 Jan 2010 12:12:37 am Amit Shah wrote: These updated patches in the series return -EFAULT on copy_xx_user errors and also move the copy_from_user into fops_write() instead of it being in send_buf. This enables send_buf to just read from kernel buffers, making it simpler. This also

Re: [PATCHv2] virtio: use smp_XX barriers on SMP

2010-01-28 Thread Rusty Russell
On Fri, 29 Jan 2010 12:07:08 am Michael S. Tsirkin wrote: On Thu, Jan 28, 2010 at 10:01:09AM +1030, Rusty Russell wrote: On Thu, 28 Jan 2010 09:12:23 am Michael S. Tsirkin wrote: Where possible, we should use SMP barriers which are more lightweight than mandatory barriers, because

Re: [PATCHv2] virtio: use smp_XX barriers on SMP

2010-01-27 Thread Rusty Russell
On Thu, 28 Jan 2010 09:12:23 am Michael S. Tsirkin wrote: virtio is communicating with a virtual device that actually runs on another host processor. Thus SMP barriers can be used to control memory access ordering. Where possible, we should use SMP barriers which are more lightweight than

Re: Remove host throttling

2010-01-25 Thread Rusty Russell
On Wed, 20 Jan 2010 07:21:02 pm Amit Shah wrote: Hey Rusty, These are the patches to be replaced -- patches 19, 30, 31 from the previous series. Patch 26 from the earlier series is to be dropped. Thanks, applied! Rusty. ___ Virtualization mailing

Re: [PATCH 32/32] virtio: console: show error message if hvc_alloc fails for console ports

2010-01-20 Thread Rusty Russell
On Tue, 19 Jan 2010 03:27:30 pm Amit Shah wrote: On (Tue) Jan 19 2010 [11:52:50], Rusty Russell wrote: On Tue, 19 Jan 2010 12:15:26 am Amit Shah wrote: Signed-off-by: Amit Shah amit.s...@redhat.com These all look great! I'm not entirely convinced about the host throttling, but it's

Re: [PATCH 32/32] virtio: console: show error message if hvc_alloc fails for console ports

2010-01-20 Thread Rusty Russell
On Wed, 20 Jan 2010 03:36:27 am Amit Shah wrote: On (Tue) Jan 19 2010 [11:52:50], Rusty Russell wrote: On Tue, 19 Jan 2010 12:15:26 am Amit Shah wrote: Signed-off-by: Amit Shah amit.s...@redhat.com These all look great! I'm not entirely convinced about the host throttling, but it's

Re: [PATCH 32/32] virtio: console: show error message if hvc_alloc fails for console ports

2010-01-18 Thread Rusty Russell
On Tue, 19 Jan 2010 12:15:26 am Amit Shah wrote: Signed-off-by: Amit Shah amit.s...@redhat.com These all look great! I'm not entirely convinced about the host throttling, but it's harmless to have. Applied, thanks! Rusty. ___ Virtualization mailing

Re: [PATCH 18/31] virtio: console: Buffer data that comes from the host

2010-01-16 Thread Rusty Russell
On Thu, 14 Jan 2010 01:47:53 pm Amit Shah wrote: On (Thu) Jan 14 2010 [09:45:12], Rusty Russell wrote: On Wed, 13 Jan 2010 09:54:52 pm Amit Shah wrote: On (Wed) Jan 13 2010 [21:43:32], Rusty Russell wrote: On Wed, 13 Jan 2010 04:41:48 pm Amit Shah wrote: On (Mon) Jan 04 2010 [15:17

Re: [PATCH 18/31] virtio: console: Buffer data that comes from the host

2010-01-13 Thread Rusty Russell
On Wed, 13 Jan 2010 04:41:48 pm Amit Shah wrote: On (Mon) Jan 04 2010 [15:17:17], Amit Shah wrote: On (Mon) Jan 04 2010 [19:45:30], Rusty Russell wrote: On Wed, 23 Dec 2009 01:04:28 am Amit Shah wrote: The console could be flooded with data from the host; handle this situation

Re: [PATCH 18/31] virtio: console: Buffer data that comes from the host

2010-01-13 Thread Rusty Russell
On Wed, 13 Jan 2010 09:54:52 pm Amit Shah wrote: On (Wed) Jan 13 2010 [21:43:32], Rusty Russell wrote: On Wed, 13 Jan 2010 04:41:48 pm Amit Shah wrote: On (Mon) Jan 04 2010 [15:17:17], Amit Shah wrote: On (Mon) Jan 04 2010 [19:45:30], Rusty Russell wrote: On Wed, 23 Dec 2009 01:04

Re: Virtio ballooning support for Lguest

2010-01-12 Thread Rusty Russell
On Sat, 9 Jan 2010 05:05:06 am Gaurav Kukreja wrote: Hi, I am doing working on enabling Transcendent Memory(OLS '09) support on lguest. For the same, I need ballooning support for lguest. Is there an implmentation of Virtio Balloon driver, that I can use for my purpose? Here's a patch I

Re: [PATCH 03/31] hvc_console: make the ops pointer const.

2010-01-12 Thread Rusty Russell
On Tue, 12 Jan 2010 12:51:46 pm Benjamin Herrenschmidt wrote: On Tue, 2009-12-22 at 20:04 +0530, Amit Shah wrote: From: Rusty Russell ru...@rustcorp.com.au This is nicer for modern R/O protection. And noone needs it non-const, so constify the callers as well. Rusty, do you want me

Re: [Qemu-devel] Re: [PATCH v2] virtio-blk physical block size

2010-01-05 Thread Rusty Russell
On Mon, 4 Jan 2010 07:00:35 pm Christoph Hellwig wrote: On Mon, Jan 04, 2010 at 01:38:51PM +1030, Rusty Russell wrote: I thought this was what I was doing, but I have shown over and over that I have no idea about block devices. Our current driver treats BLK_SIZE as the logical

Re: [PATCH 18/31] virtio: console: Buffer data that comes from the host

2010-01-04 Thread Rusty Russell
On Wed, 23 Dec 2009 01:04:28 am Amit Shah wrote: The console could be flooded with data from the host; handle this situation by buffering the data. Is this still true? If we only add_buf when we're ready, surely the host can't flood us with one virtqueue per port? Thanks, Rusty.

Re: [PATCH] vhost: access check thinko fixes

2010-01-03 Thread Rusty Russell
On Thu, 24 Dec 2009 04:30:58 pm Michael S. Tsirkin wrote: This fixes two issues with recent access checking patch: 1. if (d-vqs[i].private_data) - if (d-vqs[i].private_data) 2. we can't forbid log base changes while ring is running, because host needs to resize log in rare cases

Re: [PATCH] vhost-net: defer f-private_data until setup succeeds

2010-01-03 Thread Rusty Russell
On Thu, 24 Dec 2009 04:36:50 pm Michael S. Tsirkin wrote: On Tue, Dec 22, 2009 at 11:02:28AM -0800, Chris Wright wrote: Trivial change, just for readability. The filp is not installed on failure, so the current code is not incorrect (also vhost_dev_init currently has no failure case).

Re: [PATCH v2] virtio-blk physical block size

2010-01-03 Thread Rusty Russell
On Tue, 29 Dec 2009 03:09:23 am Avi Kivity wrote: This patch adds a physical block size attribute to virtio disks, corresponding to /sys/devices/.../physical_block_size. It is defined as the request alignment which will not trigger RMW cycles. This can be important for modern disks which use

Re: [PATCH] vhost: fix high 32 bit in FEATURES ioctls

2009-12-22 Thread Rusty Russell
On Tue, 22 Dec 2009 10:09:33 pm Michael S. Tsirkin wrote: From: David Stevens dlstev...@us.ibm.com Subject: vhost: fix high 32 bit in FEATURES ioctls Thanks, applied. Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH 00/31] virtio: console: Fixes, multiple devices and generic ports

2009-12-22 Thread Rusty Russell
On Wed, 23 Dec 2009 01:04:10 am Amit Shah wrote: Hey Rusty, This series adds support for generic ports with each port getting two vqs: one for input and one for output. The host notifies us via the config space of the max. number of ports that can be added for a particular device. Hi Amit,

Re: [PATCH 0/3] vhost: fix use_mm usage

2009-12-21 Thread Rusty Russell
On Mon, 21 Dec 2009 03:46:08 am Michael S. Tsirkin wrote: This patchset fixes an issue, pointed out by Al Viro, in how vhost net calls use_mm, Works fine for me, and it's pretty straightforward. If no one sees any issues with it, this will be a good candidate for 2.6.33 (assuming vhost net

[PULL rexmit] virtio lguest

2009-12-17 Thread Rusty Russell
/unuse_mm to modules vhost_net: a kernel-level virtio server vhost: add missing architectures Rusty Russell (1): lguest: remove unneeded zlib.h include in example launcher Documentation/lguest/lguest.c |1 - MAINTAINERS |9 + arch/ia64/kvm/Kconfig

Re: [PATCH 12/28] virtio: console: Buffer data that comes in from the host

2009-12-15 Thread Rusty Russell
On Tue, 15 Dec 2009 09:15:19 pm Amit Shah wrote: On (Tue) Dec 08 2009 [11:46:10], Rusty Russell wrote: On Fri, 4 Dec 2009 09:32:46 pm Amit Shah wrote: On (Thu) Dec 03 2009 [09:13:25], Amit Shah wrote: On (Thu) Dec 03 2009 [09:24:23], Rusty Russell wrote: On Wed, 2 Dec 2009 07:54:06

Re: [PATCH 12/28] virtio: console: Buffer data that comes in from the host

2009-12-07 Thread Rusty Russell
On Fri, 4 Dec 2009 09:32:46 pm Amit Shah wrote: On (Thu) Dec 03 2009 [09:13:25], Amit Shah wrote: On (Thu) Dec 03 2009 [09:24:23], Rusty Russell wrote: On Wed, 2 Dec 2009 07:54:06 pm Amit Shah wrote: On (Wed) Dec 02 2009 [14:14:20], Rusty Russell wrote: On Sat, 28 Nov 2009 05:20:35

Re: [PATCH] virtio spec: add virtio-blk max sectors feature

2009-12-07 Thread Rusty Russell
On Thu, 3 Dec 2009 08:28:38 pm Avi Kivity wrote: On 12/03/2009 10:42 AM, Avishay Traeger1 wrote: I previously submitted a patch to have the guest virtio-blk driver get the value for the maximum I/O size from the host bdrv, rather than assume that there is no limit. Avi requested that I

Re: [PATCH 12/28] virtio: console: Buffer data that comes in from the host

2009-12-02 Thread Rusty Russell
On Wed, 2 Dec 2009 07:54:06 pm Amit Shah wrote: On (Wed) Dec 02 2009 [14:14:20], Rusty Russell wrote: On Sat, 28 Nov 2009 05:20:35 pm Amit Shah wrote: The console could be flooded with data from the host; handle this situation by buffering the data. All this complexity makes me

Re: [PATCH 12/28] virtio: console: Buffer data that comes in from the host

2009-12-01 Thread Rusty Russell
On Sat, 28 Nov 2009 05:20:35 pm Amit Shah wrote: The console could be flooded with data from the host; handle this situation by buffering the data. All this complexity makes me really wonder if we should just have the host say the max # ports it will ever use, and just do this really dumbly.

Re: [PATCH] virtio: set pci bus master enable bit

2009-11-30 Thread Rusty Russell
On Mon, 30 Nov 2009 02:22:01 am Michael S. Tsirkin wrote: As all virtio devices perform DMA, we must enable bus mastering for them to be spec compliant. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_pci.c |1 + 1 files changed, 1 insertions(+), 0

Re: virtio: Add memory statistics reporting to the balloon driver (V4)

2009-11-30 Thread Rusty Russell
() should promote to u64 so we don't truncate. 3) Fix two checkpatch.pl warnings. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_balloon.c |8 +--- include/linux/virtio_balloon.h |3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers

Re: [PATCH 08/28] virtio: console: remove global var

2009-11-29 Thread Rusty Russell
On Sat, 28 Nov 2009 05:20:31 pm Amit Shah wrote: From: Rusty Russell ru...@rustcorp.com.au Now we can use an allocation function to remove our global console variable. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char

Re: [PATCH 07/28] virtio: console: don't assume a single console port.

2009-11-29 Thread Rusty Russell
On Sat, 28 Nov 2009 05:20:30 pm Amit Shah wrote: Keep a list of all ports being used as a console, and provide a lock and a lookup function. The hvc callbacks only give us a vterm number, so we need to map this. OK, I think we can do better than this. How about we introduce a 'struct

Re: [PATCH 09/28] virtio: console: struct ports for multiple ports per device.

2009-11-29 Thread Rusty Russell
On Sat, 28 Nov 2009 05:20:32 pm Amit Shah wrote: @@ -196,7 +216,9 @@ static void virtcons_apply_config(struct virtio_device *dev) dev-config-get(dev, offsetof(struct virtio_console_config, rows), ws.ws_row,

Re: [PATCH] vhost: Fix warnings and bad type handling

2009-11-22 Thread Rusty Russell
On Sun, 22 Nov 2009 08:58:01 pm Michael S. Tsirkin wrote: From: Alan Cox a...@linux.intel.com Subject: [PATCH] vhost: fix warnings on 32 bit systems Fix compiler warning about discarding top 32 bit of data on 32 bit systems, and document that dicarded bits must be 0. Signed-off-by:

Re: virtio: Add memory statistics reporting to the balloon driver (V3)

2009-11-19 Thread Rusty Russell
On Fri, 20 Nov 2009 01:49:05 am Adam Litke wrote: Rusty and Anthony, If I've addressed all outstanding issues, please consider this patch for inclusion. Thanks. Changes since V2: - Increase stat field size to 64 bits - Report all sizes in kb (not pages) Hi Adam, Looks like we're

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V2)

2009-11-18 Thread Rusty Russell
On Thu, 19 Nov 2009 01:32:26 am Anthony Liguori wrote: Rusty Russell wrote: The little-endian conversion of the balloon driver is a historical mistake (no other driver does this). Let's not extend it to the stats. I think the mistake is that the other drivers don't do that. We cheat

Re: virtio: Add memory statistics reporting to the balloon driver (V2)

2009-11-17 Thread Rusty Russell
On Wed, 18 Nov 2009 07:06:29 am Adam Litke wrote: virtio: Add memory statistics reporting to the balloon driver (V2) Changes since V1: - Use a virtqueue instead of the device config space Hi Adam, If Anthony's happy, I'm happy with this approach. Couple of minor points: +static

Re: [PATCH 3/3] Split the KVM pv-ops support by feature

2009-11-17 Thread Rusty Russell
On Wed, 18 Nov 2009 10:43:12 am Alexander Graf wrote: Currently selecting KVM guest support enabled multiple features at once that not everyone necessarily wants to have, namely: These patches make perfect sense, but please make sure Jeremy Fitzhardinge (CC'd) is in the loop, as he split the

Re: [PATCH 01/15] virtio_console: Initialize hv_ops struct at declaration instead of in the probe() routine

2009-11-11 Thread Rusty Russell
On Thu, 12 Nov 2009 05:12:54 am Amit Shah wrote: On (Tue) Nov 10 2009 [23:37:39], Rusty Russell wrote: I chose port as a name; it's better once we're finished than struct virtio_console_struct. I wanted to separate out a 'virtio device' which has vqs common to all ports and a 'port

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-11 Thread Rusty Russell
On Tue, 10 Nov 2009 10:06:37 pm Michael S. Tsirkin wrote: If tun is a module, vhost must be a module, too. If tun is built-in or disabled, vhost can be built-in. I really like the brainbending :) Keeps readers on their toes... Applied, Rusty. ___

Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-11 Thread Rusty Russell
On Thu, 12 Nov 2009 01:38:34 am Adam Litke wrote: But it raises the question: what stats are generally useful cross-OS? Should we be supplying numbers like unused (free) instantly discardable (ie. clean), discardable to disk (ie. file-backed), discardable to swap (ie. swap-backed) and

Re: [PATCH 8/8] virtio: console: struct ports for multiple ports per device.

2009-11-10 Thread Rusty Russell
On Tue, 10 Nov 2009 08:03:28 pm Amit Shah wrote: On (Tue) Nov 10 2009 [16:57:30], Rusty Russell wrote: Rather than assume a single port, add a 'struct ports' with an array of ports. Currently, there's always only one, but that will change. Hey Rusty, Hi Amit, -static struct port

Re: [PATCH 8/8] virtio: console: struct ports for multiple ports per device.

2009-11-10 Thread Rusty Russell
On Tue, 10 Nov 2009 05:54:14 pm Amit Shah wrote: 2) Do we really need more than input buffer at a time? If not, it's easy to generalize the input callback. This will be slow, but shouldn't be a problem. In my testing of a vnc clipboard copy/paste, the vnc client only sent the

Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-10 Thread Rusty Russell
On Wed, 11 Nov 2009 01:06:14 am Anthony Liguori wrote: Rusty Russell wrote: On Tue, 10 Nov 2009 03:02:06 am Adam Litke wrote: A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them to the host via the device config space

Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-10 Thread Rusty Russell
On Wed, 11 Nov 2009 08:22:42 am Anthony Liguori wrote: Rusty Russell wrote: On Tue, 10 Nov 2009 03:02:06 am Adam Litke wrote: A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them to the host via the device config space

Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-10 Thread Rusty Russell
On Wed, 11 Nov 2009 10:37:56 am Anthony Liguori wrote: Rusty Russell wrote: You register an outbuf at initialization time. The host hands it back when it wants you to refill it with stats. That's strangely backwards. Guest send a stat buffer that's filled out, host acks it when

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
On Mon, 9 Nov 2009 05:40:32 pm Michael S. Tsirkin wrote: On Mon, Nov 9, 2009 at 8:17 AM, Rusty Russell ru...@rustcorp.com.au wrote: There's something about the 'acked' which rubs me the wrong way. enabled_features is perhaps a better term than acked_features; acked seems more a user point

Re: [PATCH v10 1/1] virtio_console: Add support for multiple ports for generic guest and host communication

2009-11-09 Thread Rusty Russell
On Mon, 9 Nov 2009 10:38:39 pm Amit Shah wrote: 3) Don't use list_for_each_safe() to get the head entry of a list. Your use is buggy anyway: buf will never be NULL afterwards. As long as 'head' isn't the only node in the list we should loop. And list_foreach_safe() does that. So it's

Re: [PATCH] virtio-spec: correct wording

2009-11-09 Thread Rusty Russell
On Tue, 10 Nov 2009 01:17:53 am Michael S. Tsirkin wrote: virtio header resizes in the first I/O region, not in PCI configuration space as the spec v0.8.1 implied. Correct this. Thanks, that patch worked very well. It was even readable! Somewhere on my TODO list is the job of updating the

Re: virtio: Add memory statistics reporting to the balloon driver

2009-11-09 Thread Rusty Russell
On Tue, 10 Nov 2009 03:02:06 am Adam Litke wrote: A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them to the host via the device config space. There are two issues I see with this. First, there's an atomicity problem since you can't tell when

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
On Tue, 10 Nov 2009 03:52:30 am Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. Thanks, applied. Will be in tomorrow's

Re: [PATCHv9 3/3] vhost_net: a kernel-level virtio server

2009-11-09 Thread Rusty Russell
One fix: vhost: fix TUN=m VHOST_NET=y drivers/built-in.o: In function `get_tun_socket': net.c:(.text+0x15436e): undefined reference to `tun_get_socket' Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/vhost/Kconfig |2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 8/8] virtio: console: struct ports for multiple ports per device.

2009-11-09 Thread Rusty Russell
On Tue, 10 Nov 2009 04:57:30 pm Rusty Russell wrote: Rather than assume a single port, add a 'struct ports' with an array of ports. Currently, there's always only one, but that will change. Now, from here we need several more patches. At least: 1) Generalize the output path so we can sleep

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-08 Thread Rusty Russell
On Sun, 8 Nov 2009 10:05:16 pm Michael S. Tsirkin wrote: On Fri, Nov 06, 2009 at 03:29:17PM +1030, Rusty Russell wrote: +/* Caller must have TX VQ lock */ +static void tx_poll_stop(struct vhost_net *net) +{ + if (likely(net-tx_poll_state != VHOST_NET_POLL_STARTED)) + return

Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server

2009-11-07 Thread Rusty Russell
On Sat, 7 Nov 2009 03:00:07 am Paul E. McKenney wrote: On Fri, Nov 06, 2009 at 03:31:20PM +1030, Rusty Russell wrote: But it's still nasty to use half an API. If it were a few places I would have open-coded it with a comment, or wrapped it. As it is, I don't think that would be a win

Re: [PATCHv8 3/3] vhost_net: a kernel-level virtio server

2009-11-05 Thread Rusty Russell
On Thu, 5 Nov 2009 02:27:24 am Michael S. Tsirkin wrote: What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Hi Michael, Now everyone else has finally kicked all the tires and it seems to pass, I've done a fairly

Re: [PATCHv7 3/3] vhost_net: a kernel-level virtio server

2009-11-05 Thread Rusty Russell
On Thu, 5 Nov 2009 03:55:42 am Paul E. McKenney wrote: On Wed, Nov 04, 2009 at 01:57:29PM +0200, Michael S. Tsirkin wrote: Can you ack this usage please? I thought I had done so in my paragraph above, but if you would like something a bit more formal... snip verbose super-ack with

Re: [PATCH v10 1/1] virtio_console: Add support for multiple ports for generic guest and host communication

2009-11-05 Thread Rusty Russell
On Wed, 4 Nov 2009 03:08:39 am Amit Shah wrote: Expose multiple char devices (ports) for simple communication between the host userspace and guest. OK, I've taken the chance to audit this patch. I started adding patches until I got overwhelmed. It's a complete mess and needs a total rewrite

Re: performance regression in virtio-net in 2.6.32-rc4

2009-10-27 Thread Rusty Russell
On Tue, 27 Oct 2009 05:18:35 am Michael S. Tsirkin wrote: Hi! I noticed a performance regression in virtio net: going from 2.6.31 to 2.6.32-rc4 I see this, for guest to host communication: ... Size SizeSize Time Throughput bytes bytes bytessecs.10^6bits/sec 87380

Re: [PATCHv2] virtio: order used ring after used index read

2009-10-25 Thread Rusty Russell
On Sun, 25 Oct 2009 11:58:53 pm Michael S. Tsirkin wrote: On SMP guests, reads from the ring might bypass used index reads. This causes guest crashes because host writes to used index to signal ring data readiness. Fix this by inserting rmb before used ring reads. Thanks, good spotting.

Re: [PATCH] virtio-net: fix data corruption with OOM

2009-10-25 Thread Rusty Russell
this. This causes guest data corruption and crashes with vhost since net core can requeue the skb or free it without it being taken off the list. This patch fixes this by queueing the skb after successful transmit. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Rusty Russell ru

Re: INDIRECT and NEXT

2009-10-23 Thread Rusty Russell
On Fri, 23 Oct 2009 05:06:48 pm Michael S. Tsirkin wrote: On Fri, Oct 23, 2009 at 02:01:23PM +1030, Rusty Russell wrote: Also, we have a limitation that you can't have more descriptors than the ring size, even with indirect, due to overzealous checks... Yes ... so I wonder: do we want

Re: [PULL] virtio fixes

2009-10-22 Thread Rusty Russell
On Thu, 22 Oct 2009 10:01:43 am Linus Torvalds wrote: On Mon, 19 Oct 2009, Rusty Russell wrote: ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master Already up-to-date.. Forgot to push? Oops, overzealous master.kernel.org space reclamation

Re: INDIRECT and NEXT

2009-10-22 Thread Rusty Russell
On Thu, 22 Oct 2009 08:07:45 pm Michael S. Tsirkin wrote: Imagine an indirect entry where NEXT bit is also set. Hmm, so it's not obvious whether the kvm userspace code handles it correctly either. Want to hack something up to use NEXT + INDIRECT, then we can actually test it? If it doesn't

[PULL] virtio fixes

2009-10-18 Thread Rusty Russell
://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master Christian Borntraeger (1): virtio: let header files include virtio_ids.h Christoph Hellwig (1): virtio_blk: revert QUEUE_FLAG_VIRT addition Rusty Russell (1): virtio_blk: Revert serial number support Uwe

Re: INDIRECT and NEXT

2009-10-18 Thread Rusty Russell
On Mon, 5 Oct 2009 01:07:34 am Michael S. Tsirkin wrote: Hi! I note that chaining INDIRECT descriptors with NEXT currently is broken in lguest, because current ring index gets overwritten. I agree this should be fixed, but not quite sure what you're referring to. I could force indirect and

Re: [PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.

2009-10-06 Thread Rusty Russell
On Tue, 6 Oct 2009 02:50:12 am john cooper wrote: It seems simply retiring use of the VIRTIO_BLK_F_IDENTIFY binary value should be sufficient. The patch which implemented the cooperating logic in qemu was dropped due to the config space issue. OK, I'll just remove it then. Also, I've been

Re: [PATCH] virtio_ids: let virtio header files include virtio_ids.h and export it

2009-09-30 Thread Rusty Russell
On Wed, 30 Sep 2009 06:47:21 pm Christian Borntraeger wrote: [PATCH] virtio_ids: let header files include virtio_ids.h Thanks, applied. Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication

2009-09-29 Thread Rusty Russell
On Fri, 11 Sep 2009 11:43:06 pm Amit Shah wrote: Expose multiple char devices (ports) for simple communication between the host userspace and guest. OK, I think other comments have died down, so it's time for a review. This was the latest patch I could find. The obvious way to do this is to

[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.

2009-09-29 Thread Rusty Russell
VIRTIO_BLK_IDENTIFY_DEPRECATED to indicate that they know it's no longer in the config struct, and can use any new features (all new features which add a configuration field will conflict with this deprecated one). Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/block/virtio_blk.c

[PATCH 2/4] lguest: get rid of offset hack in example launcher

2009-09-29 Thread Rusty Russell
We never supported the ATA VIRTIO_BLK_F_IDENTIFY anyway, but simply including it in the struct definition broke us (see commit 8ef562d112 lguest: fix descriptor corruption in example launcher). Now we can acknowledge that it's deprecated, and get the struct without it. Signed-off-by: Rusty

[PATCH 4/4] lguest: GET_ID support

2009-09-29 Thread Rusty Russell
We advertise the feature for testing, then promptly fail when the guest uses it. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- Documentation/lguest/lguest.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/lguest/lguest.c b/Documentation

[PATCH] virtio_blk: revert QUEUE_FLAG_VIRT addition

2009-09-27 Thread Rusty Russell
overhead low enough that this flag makes sense it should only be set based on a feature flag set by the host. Signed-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/block/virtio_blk.c |1 - 1 file changed, 1 deletion(-) Index

Re: Paravirtualization on VMware's Platform [VMI].

2009-09-22 Thread Rusty Russell
On Sun, 20 Sep 2009 06:30:21 pm Avi Kivity wrote: On 09/20/2009 10:52 AM, Arjan van de Ven wrote: On Sun, 20 Sep 2009 09:42:47 +0200 Ingo Molnarmi...@elte.hu wrote: If we were able to rip out all (or most) of paravirt from arch/x86 it would be tempting for other technical reasons

[PATCH 6/6] virtio_blk: revert QUEUE_FLAG_VIRT addition

2009-09-21 Thread Rusty Russell
overhead low enough that this flag makes sense it should only be set based on a feature flag set by the host. Signed-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Rusty Russell ru...@rustcorp.com.au Index: linux-2.6/drivers/block/virtio_blk.c

[PATCH 5/6] virtio_blk: set QUEUE_ORDERED_DRAIN by default

2009-09-21 Thread Rusty Russell
is a bug in the storage, where in our case qemu is the storage. Actual write cache feature is coming in successive patch. --RR ) Signed-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/block/virtio_blk.c |9 - 1 file changed, 8

[PATCH 2/6] virtio: make add_buf return capacity remaining

2009-09-21 Thread Rusty Russell
This API change means that virtio_net can tell how much capacity remains for buffers. It's necessarily fuzzy, since VIRTIO_RING_F_INDIRECT_DESC means we can fit any number of descriptors in one, *if* we can kmalloc. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Cc: Dinesh Subhraveti dine

[PATCH 4/6] virtio: add virtio IDs file

2009-09-21 Thread Rusty Russell
From: =?UTF-8?B?RmVybmFuZG8gTHVpcyBWw6F6cXVleiBDYW8=?= Virtio IDs are spread all over the tree which makes assigning new IDs bothersome. Putting them together should make the process less error-prone. Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp Signed-off-by: Rusty Russell ru

[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET

2009-09-21 Thread Rusty Russell
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC000. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Cc: Matias Zabaljauregui zabaljaure...@gmail.com --- drivers/lguest/page_tables.c |6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 5/5] lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY

2009-09-21 Thread Rusty Russell
VIRTIO_F_NOTIFY_ON_EMPTY indicates to the Guest that we will hit them with an interrupt every time the xmit queue is emptied. Because it results in lots of tx interrupts, modern Guests probably don't want it, so let's only force it when they accept the option. Signed-off-by: Rusty Russell ru

[PATCH 4/5] lguest: cleanup for map_switcher()

2009-09-21 Thread Rusty Russell
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com We can use alloc_page() instead of get_zeroed_page() and virt_to_page() Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/lguest/core.c |5 ++--- 1 file changed, 2

<    5   6   7   8   9   10   11   12   13   14   >