[PATCH RFC 2/5] vringfd base/offset

2008-04-05 Thread Rusty Russell
It turns out the lguest (and possibly kvm) want the addresses in the ring buffer to only cover a certain part of memory, and be offset. It makes sense that this be an ioctl. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 08fb00b8acab Documentation/ioctl-number.txt --- a/Documentation

[PATCH RFC 4/5] tun: vringfd xmit support.

2008-04-05 Thread Rusty Russell
. In this case, it can hint how much to copy, and the other pages will be made into skb fragments. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 8270b5fdf03f drivers/net/tun.c --- a/drivers/net/tun.c Sat Apr 05 22:49:10 2008 +1100 +++ b/drivers/net/tun.c Sat Apr 05 22:51:10 2008 +1100

[PATCH RFC 3/5] tun: vringfd receive support.

2008-04-05 Thread Rusty Russell
, for example (see FIXME). We use struct virtio_net_hdr prepended to packets in the ring to allow userspace to receive GSO packets in future (at the moment, the tun driver doesn't tell the stack it can handle them, so these cases are never taken). Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff

Re: [PATCH RFC 2/5] vringfd base/offset

2008-04-05 Thread Rusty Russell
On Saturday 05 April 2008 22:44:33 Avi Kivity wrote: Rusty Russell wrote: It turns out the lguest (and possibly kvm) want the addresses in the ring buffer to only cover a certain part of memory, and be offset. mailto:[EMAIL PROTECTED] +0xAE 00

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-05 Thread Rusty Russell
On Sunday 06 April 2008 03:13:41 Anthony Liguori wrote: + void *buf = calloc(vring_size(256, getpagesize()), 0); Shouldn't this be calloc(1, vring_size(256, getpagesize()));? Heh, yes... spot the last minute change from malloc to calloc. + if (r != 0) + err(1, poll after

Re: [PATCH RFC 2/5] vringfd base/offset

2008-04-05 Thread Rusty Russell
On Sunday 06 April 2008 03:18:59 Anthony Liguori wrote: Rusty Russell wrote: - if (unlikely(get_user(head, vr-ring.avail-ring[head]) != 0)) + + if (unlikely(get_user(head, vr-ring.avail-ring[vr-last_avail + % vr-ring.num]))) Why

[RFC PATCH 0/4] Inter-guest virtio I/O example with lguest

2008-03-20 Thread Rusty Russell
Hi all, Just finished my prototype of inter-guest virtio, using networking as an example. Each guest mmaps the other's address space and uses a FIFO for notifications. There are two issues with this approach. The first is that neither guest can change its mappings. See patch 1. The

[RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Rusty Russell
From: Paul TBBle Hampson [EMAIL PROTECTED] This creates a file in $HOME/.lguest/ to directly back the RAM and DMA memory mappings created by map_zeroed_pages. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- Documentation/lguest/lguest.c | 59 -- 1

[RFC PATCH 2/5] lguest: Encapsulate Guest memory ready for dealing with other Guests.

2008-03-20 Thread Rusty Russell
We currently keep Guest memory pointer and size in globals. We move this into a structure and explicitly hand that to to_guest_phys() and from_guest_phys() so we can deal with other Guests' memory. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- Documentation/lguest/lguest.c | 89

[RFC PATCH 5/5] lguest: Inter-guest networking

2008-03-20 Thread Rusty Russell
in the other Guest's virtqueue). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- Documentation/lguest/lguest.c | 257 ++ 1 file changed, 235 insertions(+), 22 deletions(-) diff -r d803a2208052 Documentation/lguest/lguest.c --- a/Documentation/lguest

Re: [kvm-devel] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Rusty Russell
On Friday 21 March 2008 01:04:17 Anthony Liguori wrote: Rusty Russell wrote: From: Paul TBBle Hampson [EMAIL PROTECTED] This creates a file in $HOME/.lguest/ to directly back the RAM and DMA memory mappings created by map_zeroed_pages. I created a test program recently that measured

Re: [kvm-devel] [RFC PATCH 0/4] Inter-guest virtio I/O example with lguest

2008-03-20 Thread Rusty Russell
On Thursday 20 March 2008 17:54:45 Avi Kivity wrote: Rusty Russell wrote: Hi all, Just finished my prototype of inter-guest virtio, using networking as an example. Each guest mmaps the other's address space and uses a FIFO for notifications. Isn't that a security hole (hole? chasm

Re: [Lguest] [RFC PATCH 1/5] lguest: mmap backing file

2008-03-20 Thread Rusty Russell
On Thursday 20 March 2008 19:16:00 Tim Post wrote: On Thu, 2008-03-20 at 17:05 +1100, Rusty Russell wrote: + snprintf(memfile_path, PATH_MAX, %s/.lguest, getenv(HOME) ?: ); Hi Rusty, Is that safe if being run via setuid/gid or shared root? It might be better to just look it up

[PULL] 2.6.25 virtio fixes

2008-03-17 Thread Rusty Russell
netpoll interface for netconsole logging Anthony Liguori (1): virtio: Use spin_lock_irqsave/restore for virtio-pci Christian Borntraeger (1): virtio: fix race in enable_cb Jeremy Katz (1): virtio: Fix sysfs bits to have proper block symlink Rusty Russell (1): virtio: handle 2

Re: [PATCH] virtio_net/virtio_ring: fix race in enable_cb

2008-03-16 Thread Rusty Russell
On Saturday 15 March 2008 00:17:05 Christian Borntraeger wrote: There is a race in virtio_net, dealing with disabling/enabling the callback. I saw the following oops: kernel BUG at /space/kvm/drivers/virtio/virtio_ring.c:218! illegal operation: 0001 [#1] SMP Modules linked in: sunrpc dm_mod

Re: [patch 0/6] Guest page hinting version 6.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:32 Martin Schwidefsky wrote: My question now is how to proceed with the code. I sure would love to see the code going upstream some day but that depends on the mm developers as the code adds complexity that needs to be supported. Well, I want this feature, but I

Re: [patch 1/6] Guest page hinting: core + volatile page cache.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:33 Martin Schwidefsky wrote: @@ -957,6 +975,19 @@ struct page *follow_page(struct vm_area_ if (flags FOLL_GET) get_page(page); + + if (flags FOLL_GET) { + /* + * The page is made stable if a reference is

Re: [patch 3/6] Guest page hinting: mlocked pages.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:35 Martin Schwidefsky wrote: --- linux-2.6.orig/include/linux/fs.h +++ linux-2.6/include/linux/fs.h @@ -513,6 +513,9 @@ struct address_space { spinlock_t private_lock; /* for use by the address_space */ struct list_head

Re: [patch 4/6] Guest page hinting: writable page table entries.

2008-03-12 Thread Rusty Russell
On Thursday 13 March 2008 00:21:36 Martin Schwidefsky wrote: Index: linux-2.6/fs/exec.c === --- linux-2.6.orig/fs/exec.c +++ linux-2.6/fs/exec.c @@ -51,6 +51,7 @@ #include linux/tsacct_kern.h #include linux/cn_proc.h

[PATCH 3/4] virtio: handle 2 billion page balloon targets

2008-03-11 Thread Rusty Russell
If the host asks for a huge target towards_target() can overflow, and we up oops as we try to release more pages than we have. The simple fix is to use a 64-bit value. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/virtio/virtio_balloon.c |4 ++-- 1 file changed, 2 insertions

[PATCH 4/4] virtio: Enable netpoll interface for netconsole logging

2008-03-11 Thread Rusty Russell
From: Amit Shah [EMAIL PROTECTED] Add a new poll_controller handler that the netpoll interface needs. This enables netconsole logging from a kvm guest over the virtio net interface. Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net

[PATCH 1/4] virtio: Use spin_lock_irqsave/restore for virtio-pci

2008-03-11 Thread Rusty Russell
From: Anthony Liguori [EMAIL PROTECTED] virtio-pci acquires its spin lock in an interrupt context so it's necessary to use spin_lock_irqsave/restore variants. This patch fixes guest SMP when using virtio devices in KVM. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] Signed-off-by: Rusty

[PATCH 2/4] virtio: Fix sysfs bits to have proper block symlink

2008-03-11 Thread Rusty Russell
From: Jeremy Katz [EMAIL PROTECTED] Fix up so that the virtio_blk devices in sysfs link correctly to their block device. This then allows them to be detected by hal, etc Signed-off-by: Jeremy Katz [EMAIL PROTECTED] Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/block/virtio_blk.c

Re: [PATCH 2/3] partial checksum and GSO support for tun/tap.

2008-03-03 Thread Rusty Russell
On Friday 08 February 2008 16:39:03 Max Krasnyansky wrote: Rusty Russell wrote: (Changes since last time: we how have explicit IFF_RECV_CSUM and IFF_RECV_GSO bits, and some renaming of virtio_net hdr) We use the virtio_net_hdr: it is an ABI already and designed to encapsulate

Re: [PATCH 2/3] partial checksum and GSO support for tun/tap.

2008-03-03 Thread Rusty Russell
On Tuesday 04 March 2008 16:08:00 Max Krasnyansky wrote: The problem with this approach is that for what I'm doing, the packets aren't nicely arranged somewhere; they're in random process memory. That's fine. RX/TX descriptors would not contain the data itself. They'd contain pointers to

Re: [PATCH] virtio_net: Fix open - interrupt race

2008-02-05 Thread Rusty Russell
shouldn't hurt. Please push this out. Acked-by: Rusty Russell [EMAIL PROTECTED] Thanks, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization

Re: [PULL] virtio updates

2008-02-05 Thread Rusty Russell
On Wednesday 06 February 2008 00:35:50 Soren Hansen wrote: On Tue, Feb 05, 2008 at 12:08:13AM +1100, Rusty Russell wrote: ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linu s master If I don't have an account on master.kernel.org, how can I access this git tree

Re: [Patch] virtio_blk: implement naming for vda-vdz, vdaa-vdzz, vdaaa-vdzzz

2008-02-04 Thread Rusty Russell
On Friday 01 February 2008 19:05:00 Christian Borntraeger wrote: Am Freitag, 1. Februar 2008 schrieb Christian Borntraeger: Right. I will fix that with an additional patch. This patch goes on top of the minor number patch. Please let me know if you want a merged patch: Currently virtio_blk

Re: [PATCH] Use PCI revision field to indicate virtio PCI ABI version

2008-01-30 Thread Rusty Russell
On Wednesday 30 January 2008 03:03:42 Anthony Liguori wrote: Rusty Russell wrote: On Tuesday 29 January 2008 19:03:26 Avi Kivity wrote: But that's done at the wrong level. Anthony agreed the revision ID should indicate the device ABI, not just the virtio ABI. If we move to that level

Re: [PATCH] Use PCI revision field to indicate virtio PCI ABI version

2008-01-29 Thread Rusty Russell
On Tuesday 29 January 2008 19:03:26 Avi Kivity wrote: Rusty Russell wrote: On Tuesday 29 January 2008 02:59:59 Anthony Liguori wrote: As Avi pointed out, as we continue to massage the virtio PCI ABI, we can make things a little more friendly to users by utilizing the PCI revision field

Re: [PATCH 2/2] virtio reset support

2008-01-24 Thread Rusty Russell
On Friday 25 January 2008 00:09:07 Dor Laor wrote: The patches really fix/simplify things :) Yes, that's why I like reset, it solves multiple problems. Did you test device open-close-open? It was broken in my last test, Well, it's not really fair, since I moved the buffer allocation and

Re: [PATCH] Fix compile warnings in virtio_balloon

2008-01-24 Thread Rusty Russell
-off-by: Rusty Russell [EMAIL PROTECTED] diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -82,7 +82,7 @@ static void tell_host(struct virtio_ball wait_for_completion(vb-acked

[PATCH 1/3] Cleanup and simplify virtnet header

2008-01-23 Thread Rusty Russell
or v4. 3) Rename VIRTIO_NET_F_NO_CSUM to VIRTIO_NET_F_CSUM (ie. means we do checksumming). 4) Add csum and gso params to virtio_net to allow more testing. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net/virtio_net.c | 32 include/linux

[PATCH 2/3] partial checksum and GSO support for tun/tap.

2008-01-23 Thread Rusty Russell
packets. Note that there is no easy way to detect if these flags are supported: see next patch. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net/tun.c | 259 +++-- include/linux/if_tun.h |6 + 2 files changed, 238 insertions

[PATCH 1/2] reset support: make net driver alloc/cleanup in probe and remove

2008-01-23 Thread Rusty Russell
Since we want to reset the device to remove them, this is simpler (device is reset for us on driver remove). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net/virtio_net.c | 44 +--- 1 file changed, 25 insertions(+), 19 deletions(-) diff -r

[PATCH 2/2] virtio reset support

2008-01-23 Thread Rusty Russell
that the buffers won't be used by the guest, and 3) It helps the guest recover from messed-up drivers. So we remove the -shutdown hook, and the only way we now remove feature bits is via reset. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/char/hw_random/virtio-rng.c |1 - drivers/lguest

Re: [PATCH] virtio_blk: provide getgeo

2008-01-23 Thread Rusty Russell
On Thursday 24 January 2008 03:56:50 Christian Borntraeger wrote: Rusty, I currently try to make my guest boot from an virtio root device without having an external kernel. Some of the tools that I tried expect HDIO_GETGEO to work. The most interesting value is likely the geo.start value to

lack of -remove in 9p virtio driver

2008-01-23 Thread Rusty Russell
Hi Eric, Just cleaning up patches for 2.6.25 merge, and noticed that net/9p/trans_virtio.c doesn't have a remove function. This will crash when removing the module (console doesn't have one because it can't really be removed). I'll push the latest queue in a couple of hours: the most

Re: [kvm-devel] [Virtio-for-kvm] [PATCH 12/13] [Mostly resend] virtio additions

2008-01-23 Thread Rusty Russell
On Saturday 22 December 2007 02:27:04 Dor Laor wrote: From 20a01e0c24f47e9805a88bebc9310163f99b5e99 Mon Sep 17 00:00:00 2001 From: Dor Laor [EMAIL PROTECTED] Date: Sun, 16 Dec 2007 23:35:35 +0200 Subject: [PATCH] Handle module unload Add the device release function. Hi Dor, It looks

Re: [PATCH 1/3] Make virtio modules GPL

2008-01-23 Thread Rusty Russell
On Thursday 03 January 2008 08:01:32 Anthony Liguori wrote: The virtio modules do not advertise themselves as GPL but rely on exported GPL symbols. This makes them unloadable as modules. This patch adds the appropriate MODULE_LICENSE(). Hmm, this is already at the bottom of virtio_blk and

Re: [kvm-devel] [PATCH] KVM simplified virtio balloon driver

2008-01-23 Thread Rusty Russell
Here's the latest. Hope this works for everyone (putting in a oom handler or shrinker requires a lock, but can be done quite easily). Untested. === After discussions with Anthony Liguori, it seems that the virtio balloon can be made even simpler. Here's my attempt. Signed-off-by: Rusty Russell

Re: [PATCH 2/3] virtio: Net header needs gso_hdr_len

2008-01-22 Thread Rusty Russell
On Tuesday 22 January 2008 21:36:30 Herbert Xu wrote: On Wed, Jan 16, 2008 at 03:19:03PM +1100, Rusty Russell wrote: It's far easier to deal with GSO if we don't have to parse the packet to figure out the header length. Add the field to the virtio_net_hdr struct (and fix the spaces

Re: [PATCH] virtio: remove explicit pci ids from virtio_pci.c

2008-01-21 Thread Rusty Russell
On Monday 21 January 2008 20:12:46 Avi Kivity wrote: Anthony Liguori wrote: Rusty Russell wrote: Qumranet let us use their PCI vendor ID, with device ids = 0x1000. We can specify that we accept all of them in the device ID table, and then return -ENODEV in the probe routine. I thought

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-19 Thread Rusty Russell
On Saturday 19 January 2008 15:08:28 Tejun Heo wrote: Rusty Russell wrote: There are three possibilities: (1) force everyone to use void *, (2) force everyone to be type-correct, (3) allow both with some tricks. Currently we're on (1). For kthread, with only dozens of users, I chose

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 07:45:41 Jeff Garzik wrote: Rusty Russell wrote: -static irqreturn_t lguest_interrupt(int irq, void *_vq) +static irqreturn_t lguest_interrupt(int irq, struct virtqueue *vq) { - struct virtqueue *vq = _vq; struct lguest_device_desc *desc = to_lgdev(vq

[PATCH 2/3] Make IRQ handlers typesafe.

2008-01-18 Thread Rusty Russell
in a wrapper macro, it's a simple way of allowing one of several types. (Some drivers now need to be cleaned up to compile, previous patch). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- include/linux/interrupt.h | 17 +++-- include/linux/kernel.h|7 +++ kernel/irq

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 10:12:33 Tejun Heo wrote: Type safety is good but I doubt this would be worth the complexity. It has some benefits but there's much larger benefit in keeping things in straight C. People know that functions take fixed types and are also familiar with the

[PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
Just a trivial example. --- drivers/lguest/lguest_device.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -r 00ab7672f658 drivers/lguest/lguest_device.c --- a/drivers/lguest/lguest_device.cThu Jan 17 16:54:00 2008 +1100 +++ b/drivers/lguest/lguest_device.cThu Jan 17

Re: [PATCH 3/3] Makes lguest's irq handler typesafe

2008-01-18 Thread Rusty Russell
On Saturday 19 January 2008 12:44:52 Tejun Heo wrote: Tejun Heo wrote: so I think the question is do we want to change all callbacks to take native pointer type instead of void pointer?. Lemme clarity myself a bit. I'm not saying that we should convert all at once or literally every

[PATCH] KVM simplified virtio balloon driver

2008-01-16 Thread Rusty Russell
, the target is best expressed in balloon size, since there is no portable way of getting the total RAM in the system. The host can do the math. Tested with a (fairly hacky) lguest patch. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/virtio/Kconfig | 10 + drivers/virtio

Re: [kvm-devel] [PATCH] KVM simplified virtio balloon driver

2008-01-16 Thread Rusty Russell
On Thursday 17 January 2008 13:14:58 Anthony Liguori wrote: Rusty Russell wrote: +static struct virtio_device_id id_table[] = { + { VIRTIO_ID_BALLOON, VIRTIO_DEV_ANY_ID}, Could use a space after VIRTIO_DEV_ANY_ID Thanks, fixed. + __free_page(page); + vb-num_pages

[PATCH 2/3] virtio: Net header needs gso_hdr_len

2008-01-15 Thread Rusty Russell
It's far easier to deal with GSO if we don't have to parse the packet to figure out the header length. Add the field to the virtio_net_hdr struct (and fix the spaces that somehow crept in there). Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net/virtio_net.c |4 +++- include

[PATCH 1/3] skb_partial_csum_set

2008-01-15 Thread Rusty Russell
Implement skb_partial_csum_set, for setting partial csums on untrusted packets. Use it in virtio_net (replacing buggy version there), it's also going to be used by TAP for partial csum support. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/net/virtio_net.c | 11

Re: [PATCH 1/3] skb_partial_csum_set

2008-01-15 Thread Rusty Russell
On Tuesday 15 January 2008 22:14:22 David Miller wrote: From: Rusty Russell [EMAIL PROTECTED] Date: Tue, 15 Jan 2008 21:41:55 +1100 Implement skb_partial_csum_set, for setting partial csums on untrusted packets. Use it in virtio_net (replacing buggy version there), it's also going

Re: [PATCH 2/3] virtio: Net header needs gso_hdr_len

2008-01-15 Thread Rusty Russell
On Wednesday 16 January 2008 11:06:21 Herbert Xu wrote: Rusty Russell [EMAIL PROTECTED] wrote: It's far easier to deal with GSO if we don't have to parse the packet to figure out the header length. Add the field to the virtio_net_hdr struct (and fix the spaces that somehow crept

Re: [PATCH] fix bug in virtio-rng

2008-01-14 Thread Rusty Russell
On Tuesday 15 January 2008 04:31:35 Christian Borntraeger wrote: Rusty, I have seen an oops triggered by the following bug statement in virtio-rng: if (vq-vq_ops-add_buf(vq, sg, 0, 1, random_data) != 0) BUG(); The problem is that we never called get_buf for complete buffers. The

Re: [PATCH] virtio_rng: adopt driver to newest virtio code

2008-01-14 Thread Rusty Russell
On Tuesday 15 January 2008 02:51:47 Christian Borntraeger wrote: Rusty, This patch changes the virtio_rng to a callback without a return value. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Thanks, applied. BTW, virtio-rng was pretty much untested, so no huge surprise it has bugs.

Re: virtio_net and SMP guests

2008-01-11 Thread Rusty Russell
On Friday 11 January 2008 02:51:58 Christian Borntraeger wrote: What about the following patch: Looks correct and in fact pretty orthodox. I've folded this in, thanks! Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH] Remove unnecessary pr_debug()

2008-01-11 Thread Rusty Russell
On Wednesday 09 January 2008 09:42:05 Anthony Liguori wrote: This is not formatted correctly and really not useful, so let's just remove it. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] Thanks, applied. Rusty. ___ Virtualization mailing list

Re: [PATCH 04/16] per-cpu run guest

2008-01-08 Thread Rusty Russell
On Tuesday 08 January 2008 00:05:25 Glauber de Oliveira Costa wrote: + /* Watch out for arbitrary vcpu indexes! */ + if (vcpu_id lg-nr_vcpus) + return -EINVAL; + + vcpu = lg-vcpus[vcpu_id]; + Out-by-one error here... Fixed it for you, plus a couple of others. I've

Re: [PATCH] Always notify a virtio_ring when it's full

2008-01-08 Thread Rusty Russell
On Wednesday 09 January 2008 07:54:10 Anthony Liguori wrote: I saw that the tx timer was removed in your patch queue but you weren't notifying when full. I decided to do it here instead of in the error case on add_buf for really no great reason other than I thought it made more sense for it

Re: [kvm-devel] [PATCH] kvm guest balloon driver

2008-01-08 Thread Rusty Russell
that callback, and adds it to the virtio PCI implementation. Signed-off-by: Rusty Russell [EMAIL PROTECTED] --- drivers/virtio/virtio_pci.c | 10 ++ include/linux/virtio.h |3 +++ include/linux/virtio_pci.h |3 +++ 3 files changed, 16 insertions(+) diff -r 7494c7702462

Re: [PATCH][RESEND] Relax BUG_ON()s when enabling/disabling virt_ring interrupts

2008-01-06 Thread Rusty Russell
On Monday 07 January 2008 14:27:31 Rusty Russell wrote: + /* Other side may have missed us turning off the interrupt, + * but we should preserve disable semantic for virtio users. */ + if (unlikely(!(vq-vring.avail-flags VRING_AVAIL_F_NO_INTERRUPT))) { + pr_debug

Re: [PATCH] Use memset(0) instead of setting cb_mode explicitly

2008-01-03 Thread Rusty Russell
On Friday 04 January 2008 02:57:14 Anthony Liguori wrote: hrtimer's only have a cb_mode if CONFIG_HIGH_RES_TIMER is enabled. This patch memset()s the tx_timer structure to 0 which has the same effect as setting cb_mode to HRTIMER_CB_SOFTIRQ without requiring CONFIG_HIGH_RES_TIMER to be set.

Re: [PATCH 02/16] adapt lguest launcher to per-cpuness

2007-12-26 Thread Rusty Russell
On Thursday 27 December 2007 01:24:10 Steven Rostedt wrote: On Wed, 26 Dec 2007, Rusty Russell wrote: On Friday 21 December 2007 00:33:42 Glauber de Oliveira Costa wrote: + if (!vcpu_id) { + /* + * Service input, then unset the BREAK

Re: [PATCH 01/16] introduce vcpu struct

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:41 Glauber de Oliveira Costa wrote: this patch introduces a vcpu struct for lguest. In upcoming patches, more and more fields will be moved from the lguest struct to the vcpu Hi Glommer, +static inline struct lguest *lg_of_vcpu(struct lguest_vcpu *vcpu) +{ +

Re: [PATCH 02/16] adapt lguest launcher to per-cpuness

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:42 Glauber de Oliveira Costa wrote: + if (!vcpu_id) { + /* + * Service input, then unset the BREAK to + * release the Waker. + */ +

Re: [PATCH 04/16] per-cpu run guest

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:44 Glauber de Oliveira Costa wrote: @@ -55,11 +55,15 @@ static int user_send_irq(struct lguest *lg, const unsigned long __user *input) static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o) { struct lguest *lg = file-private_data;

Re: [PATCH 05/16] make write() operation smp aware

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:45 Glauber de Oliveira Costa wrote: --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c @@ -223,14 +223,21 @@ static ssize_t write(struct file *file, const char ... /* If you haven't initialized, you must do that first. */ - if (req

Re: [PATCH 13/16] per-vcpu lguest task management

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:53 Glauber de Oliveira Costa wrote: @@ -114,6 +116,19 @@ static int vcpu_start(struct lguest_vcpu *vcpu, int vcpu_id, * address. */ lguest_arch_setup_regs(vcpu, start_ip); + /* Initialize the queue for the waker to wait on */ +

Re: [PATCH 09/16] map_switcher_in_guest() per-vcpu

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:49 Glauber de Oliveira Costa wrote: The switcher needs to be mapped per-vcpu, because different vcpus will potentially have different page tables (they don't have to, because threads will share the same). So our first step is the make the function receive a

Re: [PATCH 0/16] lguest: introduce vcpu structure

2007-12-25 Thread Rusty Russell
On Friday 21 December 2007 00:33:40 Glauber de Oliveira Costa wrote: this patch makes room for the vcpu structure in lguest, already used in this very same way at lguest64. It's the first part of our plan to have lguest and lguest64 unified too. Hi Glauber! These patches look really

Re: virtio_net and SMP guests

2007-12-25 Thread Rusty Russell
On Tuesday 25 December 2007 23:22:37 Dor Laor wrote: btw: I checked your Linux tree and found it a bit old, there was no tx coalescing timer, it's probably good for 2.6.24. Do you plan to post patchset for 25 windows? Thanks, Dor Hmm, should be updated now. Will be pushing all these virtio

Re: virtio_net and SMP guests

2007-12-23 Thread Rusty Russell
On Monday 24 December 2007 10:19:19 Dor Laor wrote: Rusty Russell wrote: Looks good to me. The only thing is the naming.. Maybe one can find better name than [dis|en]able_cb since it is more like disable interrupts than disable_cb and enable_cb is more like run_callbacks (and enable

Re: [kvm-devel] [Virtio-for-kvm] [PATCH 13/13] [Mostly resend] virtio additions

2007-12-21 Thread Rusty Russell
On Saturday 22 December 2007 02:27:33 Dor Laor wrote: From 9f5a551d7e2a00eb019b158f8f3130e8176ec27c Mon Sep 17 00:00:00 2001 From: Dor Laor [EMAIL PROTECTED] Date: Mon, 17 Dec 2007 01:40:15 +0200 Subject: [PATCH] Update all status fields on driver unload OK, looks like I missed the last 4

Re: [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-17 Thread Rusty Russell
On Wednesday 12 December 2007 23:54:00 Dor Laor wrote: commit 763769621d271d92204ed27552d75448587c1ac0 Author: Dor Laor [EMAIL PROTECTED] Date: Wed Dec 12 14:52:00 2007 +0200 [virtio-net][PATCH] Don't arm tx hrtimer with a constant 50us each transmit The current start_xmit sets

Re: [PATCH 13/21] [PATCH] change bitwise operations to get a void parameter.

2007-12-17 Thread Rusty Russell
On Tuesday 18 December 2007 09:52:36 Glauber de Oliveira Costa wrote: This patch changes the bitwise operations in bitops.h to get a void pointers as a parameter. Before this patch, a lot of warnings can be seen. They're gone after it. No, this is a backwards step! These warnings are

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-17 Thread Rusty Russell
on open. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 1dd61213039c drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Tue Dec 18 17:34:18 2007 +1100 +++ b/drivers/net/virtio_net.c Tue Dec 18 17:47:39 2007 +1100 @@ -326,6 +326,13 @@ static int virtnet_open(struct net_devic

Re: virtio_net and SMP guests

2007-12-17 Thread Rusty Russell
that virtio_net wants to disable callbacks (interrupts) before calling netif_rx_schedule(), so we can't use the return value to do so. Rename restart to cb_enable and introduce cb_disable hook: callback now returns void, rather than a boolean. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r

Re: [kvm-devel] [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-17 Thread Rusty Russell
On Tuesday 18 December 2007 16:30:08 Avi Kivity wrote: Rusty Russell wrote: Yes, I pondered this when I wrote the code. On the one hand, it's a low-probability pathological corner case, on the other, your patch reduces the number of timer reprograms in the normal case. One thing

Re: [PATCH resend] virtio_net: remove double ether_setup

2007-12-11 Thread Rusty Russell
On Tuesday 11 December 2007 22:38:53 Christian Borntraeger wrote: Hello Rusty, this is a small fix for virtio_net. virtnet_probe already calls alloc_etherdev, which calls ether_setup. There is no need to do that again. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Acked-by: Rusty

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-11 Thread Rusty Russell
On Wednesday 12 December 2007 00:16:12 Christian Borntraeger wrote: That would also work. We already have VRING_AVAIL_F_NO_INTERRUPT in virtio_ring.c - maybe we can use that. Its hidden in callback and restart handling, what about adding an explicit startup? Yes, I debated whether to make this

[PATCH] lguest: Fix uninitialized members in example launcher

2007-11-18 Thread Rusty Russell
Thanks valgrind! Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 1041aeb944b2 Documentation/lguest/lguest.c --- a/Documentation/lguest/lguest.c Tue Nov 13 15:11:06 2007 +1100 +++ b/Documentation/lguest/lguest.c Thu Nov 15 13:28:48 2007 +1100 @@ -1040,6 +1040,11 @@ static void

[PATCH] virtio: fix module/device unloading

2007-11-18 Thread Rusty Russell
The virtio code never hooked through the -remove callback. Although noone supports device removal at the moment, this code is already needed for module unloading. This of course also revealed bugs in virtio_blk, virtio_net and lguest unloading paths. Signed-off-by: Rusty Russell [EMAIL

[PATCH 2/2] virtio: free transmit skbs when notified, not on next xmit.

2007-11-18 Thread Rusty Russell
This fixes a potential dangling xmit problem. We also suppress refill interrupts until we need them. (Anthony and I have been working on performance recently, so this is a WIP). Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 586fb6ff29dd drivers/net/virtio_net.c --- a/drivers/net

[PATCH 1/2] virtio: fix net driver loop case where we fail to restart

2007-11-18 Thread Rusty Russell
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10

[PULL] virtio, lguest and module comment fixes

2007-11-18 Thread Rusty Russell
master Matti Linnanvuori (1): module: fix and elaborate comments Rusty Russell (3): lguest: Fix uninitialized members in example launcher virtio: fix module/device unloading virtio: fix net driver loop case where we fail to restart Documentation/lguest/lguest.c |9

Re: [PATCH] Remove pagesize parameter from vring_init/vring_size

2007-11-14 Thread Rusty Russell
On Thursday 15 November 2007 03:06:43 Anthony Liguori wrote: The PAGE_SIZE constant should be used instead of taking an extra parameter. Moreover, once we use PAGE_SIZE, we can use PAGE_ALIGN() instead of having it open coded. Unfortunately this is exposed to userspace. I should probably add

[PATCH] virtio: fix module/device unloading

2007-11-12 Thread Rusty Russell
The virtio code never hooked through the -remove callback. Although noone supports device removal at the moment, this code is already needed for module unloading. This of course also revealed bugs in virtio_blk, virtio_net and lguest unloading paths. Signed-off-by: Rusty Russell [EMAIL

[PULL] lguest and virtio fixes

2007-11-11 Thread Rusty Russell
for-linus Anthony Liguori (3): virtio: fix vring_init for 64 bits virtio: Fix used_idx wrap-around lguest: Fix lguest virtio-blk backend size computation Rusty Russell (2): virtio: more fallout from scatterlist changes. virtio: Force use of power-of-two for descriptor

Re: [PATCH] virtio config_ops refactoring

2007-11-10 Thread Rusty Russell
On Saturday 10 November 2007 10:45:38 Anthony Liguori wrote: The problem is the ABI. We can either require that PCI configuration values are accessed with natural instructions, or it makes very little sense to use the PCI configuration space for virtio configuration information. To me it

Re: [PATCH] virtio config_ops refactoring

2007-11-09 Thread Rusty Russell
On Friday 09 November 2007 09:33:04 Anthony Liguori wrote: I really want to make sure that if a guest tries to read a 4-byte PCI config field, that it does so using an outl instruction so that in my QEMU backend So you want to enforce PCI requirements onto virtio config accesses. This

Re: [PATCH] virtio config_ops refactoring

2007-11-08 Thread Rusty Russell
On Thursday 08 November 2007 13:41:16 Anthony Liguori wrote: Rusty Russell wrote: On Thursday 08 November 2007 04:30:50 Anthony Liguori wrote: I would prefer that the virtio API not expose a little endian standard. I'm currently converting config-get() ops to ioreadXX depending

Re: [PATCH][VIRTIO] Fix vring_init() ring computations

2007-11-07 Thread Rusty Russell
On Thursday 08 November 2007 12:06:07 Anthony Liguori wrote: Rusty Russell wrote: On Wednesday 07 November 2007 13:52:29 Anthony Liguori wrote: This patch fixes a typo in vring_init(). Thanks, applied. I've put it in the new, experimental virtio git tree on git.kernel.org. Hrm

Re: [PATCH] virtio config_ops refactoring

2007-11-07 Thread Rusty Russell
On Thursday 08 November 2007 04:30:50 Anthony Liguori wrote: I would prefer that the virtio API not expose a little endian standard. I'm currently converting config-get() ops to ioreadXX depending on the size which already does the endianness conversion for me so this just messes things up. I

Re: virtio config_ops refactoring

2007-11-06 Thread Rusty Russell
On Wednesday 07 November 2007 04:48:35 Anthony Liguori wrote: Semantically, find requires that a field have both a type and a length. With the exception of the VIRTQUEUE field used internally by lguest, type is always a unique identifier. Since virtqueue information is not a required part of

Re: [git pull] lguest: paravirt boot code

2007-10-24 Thread Rusty Russell
On Wednesday 24 October 2007 02:10:21 Linus Torvalds wrote: On Tue, 23 Oct 2007, Rusty Russell wrote: Well, with that out the way, and some scatterlist fixups, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest.git Ok. However, please include

Re: [git pull] lguest: paravirt boot code

2007-10-23 Thread Rusty Russell
On Tuesday 23 October 2007 12:28:32 Linus Torvalds wrote: On Mon, 22 Oct 2007, Rusty Russell wrote: First attempt at git, so please pull carefully. I've just put the three i386 boot changes in the repo for the moment. If this works I'll pile on the 44 lguest patches. Well, it looked

Re: [git pull] lguest: paravirt boot code

2007-10-23 Thread Rusty Russell
On Tuesday 23 October 2007 16:55:06 Christian Borntraeger wrote: Having virtio in Linus tree would make my life easier wiring it up for virtualization on s390. Indeed. And given lguest's lack of interface guarantees, it make sense to use it as the first virtio guinea pig. I expect changes as

[git pull] lguest: paravirt boot code

2007-10-21 Thread Rusty Russell
simply do the normal boot sequence. Signed-off-by: Jeremy Fitzhardinge [EMAIL PROTECTED] Signed-off-by: Rusty Russell [EMAIL PROTECTED] Acked-by: H. Peter Anvin [EMAIL PROTECTED] Cc: Eric W. Biederman [EMAIL PROTECTED] Cc: Vivek Goyal [EMAIL PROTECTED] Cc: James Bottomley

<    8   9   10   11   12   13   14   15   >