Re: [kvm-devel] [PATCH] virtio_blk: allow read-only disks

2008-05-16 Thread Rusty Russell
On Friday 16 May 2008 19:28:27 Tomasz Chmielewski wrote: > Christian Borntraeger schrieb: > > Hello Rusty, > > > > sometimes it is useful to share a disk (e.g. usr). To avoid file system > > corruption, the disk should be mounted read-only in that case. > > Although it is done at a different level

Re: [kvm-devel] [PATCH] virtio_blk: allow read-only disks

2008-05-16 Thread Rusty Russell
On Friday 16 May 2008 19:17:03 Christian Borntraeger wrote: > Hello Rusty, > > sometimes it is useful to share a disk (e.g. usr). To avoid file system > corruption, the disk should be mounted read-only in that case. This patch > adds a new feature flag, that allows the host to specify, if the disk

Re: [kvm-devel] [PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly

2008-05-08 Thread Rusty Russell
On Thursday 08 May 2008 23:20:38 Christian Borntraeger wrote: > Changing stop_machine to yield the cpu to the hypervisor when yielding > inside the guest fixed the problem for me. While I am not completely happy > with this patch, I think it causes no harm and it really improves the > situation for

Re: [kvm-devel] s390 kvm_virtio.c build error

2008-05-04 Thread Rusty Russell
te callbacks. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r 219d6c116996 drivers/s390/kvm/kvm_virtio.c --- a/drivers/s390/kvm/kvm_virtio.c Mon May 05 10:03:16 2008 +1000 +++ b/drivers/s390/kvm/kvm_virtio.c Mon May 05 10:17:25 2008 +1000 @@ -78,27 +78,34 @@ static un

Re: [kvm-devel] [PATCH/RFC] virtio: export more headers to userspace

2008-04-23 Thread Rusty Russell
On Wednesday 23 April 2008 20:57:00 Christian Borntraeger wrote: > Rusty, > > is there a reason why we dont export the virtio headers for > 9p, balloon, console, pci, and virtio_ring? kvm uses make sync, > but I think it is still useful to heave these headers exported > as they might be useful for

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-23 Thread Rusty Russell
On Wednesday 23 April 2008 20:55:50 Christian Borntraeger wrote: > Am Dienstag, 22. April 2008 schrieb Rusty Russell: > [...] > > > diff -r a098f19a6da5 include/linux/virtio_config.h > > --- a/include/linux/virtio_config.h Sun Apr 20 14:41:02 2008 +1000 > > +++ b/includ

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-22 Thread Rusty Russell
On Wednesday 23 April 2008 06:29:14 Hollis Blanchard wrote: > On Tuesday 22 April 2008 09:31:35 Rusty Russell wrote: > > We may still regret not doing *everything* little-endian, but this > > doesn't make it worse. > > Hmm, why *don't* we just do everything LE, incl

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-22 Thread Rusty Russell
On Tuesday 22 April 2008 17:44:08 Christian Borntraeger wrote: > Am Dienstag, 22. April 2008 schrieb Rusty Russell: > > [Christian, Hollis, how much is this ABI breakage going to hurt you?] > > It is ok for s390 at the moment. We are still working on making userspace > ready an

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-22 Thread Rusty Russell
On Tuesday 22 April 2008 21:22:48 Avi Kivity wrote: > > The virtio config space was originally chosen to be little-endian, > > because we thought the config might be part of the PCI config space > > for virtio_pci. It's actually a separate mmio region, so that > > argument holds little water; as o

Re: [kvm-devel] [PATCH 1 of 9] Lock the entire mm to prevent any mmu related operation to happen

2008-04-21 Thread Rusty Russell
On Wednesday 09 April 2008 01:44:04 Andrea Arcangeli wrote: > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1050,6 +1050,15 @@ > unsigned long addr, unsigned long len, > unsigned long flags, struct page **pages); > > +str

[kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-21 Thread Rusty Russell
API changes: - __virtio_config_val() just becomes a striaght vdev->config_get() call. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/block/virtio_blk.c |4 +-- drivers/virtio/virtio_balloon.c |6 ++--- include/linux/virtio_con

Re: [kvm-devel] [PATCH] add virtio disk geometry feature

2008-04-16 Thread Rusty Russell
try feature Date: Wed, 16 Apr 2008 13:56:37 -0500 From: Ryan Harper <[EMAIL PROTECTED]> Rather than faking up some geometry, allow the backend to push the disk geometry via virtio pci config option. Keep the old geo code around for compatibility. Signed-off-by: Ryan Harper <[EMAIL PROT

Re: [kvm-devel] kernel BUG at drivers/virtio/virtio_ring.c:218!

2008-04-06 Thread Rusty Russell
On Sunday 06 April 2008 00:53:39 Balaji Rao wrote: > On Friday 04 April 2008 01:46:21 pm Balaji Rao wrote: > > Hi Rusty, > > > > I hit a bug in virtio_ring.c:218 when I was stressing virtio_net using > > kvm with -smp 4. > > > > static void vring_disable_cb(struct virtqueue *_vq) > > { > >

Re: [kvm-devel] [PATCH] virtio-blk: allow more than one in-flight request

2008-03-27 Thread Rusty Russell
On Friday 28 March 2008 03:29:48 Marcelo Tosatti wrote: > Allow more than one in-flight request in the virtio ring. This allows > the host driver to submit requests in parallel. > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> For a moment, I thought this was true and felt very stupid :) Fo

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

2008-03-23 Thread Rusty Russell
On Friday 21 March 2008 01:11:35 Anthony Liguori wrote: > Rusty Russell wrote: > >There are three possible solutions: > > 1) Just offer the lowest common denominator to both sides (ie. no > > features). This is what I do with lguest in these patches. > > 2) Offer so

Re: [kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

2008-03-21 Thread Rusty Russell
On Friday 21 March 2008 19:15:47 Christian Borntraeger wrote: > Am Freitag, 21. März 2008 schrieb Rusty Russell: > > Hmm, panic on device_register fail, but -ENOMEM on add_shared_memory > > fail? My theory was that since this is boot time, panic() is the right > > thing. >

Re: [kvm-devel] [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 vi

Re: [kvm-devel] [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls

2008-03-20 Thread Rusty Russell
On Friday 21 March 2008 03:25:28 Carsten Otte wrote: > +static void kvm_set_status(struct virtio_device *vdev, u8 status) > +{ > + BUG_ON(!status); > + to_kvmdev(vdev)->desc->status = status; > +} > + > +/* > + * To reset the device, we (ab)use the NOTIFY hypercall, with the descriptor > +

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 notific

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. > >

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

2008-03-19 Thread Rusty Russell
ed on the flags 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

[kvm-devel] [RFC PATCH 4/5] lguest: ignore bad virtqueues.

2008-03-19 Thread Rusty Russell
Currently the lguest Launcher aborts when a Guest puts something bogus in a virtio queue. If we want to deal with other (untrusted) Guests' queues, that's a bad idea: simply print a warning and ignore it from now on. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- Docu

[kvm-devel] [RFC PATCH 3/5] lguest: separate out virtqueue info from device info.

2008-03-19 Thread Rusty Russell
To deal with other Guest's virtqueue, we need to separate out the parts of the structure which deal with the actual virtqueue from configuration information and the device. Then we can change the virtqueue descriptor handling functions to take that smaller structure. Signed-off-by: Rusty Ru

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

2008-03-19 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/lgue

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

2008-03-19 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/lgu

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

2008-03-19 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 s

Re: [kvm-devel] [PATCH] virtio_pci: unregister virtio device at device remove

2008-03-19 Thread Rusty Russell
On Thursday 20 March 2008 12:35:04 Anthony Liguori wrote: > Make sure to call unregister_virtio_device() when a virtio device is > removed. Otherwise, virtio_pci.ko cannot be rmmod'd. > > This was spotted by Marcelo Tosatti. > > Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> Thanks, applied.

Re: [kvm-devel] [PATCH] virtio-balloon: do not attempt to release more than available pages

2008-03-11 Thread Rusty Russell
On Tuesday 11 March 2008 11:52:46 Anthony Liguori wrote: > Rusty Russell wrote: > > 2) Handle the case where we get nonsense from the host, which causes us > > to wrap around. > > Here's my neither compiled nor tested version which should fix this > problem without bre

Re: [kvm-devel] [PATCH] virtio-balloon: do not attempt to release more than available pages

2008-03-10 Thread Rusty Russell
On Sunday 09 March 2008 06:06:38 Marcelo Tosatti wrote: > But making the driver robust against it seems sensate. I agree that > zeroing num_pages is hackish. What do you suggest? OK, after more discussion on IRC, this seems like the correct thing to do. 1) Allow more than 2G of pages. It doesn't

Re: [kvm-devel] [PATCH] virtio-balloon: do not attempt to release more than available pages

2008-03-05 Thread Rusty Russell
On Thursday 06 March 2008 03:28:32 Marcelo Tosatti wrote: > Handle the case where the balloon target is larger than total ram size. > > BUG: unable to handle kernel paging request at 00100100 > IP: [] :virtio_balloon:leak__balloon+0x2e/0xbe > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECT

Re: [kvm-devel] [PATCH] Use spin_lock_irqsave/restore for virtio-pci

2008-03-03 Thread Rusty Russell
On Monday 03 March 2008 09:37:48 Anthony Liguori wrote: > 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]>

Re: [kvm-devel] kvm-lite status

2008-03-02 Thread Rusty Russell
On Thursday 21 February 2008 10:24:57 Fabio Checconi wrote: > Hi, > what's the status of kvm-lite? Has anybody worked on it since > the last september posting[1]? Hi Fabio, No, not really. I'll have to drag it up to date again and submit it for merging so it doesn't keep bitrotting. Thank

Re: [kvm-devel] [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 vir

Re: [kvm-devel] [PATCH] QEMU support for virtio balloon driver

2008-01-25 Thread Rusty Russell
On Saturday 26 January 2008 03:08:57 Marcelo Tosatti wrote: > On Thu, Jan 24, 2008 at 04:29:51PM -0600, Anthony Liguori wrote: > > I'm inclined to think that we should have a capability check for MM > > notifiers and just not do madvise if they aren't present. I don't think > > the ioctl approach

Re: [kvm-devel] [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 d

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: Rus

Re: [kvm-devel] [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] [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 look

[kvm-devel] [PATCH 2/2] virtio reset support

2008-01-23 Thread Rusty Russell
t 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.

[kvm-devel] [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(-)

Re: [kvm-devel] [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 > >> t

[kvm-devel] [PATCH] virtio: remove explicit pci ids from virtio_pci.c

2008-01-20 Thread Rusty Russell
t that's the worst that can happen. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/virtio/virtio_pci.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff -r 4edff5e24614 drivers/virtio/virtio_pci.c --- a/drivers/virtio/virtio_pci.c Sun Jan 20

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

2008-01-16 Thread Rusty Russell
On Thursday 17 January 2008 15:01:46 Anthony Liguori wrote: > Rusty Russell wrote: > > OTOH it's currently pretty obvious (and usually fatal) if the guest has > > trouble meeting the balloon requirements. A serious host needs a way of > > detecting stress in the guest

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. > > +

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

2008-01-16 Thread Rusty Russell
eover, 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 + dri

Re: [kvm-devel] 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. - Check out the new SourceForge.net Marketplac

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

2008-01-08 Thread Rusty Russell
river may one day have a "carrier" status as well. This introduces 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/vir

Re: [kvm-devel] [RFC] Remove tx_timer from virtio_net

2008-01-07 Thread Rusty Russell
On Tuesday 08 January 2008 07:36:45 Anthony Liguori wrote: > Avi and I were talking this afternoon and he suggested that we should > remove the tx_timer from the virtio_net front-end and replace it with a > tx_timer in the backend. > > Since the backend can suppress notifications, this is appealing

Re: [kvm-devel] virtio_net backport performance

2008-01-07 Thread Rusty Russell
On Saturday 05 January 2008 09:24:40 Anthony Liguori wrote: > Hey Rusty et al, > > I've got automatic backports of the virtio modules[1] working back to > 2.6.18. Everything seems okay except that for any kernel with the older > NAPI api, performance is extremely bad. I get about 1gbit on TX with

Re: [kvm-devel] virtio_net backport performance

2008-01-04 Thread Rusty Russell
On Saturday 05 January 2008 09:24:40 Anthony Liguori wrote: > @@ -215,17 +231,40 @@ > struct virtnet_info *vi = rvq->vdev->priv; > /* Suppress further interrupts. */ > rvq->vq_ops->disable_cb(rvq); > +#ifdef COMPAT_napi > +   vi->rvq->vq_ops->enable_cb(vi->rvq); > + 

Re: [kvm-devel] [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: [kvm-devel] [PATCH 3/3] Use Qumranet donated PCI vendor/device IDs

2008-01-02 Thread Rusty Russell
On Thursday 03 January 2008 08:01:34 Anthony Liguori wrote: > Qumranet was kind enough to donate a set of vendor/device IDs for virtio > devices. This patch switches over to using them instead of an unreserved > vendor ID. > > Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> All applied, thanks

Re: [kvm-devel] 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 vir

Re: [kvm-devel] 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_callba

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

Re: [kvm-devel] [virtio-net][PATCH] Don't ar m 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 i

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

2007-12-17 Thread Rusty Russell
process the input queue once 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

Re: [kvm-devel] virtio_net and SMP guests

2007-12-17 Thread Rusty Russell
rn. It seems 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 bool

Re: [kvm-devel] [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_xm

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 th

Re: [kvm-devel] [PATCH resend] virtio_net: remove double ether_setup

2007-12-11 Thread Rusty Russell
EMAIL PROTECTED]> Acked-by: Rusty Russell <[EMAIL PROTECTED]> Can you send straight to akpm or davem? I'm supposed to be on vacation at the moment (and not doing a very good job :) Thanks, Rusty. - SF.Net em

Re: [kvm-devel] [PATCH 7/24] consolidate msr.h

2007-11-20 Thread Rusty Russell
On Tuesday 20 November 2007 17:16:45 Steven Rostedt wrote: > On Tue, 20 Nov 2007, Ingo Molnar wrote: > > i dont think there's ever any true need (and good cause) to force > > integer type casts like that at the callee site. > > Unless you mean we should do something like this: > > static inline voi

Re: [kvm-devel] [PATCH 2/6] virtio block driver for QEMU (v2)

2007-11-12 Thread Rusty Russell
On Tuesday 13 November 2007 10:25:54 Anthony Liguori wrote: > Dor Laor wrote: > > Anthony Liguori wrote: > >> Dor Laor wrote: > >>> In general I think we need to add another feature or even version > >>> number ( I know you guys hate it). > >>> The reason is - Let's say you dont change functionalit

Re: [kvm-devel] [PATCH] raise tsc clocksource rating

2007-10-30 Thread Rusty Russell
On Tuesday 30 October 2007 18:37:36 Ingo Molnar wrote: > * Rusty Russell <[EMAIL PROTECTED]> wrote: > > No. tsc is very good, it's not perfect. If a paravirt clock > > registers 400 it really means "pick me over the tsc". > > often the TSC is not

Re: [kvm-devel] [PATCH] raise tsc clocksource rating

2007-10-29 Thread Rusty Russell
On Tuesday 30 October 2007 09:17:38 Thomas Gleixner wrote: > On Mon, 29 Oct 2007, Glauber de Oliveira Costa wrote: > > CC'ed John and removed [EMAIL PROTECTED] :) > > > From: Glauber de Oliveira Costa <[EMAIL PROTECTED]> > > > > tsc is very good time source (when it does not have drifts, does not >

[kvm-devel] [PATCH 3/3] Remove gratuitous casts from lapic.c

2007-10-07 Thread Rusty Russell
Since vcpu->apic is of the correct type, there's not need to cast. Perhaps this will be required in future? Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c index 27e6249..68aa9e4 100644 --- a/drivers/kvm/lapic.c +++ b/drive

[kvm-devel] [PATCH 2/3] Hoist kvm_create_lapic() into kvm_vcpu_init()

2007-10-07 Thread Rusty Russell
Move kvm_create_lapic() into kvm_vcpu_init(), rather than having svm and vmx do it. And make it return the error rather than a fairly random -ENOMEM. This also solves the problem that neither svm.c nor vmx.c actually handles the error path properly. Signed-off-by: Rusty Russell <[EM

[kvm-devel] [PATCH 1/3] kvm_free_lapic() to pair with kvm_create_lapic()

2007-10-07 Thread Rusty Russell
t set apic->regs_page to zero before freeing apic. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h index 11fc014..508280e 100644 --- a/drivers/kvm/irq.h +++ b/drivers/kvm/irq.h @@ -139,7 +139,7 @@ int kvm_apic_accept_pic_intr(struct kv

[kvm-devel] [PATCH] Script to help check compatibility against a range of kernels.

2007-10-02 Thread Rusty Russell
This makes it easier to check kvm-userspace compatibility layer. --- check-compat.sh | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) create mode 100755 check-compat.sh diff --git a/check-compat.sh b/check-compat.sh new file mode 100755 index 000..c07be4

[kvm-devel] Backwards compat for < 2.6.16?

2007-10-02 Thread Rusty Russell
Hi all, The lapic code uses ktime_t and hrtimers, which means we no longer build for kernels 2.6.15 and below. Is it worth trying to fake this infrastructure up, building without lapic, or abandoning < 2.6.16? Thanks, Rusty. -

Re: [kvm-devel] [RFC] KVM Source layout Proposal to accommodate new CPU architecture

2007-10-01 Thread Rusty Russell
On Tue, 2007-10-02 at 01:01 -0500, Hollis Blanchard wrote: > On Tue, 2007-10-02 at 14:11 +1000, Rusty Russell wrote: > > On Tue, 2007-10-02 at 01:19 +, Hollis Blanchard wrote: > > > On Sun, 30 Sep 2007 15:56:16 +0200, Avi Kivity wrote: > > > > > > > &

[kvm-devel] [PATCH] kvm-userspace: fix kzalloc macro

2007-10-01 Thread Rusty Russell
This was committed in 1d55c096cce99f069d9ac8e3b2195d45adce9549 on Feb 7, and clearly never actually compiled. --- kernel/external-module-compat.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 2e

Re: [kvm-devel] [RFC] KVM Source layout Proposal to accommodate new CPU architecture

2007-10-01 Thread Rusty Russell
On Tue, 2007-10-02 at 01:19 +, Hollis Blanchard wrote: > On Sun, 30 Sep 2007 15:56:16 +0200, Avi Kivity wrote: > > > > Eventually I'd like to see the code in arch/*/kvm. That's probably not > > easily doable right now because modules cannot span directories, but > > once that's solved, we'l

Re: [kvm-devel] [RFC] KVM Source layout Proposal to accommodate new CPU architecture

2007-09-29 Thread Rusty Russell
On Thu, 2007-09-27 at 11:18 +0200, Avi Kivity wrote: > The whole drivers/kvm/ thing was just a trick to get merged quickly. I > think the new layout should be something like > > virt/kvm/, include/linux/kvm*.h -> common code > virt/lguest/ -> the other hypervisor > virt/virtio/ -> shared I/

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-25 Thread Rusty Russell
On Tue, 2007-09-25 at 19:15 +0200, Dor Laor wrote: > At the moment it's not good enough, there is a potential race were the > guest optimistically turn off > the VRING_AVAIL_F_NO_INTERRUPT in the vring_restart and afterwards > finds there are more_used so > it consume them in the poll function. >

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-25 Thread Rusty Russell
On Mon, 2007-09-24 at 15:44 +0200, Dor Laor wrote: > Rusty Russell wrote: > > +irqreturn_t vring_interrupt(int irq, void *_vq) > > +{ > > + struct vring_virtqueue *vq = to_vvq(_vq); > > + > > + pr_debug("virtqueue interrupt for %p\n", vq)

Re: [kvm-devel] [PATCH 1/3] virtio interface

2007-09-25 Thread Rusty Russell
On Tue, 2007-09-25 at 08:36 +0200, Arnd Bergmann wrote: > On Tuesday 25 September 2007, Rusty Russell wrote: > > I don't mind: we could expose it. > > What I mean with setting the parent appropriately is not to have a global > device that is used by the hv-specific probing

Re: [kvm-devel] [PATCH 3/3] virtio module alias support

2007-09-24 Thread Rusty Russell
On Mon, 2007-09-24 at 18:57 -0700, Greg KH wrote: > On Tue, Sep 25, 2007 at 10:50:04AM +1000, Rusty Russell wrote: > > Not sure why I need the modalias here when it's in sysfs. But, it > > works. > > udev does not read from sysfs anymore, it just uses the environment

Re: [kvm-devel] [PATCH 3/3] virtio module alias support

2007-09-24 Thread Rusty Russell
On Mon, 2007-09-24 at 09:02 -0700, Greg KH wrote: > On Mon, Sep 24, 2007 at 07:16:34PM +1000, Rusty Russell wrote: > > This adds the logic to convert the virtio ids into module aliases, and > > includes a modalias entry in sysfs. > > > > Unfortunately this does not

Re: [kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-24 Thread Rusty Russell
On Mon, 2007-09-24 at 15:44 +0200, Dor Laor wrote: > Seems like there is a problem with shared irq line, the interrupt > handler always returns IRQ_HANDLED (except for the trivial case > were the callback is null). > > It can be solved by having a host irq counter (in the shared ring) and > a guest

Re: [kvm-devel] [PATCH 1/3] virtio interface

2007-09-24 Thread Rusty Russell
On Tue, 2007-09-25 at 00:18 +0200, Arnd Bergmann wrote: > On Monday 24 September 2007, Rusty Russell wrote: > > This attempts to implement a "virtual I/O" layer which should allow > > common drivers to be efficiently used across most virtual I/O > > mechanisms.

[kvm-devel] [PATCH 3/3] virtio module alias support

2007-09-24 Thread Rusty Russell
This adds the logic to convert the virtio ids into module aliases, and includes a modalias entry in sysfs. Unfortunately this does not seem sufficient to have the module autoprobed at startup on my Ubuntu system. Greg? Am I missing some udev magic? Signed-off-by: Rusty Russell <[EM

[kvm-devel] [PATCH 2/3] virtio ring implementation

2007-09-24 Thread Rusty Russell
(KVM wants the guest to allocate the rings, lguest does it sanely). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- arch/i386/lguest/Kconfig |1 drivers/virtio/Kconfig |5 drivers/virtio/Makefile |1 drivers/virtio/virtio_ring.c

[kvm-devel] [PATCH 1/3] virtio interface

2007-09-24 Thread Rusty Russell
rupt" callbacks are invoked. There is also a generic implementation of config space which drivers can query to get setup information from the host. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/Kconfig |2 drivers/Makefile|

[kvm-devel] [PATCH 0/3] virtio implementation (draft VI)

2007-09-24 Thread Rusty Russell
I'm not reposting the drivers this time since they haven't changed significantly. See http://lguest.ozlabs.org/patches for the whole thing, from new-io.patch onwards). Changes since last version: - Switch to our own bus implementation, rather than relying on an implementation-sp

Re: [kvm-devel] [PATCH 6/6] virtio ring helper

2007-09-23 Thread Rusty Russell
On Sun, 2007-09-23 at 12:05 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > On Thu, 2007-09-20 at 14:43 +0200, Avi Kivity wrote: > >> 32 bits of page numbers give 44 bits of physical address on x86. That's > >> 16TB per guest. Admittedly it's smaller

Re: [kvm-devel] [PATCH 1/6] virtio interace

2007-09-23 Thread Rusty Russell
On Sat, 2007-09-22 at 12:01 +0200, Arnd Bergmann wrote: > On Saturday 22 September 2007, Rusty Russell wrote: > > But now each virtio device has two "struct device"s, not one. And > > you've made up a fictional bus to do it. > > > > Yet for PCI syst

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-23 Thread Rusty Russell
On Fri, 2007-09-21 at 16:42 +0200, Christian Borntraeger wrote: > Am Freitag, 21. September 2007 schrieb Herbert Xu: > > Please don't use LLTX in new drivers. We're trying to get rid > > of it since it's > > > > 1) unnecessary; > > 2) causes problems with AF_PACKET seeing things twice. > > Ok, b

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-22 Thread Rusty Russell
On Fri, 2007-09-21 at 14:27 +0200, Jens Axboe wrote: > On Fri, Sep 21 2007, Rusty Russell wrote: > > I shall look through the code and see if I can figure out how to fix it. > > I'm assuming from your response that there's not some strange reason to > > preserve cu

Re: [kvm-devel] [PATCH -rc][RESEND] KVM: Fix virtualization menu help text

2007-09-22 Thread Rusty Russell
On Sat, 2007-09-22 at 14:43 +0200, Avi Kivity wrote: > What guest drivers? > > Cc: Jan Engelhardt <[EMAIL PROTECTED]> > Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Yes, agreed. Rusty. - This SF.net email is sponsored by

Re: [kvm-devel] [PATCH 1/6] virtio interace

2007-09-22 Thread Rusty Russell
On Fri, 2007-09-21 at 16:22 +0200, Arnd Bergmann wrote: > On Friday 21 September 2007, Rusty Russell wrote: > > Hmm, I guess we could have a PCI driver which claims all VIRTIO vendor > > devices. > > yes, that was the idea. > > > Then it can call virtio_find_

Re: [kvm-devel] [PATCH 1/6] virtio interace

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 14:05 +0200, Arnd Bergmann wrote: > On Thursday 20 September 2007, Rusty Russell wrote: > > +int register_virtio_driver(struct virtio_driver *drv); > > +void unregister_virtio_driver(struct virtio_driver *drv); > > + > > +/* The particular vi

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 13:47 +0200, Jens Axboe wrote: > On Fri, Sep 21 2007, Rusty Russell wrote: > > On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > > > We have end_queued_request(), lets add end_dequeued_request(). Below. > > > > OK, thanks, I

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 12:48 +0200, Christian Borntraeger wrote: > Am Donnerstag, 20. September 2007 schrieb Rusty Russell: > > The network driver uses *two* virtqueues: one for input packets and > > one for output packets. This has nice locking properties (ie. we > > don'

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:27 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > The block driver uses scatter-gather lists with sg[0] being the > > request information (struct virtio_blk_outhdr) with the type, sector > > and inbuf id. The next N sg entri

Re: [kvm-devel] [PATCH 1/6] virtio interace

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:27 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > +struct virtio_backend_ops virtio_backend_ops; > > +EXPORT_SYMBOL_GPL(virtio_backend_ops); > > Suggest calling this virtio_transport_ops rather than the too-generic > virtio_backend_ops. E

Re: [kvm-devel] [PATCH 0/6] virtio with config abstraction and ring implementation

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 15:43 +0200, Dor Laor wrote: > Rusty Russell wrote: > > Drivers now unpack their own configuration: their probe() methods > > are > > uniform. The configuration mechanism is extensible and can be backed by > > PCI, a string of bytes, o

Re: [kvm-devel] [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > +static void end_dequeued_request(struct request *req, > > +struct request_queue *q, int uptodate) > > +{ > > + /* And so the insanity of

Re: [kvm-devel] [PATCH 6/6] virtio ring helper

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:43 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > These helper routines supply most of the virtqueue_ops for hypervisors > > which want to use a ring for virtio. Unlike the previous lguest > > implementation: > > > > 3) The page numb

Re: [kvm-devel] [PATCH 2/6] virtio_config

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:55 +0200, Avi Kivity wrote: > Avi Kivity wrote: > > Rusty Russell wrote: > >> Previous versions of virtio didn't commonalize probing. For every > >> driver, every virtio implementation (KVM, lguest, etc) needed an > >> in-kernel

  1   2   3   >