[PATCH] virtio_net/virtio_ring: fix race in enable_cb

2008-03-14 Thread Christian Borntraeger
the caller to do the cleanup if it returns false. In that case, the interrupt is only disabled, if the napi test_set_bit was successful. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c |6 +- drivers/virtio/virtio_ring.c |1 - 2 files chan

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

2008-03-16 Thread Christian Borntraeger
> Are you seeing the "Unlikely: restart svq failed" message in the logs? If > not, I don't think it can be this race. No, I dont see the message, but this message only happens for guest->host traffic in the xmit function. I was fixing the poll function - which has no printk. I added the disabl

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

2008-03-17 Thread Christian Borntraeger
Am Montag, 17. März 2008 schrieb Rusty Russell: > > > Are you seeing the "Unlikely: restart svq failed" message in the logs? [...] > Interesting you don't see this. Or is it just on that load that you don't > see it? Dont know. I have never seen it under my test load. Christian ___

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

2008-03-21 Thread Christian Borntraeger
Am Freitag, 21. März 2008 schrieb Rusty Russell: > I'd recommend a hypercall after set_status, as well as reset. The > reason lguest doesn't do this is that we don't do feature negotiation > (assuming guest kernel matches host kernel). In general, the host > needs to know when the VIRTIO_CONFIG_S

Re: [RFC/PATCH 05/15 v3] kvm-s390: s390 arch backend for the kvm kernel module

2008-04-02 Thread Christian Borntraeger
Am Montag, 31. März 2008 schrieb Arnd Bergmann: Hello Arnd, thanks for the review. > On Tuesday 25 March 2008, Carsten Otte wrote: > > > + > > +static inline void __user *__guestaddr_to_user(struct kvm_vcpu *vcpu, > > + u64 guestaddr) > > +{ > > + u64

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

2008-04-22 Thread Christian Borntraeger
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 and I plan to change the guest<->host for s390 anyway. I try to make these changes for driver

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

2008-04-23 Thread Christian Borntraeger
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/include/linux/virtio_config.h Sun Apr 20 15:07:45 2008 +1000 > @@ -16,7 +16,7 @@ > #define VIRTIO_CONFIG_S_

[PATCH/RFC] virtio: export more headers to userspace

2008-04-23 Thread Christian Borntraeger
to have useful information for userspace and it requires scatterlist.h which is also not exported. See also my other mail about your "virtio: change config to guest endian." patch. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- include/linux/Kbuild |5 + 1

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

2008-04-23 Thread Christian Borntraeger
Am Mittwoch, 23. April 2008 schrieb Avi Kivity: > >> #define VIRTIO_CONFIG_S_FAILED0x80 > >> > >> #ifdef __KERNEL__ > >> -struct virtio_device; > >> +#include > >> > > > > I just realized, that this breaks make headers_check as we dont export > > virtio.h (and we dont want to e

[PATCH/RFC] stop_machine: make stop_machine_run more virtualization friendly

2008-05-08 Thread Christian Borntraeger
the situation for me. I used cpu_relax for yielding to the hypervisor, does that work on all architectures? p.s.: If you want to reproduce the problem, cpu hotplug and kprobes use stop_machine_run and both triggered the problem after some retries. Signed-off-by: Christian Borntraeger <

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

2008-05-08 Thread Christian Borntraeger
Am Donnerstag, 8. Mai 2008 schrieb Jeremy Fitzhardinge: > Christian Borntraeger wrote: > > On kvm I have seen some rare hangs in stop_machine when I used more guest > > cpus than hosts cpus. e.g. 32 guest cpus on 1 host cpu triggered the > > hang quite often. I could also rep

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

2008-05-08 Thread Christian Borntraeger
Am Donnerstag, 8. Mai 2008 schrieb Jeremy Fitzhardinge: > > Sorry, forgot to mention. Its kvm.git from 2 days ago on s390. > > > > And on s390 cpu_relax yields the vcpu? That's not common behaviour > across architectures. Yes, cpu_relax on s390 calls diagnose 44. Diagnose 44 translates to y

Re: Virt RNG?

2008-05-15 Thread Christian Borntraeger
Am Donnerstag, 15. Mai 2008 schrieb Jeff Garzik: > Has anyone yet written a "hw" RNG module for virt, that reads the host's > random number pool? > > All this talk[1] about IRQF_SAMPLE_RANDOM in network drivers reminds me > that virt guest instances should be grabbing random numbers from the >

Re: [PATCH 1/2] virtio: hardware random device

2008-05-16 Thread Christian Borntraeger
|8 ++ > 4 files changed, 162 insertions(+) Acked-by: Christian Borntraeger <[EMAIL PROTECTED]> ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization

[PATCH] virtio_blk: allow read-only disks

2008-05-16 Thread Christian Borntraeger
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 should be considered read-only. Signed-off-by: Christian

Re: [PATCH 2/2] lguest: virtio-rng support

2008-05-17 Thread Christian Borntraeger
Am Samstag, 17. Mai 2008 schrieb Herbert Xu: > On Sat, May 17, 2008 at 04:28:03PM +1000, Rusty Russell wrote: > > > > But you did not address the DoS question: can we ignore it? Or are we trading > > off a DoS in the host against a potential security weakness in the guest? > > Why not do both?

Re: [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]

2008-05-22 Thread Christian Borntraeger
emselves. This does that for s/390. > > Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> > Cc: Christian Borntraeger <[EMAIL PROTECTED]> > Cc: Martin Schwidefsky <[EMAIL PROTECTED]> > Cc: Carsten Otte <[EMAIL PROTECTED]> > Cc: Heiko Carstens <[EMAIL P

Re: [PATCH/RFC] virtio_blk: check for hardsector size from host

2008-05-29 Thread Christian Borntraeger
Am Donnerstag, 29. Mai 2008 schrieb Rusty Russell: > On Tuesday 27 May 2008 19:04:59 Christian Borntraeger wrote: > > Rusty, Jens, > > > > I need your opinion on the following patch. It seems to work, but I would > > like to get some feedback if this patch is the righ

Re: [PATCH/RFC] virtio_blk: check for hardsector size from host

2008-05-29 Thread Christian Borntraeger
Am Donnerstag, 29. Mai 2008 schrieb Jens Axboe: > > > Just that u64 seems like overkill: u32? > > > > Definitely, u32 would be just fine, u64 is way overkill :-) > > Even u16 would work, the block layer doesn't use more than an unsigned > short for storing hardware sector size anyway. Thanks, go

[PATCH v2] virtio_blk: check for hardsector size from host

2008-05-29 Thread Christian Borntraeger
size than 512 byte. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/block/virtio_blk.c | 10 +- include/linux/virtio_blk.h |3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) Index: kvm/drivers/block/virtio

[PATCH] virtio_config: fix len calculation of config elements

2008-05-29 Thread Christian Borntraeger
Rusty, This patch is a prereq for the virtio_blk blocksize patch, please apply it first. Adding an u32 value to the virtio_blk_config unconvered a small bug the config space defintions: v is a pointer, to we have to use sizeof(*v) instead of sizeof(v). Signed-off-by: Christian Borntraeger

[PATCH] virtio_blk: fix endianess annotations

2008-05-29 Thread Christian Borntraeger
Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config to guest endian) config space is no longer fixed endian. Lets change the virtio_blk_config variables. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- include/linux/virtio_blk.h |8

Re: [PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty

2008-05-30 Thread Christian Borntraeger
Am Freitag, 30. Mai 2008 schrieb Rusty Russell: > It turns out that life is simpler if the host similarly ignores > callback suppression when the ring is completely empty: the network > driver wants to free up old packets in a timely manner, and otherwise > has to use a timer to poll. > > We have

[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-03 Thread Christian Borntraeger
re found via hp->ops. Feedback is appreciated. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/char/Kconfig |8 drivers/char/Makefile |1 drivers/char/hvc_console.c | 80 ++--- driv

[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-03 Thread Christian Borntraeger
re found via hp->ops. Feedback is appreciated. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> CC: Rusty Russell <[EMAIL PROTECTED]> CC: Jeremy Fitzhardinge <[EMAIL PROTECTED]> CC: LKML <[EMAIL PROTECTED]> CC: Virtualization Mailing List <[EMAIL PROTECTED]>

[RFC 2/3] virtio_console: use virtqueue notification for hvc_console

2008-06-03 Thread Christian Borntraeger
This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. Signed-off-by: Christian Borntraeger <[EMAIL PROTEC

[RFC 0/3]: hvc_console rework for platform without hard irqs

2008-06-03 Thread Christian Borntraeger
This patch set if my first attempt to make virtio_console usable on s390. To do so, I had to change hvc_console, because s390 has no request_irq and no free_irq. I want to get feedback from the main users of hvc_console before I proceed. The basic idea of this patch set is to remove the calls to r

[RFC 3/3] s390: use virtio_console for KVM on s390

2008-06-03 Thread Christian Borntraeger
This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- arch/s390/K

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-04 Thread Christian Borntraeger
Am Dienstag, 3. Juni 2008 schrieb Arnd Bergmann: > I don't see a reason to make this data structure known to other files, > so why not leave it in hvc_console.c? Yes, Fixed. I moved it for a ealier version of this patch. Currently its not necessary. Dont know if I need to move it again if I work

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-04 Thread Christian Borntraeger
Am Mittwoch, 4. Juni 2008 schrieb Rusty Russell: > Two questions. Is it possible to make the timer backoff a third kind of > notifier? I can try. The timer handling code is sprinkled a bit in hvc_console but it should be possible. > And is it possible to make the dependency static, rather than

Re: [PATCH] virtio: don't always force a notification when ring is full

2008-06-19 Thread Christian Borntraeger
Am Donnerstag, 19. Juni 2008 schrieb Rusty Russell: > We force notification when the ring is full, even if the host has > indicated it doesn't want to know. This seemed like a good idea at > the time: if we fill the transmit ring, we should tell the host > immediately. > > Unfortunately this logi

[RFC 1/3 v2] hvc_console: rework setup to replace irq functions with callbacks

2008-06-20 Thread Christian Borntraeger
_console.h so that hvc_irq.c can access the irq_requested element. Feedback is appreciated. virtio_console is currently the only available console for kvm on s390. I plan to push this change as soon as all affected parties agree on it. I would love to get test results from System p, Xen etc. Signed-off-

[RFC 3/3 v2] s390: use virtio_console for KVM on s390

2008-06-20 Thread Christian Borntraeger
This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- arch/s390/K

[RFC 2/3 v2] virtio_console: use virtqueue notification for hvc_console

2008-06-20 Thread Christian Borntraeger
This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. Signed-off-by: Christian Borntraeger <[EMAIL PROTEC

Re: Multicast and receive filtering in TUN/TAP

2008-07-10 Thread Christian Borntraeger
Am Donnerstag, 10. Juli 2008 schrieb Max Krasnyansky: [...] > The second question is do you guys think that QEMU/KVM/LGUEST/etc would > benefit if receive filtering was done by the host OS. Here is a specific > example of what I'm talking about. > We can do what qemu/hw/e1000.c:receive_filter() d

Re: Multicast and receive filtering in TUN/TAP

2008-07-10 Thread Christian Borntraeger
Am Donnerstag, 10. Juli 2008 schrieb Max Krasnyansky: > > Thing is, we are heading towards virtio. > Even for Windows ? Its possible: http://marc.info/?l=kvm&m=121075389300722&w=2 > > > Unfortunately, virtio_net currently does not offer a method to register multicast addresses. > I haven't lo

Re: [PATCH] stopmachine: add stopmachine_timeout

2008-07-16 Thread Christian Borntraeger
Am Dienstag, 15. Juli 2008 schrieb Rusty Russell: > > btw Rusty, I just had this "why didn't I think of that" moments. This is > > actually another way of handling my workload. I mean it certainly does not > > fix the root case of the problems and we still need other things that we > > talked about

export virtio_rng.h

2008-08-08 Thread Christian Borntraeger
Hello Rusty, The entropy device was added after we exported all virtio headers. This patch adds virtio_rng.h to the exportable userspace headers. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- include/linux/Kbuild |1 + 1 file changed, 1 insertion(+) Index: linux-2.6/i

Re: [RFC] [PATCH] SCSI passthrough for virtio-blk

2008-08-29 Thread Christian Borntraeger
Am Freitag, 29. August 2008 schrieb Hannes Reinecke: > So when using '-drive file=/dev/sgXX,if=virtio,format=host_device' you > can happily call any sg_XX command on the resulting vdX device. Quite > neat, methinks. And it's even backwards compatible, so each of these > patches should work without

Re: [RFC] [PATCH] SCSI passthrough for virtio-blk

2008-08-29 Thread Christian Borntraeger
Am Freitag, 29. August 2008 schrieb Hannes Reinecke: > Hmm. Works here, using an unpatched kvm-73. > Which version did you use? I use the s390 userspace prototype kuli which uses an virtio transport similar to lguest. I retried and it seems to race. Most of the time it works fine, but sometimes

Re: [RFC] [PATCH] SCSI passthrough for virtio-blk

2008-08-29 Thread Christian Borntraeger
trace. Anyway, after you suggested to look at the len field it appeared to me, that the new code sets the data_len, sense_len and changes the number of reported bytes to random values even if the host returns VIRTIO_BLK_S_UNSUPP. Moving these assignments to the VIRTIO_BLK_S_OK case seems to fix it. Can you

Re: [RFC] [PATCH] SCSI passthrough for virtio-blk

2008-08-29 Thread Christian Borntraeger
Thanks for your feedback. Here is a second try to allows to propagate scsi error code from host->guest. Makes sense? Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/block/virtio_blk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: kvm/driv

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-13 Thread Christian Borntraeger
close+0xb4/0xdc >    [] .sys_close+0xac/0x100 >    [] syscall_exit+0x0/0x40 Hmmm. Can you try if this patch fixes the lockdep trace? This would be analog to commit b1b135c8d619cb2c7045d6ee4e48375882518bb5 Author: Christian Borntraeger <[EMAIL PROTECTED]> Date: Thu Aug 7 09:18:34 2008 +02

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-13 Thread Christian Borntraeger
Am Montag, 13. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > if (--hp->count == 0) { > > - if (hp->ops->notifier_del) > > - hp->ops->notifier_del(hp, hp->data); > > - > > /* We are done with the tty pointer now. */ > > hp->tty = NULL; >

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-10-14 Thread Christian Borntraeger
Am Dienstag, 14. Oktober 2008 schrieb Benjamin Herrenschmidt: > > > Hmmm. > > Can you try if this patch fixes the lockdep trace? > > Yup, the patch fixes it, I'll commit it via the powerpc.git tree if you > don't have any objection. Sure, go ahead. __

[RFC/PATCH 0/2] virtio console resize support

2008-11-18 Thread Christian Borntraeger
Hello Rusty, this patch set adds virtio console resize support. Patch 1 implements the necessary changes in virtio_console Patch 2 implements the config_changed callback for the s390 virtio transport Patch 1 needs an additional patch against hvc_console ( http://lkml.org/lkml/2008/11/18/121 ) to

[PATCH 1/2] virtio_console: support console resizing

2008-11-18 Thread Christian Borntraeger
From: Christian Borntraeger <[EMAIL PROTECTED]> this patch uses the new hvc callback hvc_resize to set the window site which allows to change the tty size of hvc_console via a hvc_resize function. I have added a new feature bit VIRTIO_CONSOLE_F_SIZE. The driver will change the windo

[PATCH 2/2] kvm-s390: implement config_changed for virtio on s390

2008-11-18 Thread Christian Borntraeger
From: Christian Borntraeger <[EMAIL PROTECTED]> This patch implements config_changed for the s390 virtio transport. We use the least significant bit of the interrupt parameter field to decide, if this interrupt should call the virtio virtqueue callback or the config_changed callback.

Re: [PATCH 2/2] kvm-s390: implement config_changed for virtio on s390

2008-11-18 Thread Christian Borntraeger
o worry about compatibility. - [PATCH 2/2] kvm-s390: implement config_changed for virtio on s390 From: Christian Borntraeger <[EMAIL PROTECTED]> This patch implements config_changed for the s390 virtio transport. We use the least significant bit of the interrupt parameter field to decide, if th

Re: [PATCH 5/6] kvm-s390: use register_virtio_root_device()

2008-12-11 Thread Christian Borntraeger
Am Mittwoch, 10. Dezember 2008 schrieb Mark McLoughlin: > This is basically a no-op change, since it does exactly the > same thing as s390_root_dev_register() when the caller isn't > a module. Ok, I gave it a short test and it seems to work. Some comments: I agree with your comment in patch0, that

Re: [Lguest] [PATCH 4/5] lguest: use KVM hypercalls

2009-04-15 Thread Christian Borntraeger
a wait queue in tun_struct, so we might > as well use it. > > Reported-by: Christian Borntraeger > Reported-by: Eric W. Biederman > Reported-by: Patrick McHardy > Signed-off-by: Herbert Xu Tested-by: Christian Borntraeger ___ Vir

Re: [1/2] tun: Only free a netdev when all tun descriptors are closed

2009-04-24 Thread Christian Borntraeger
Am Thursday 16 April 2009 13:08:18 schrieb Herbert Xu: > On Wed, Apr 15, 2009 at 10:38:34PM +0800, Herbert Xu wrote: > > > > So how about this? We replace the dev destructor with our own that > > doesn't immediately call free_netdev. We only call free_netdev once > > all tun fd's attached to the

Re: [1/2] tun: Only free a netdev when all tun descriptors are closed

2009-04-24 Thread Christian Borntraeger
Am Friday 24 April 2009 14:11:56 schrieb Herbert Xu: > The patch you qouted has been superceded by many versions :) Yes, I got lost in this mail thread... > Can you please test the latest that's in davem's tree? Done. With http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fdavem%2Fnet-2.6.git;a=co

Re: [PATCH RFC 0/8] virtio: add guest MSI-X support

2009-04-27 Thread Christian Borntraeger
Am Monday 27 April 2009 14:31:36 schrieb Michael S. Tsirkin: > Add optional MSI-X support: use a vector per virtqueue with > fallback to a common vector and finally to regular interrupt. > Teach all drivers to use it. > > I added 2 new virtio operations: request_vqs/free_vqs because MSI > needs to

Re: [PATCH RFC 0/8] virtio: add guest MSI-X support

2009-04-27 Thread Christian Borntraeger
Am Monday 27 April 2009 16:32:56 schrieb Michael S. Tsirkin: > > I dont know, if that is feasible for MSI, but the transport(virtio_pci) > > should > > already know the number of virtqueues, which should match the number of > > vectors, no? > > I think no, the transport can find out the max numb

Re: [PATCH RFC 0/8] virtio: add guest MSI-X support

2009-04-27 Thread Christian Borntraeger
Am Monday 27 April 2009 17:39:36 schrieb Michael S. Tsirkin: > So we'll probably need to rename request_vqs to request_vectors, > but we probably still need the driver to pass the number of > vectors it wants to the transport. Right? This might be a stupid idea, but would something like the follow

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-10 Thread Christian Borntraeger
Am Sunday 10 May 2009 06:07:06 schrieb Rusty Russell: > Yes, and in fact a rough look at your patch reveals that we don't actually > need del_vq: now we track them, we can just do that as part of vdev > destruction, right? Some of my students are working on a test module for virtio. Its a driver

Re: [PATCH 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-12 Thread Christian Borntraeger
ers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c This file contains several copy/paste breakages and needs at least the patch below to compile. Signed-off-by: Christian Borntraeger --- drivers/s390/kvm/kvm_virtio.c | 28 +++- 1 file changed, 7 insertions(+),

Re: [PATCHv5 1/3] virtio: find_vqs/del_vqs virtio operations

2009-05-13 Thread Christian Borntraeger
Am Wednesday 13 May 2009 21:08:58 schrieb Michael S. Tsirkin: > This replaces find_vq/del_vq with find_vqs/del_vqs virtio operations, > and updates all drivers. This is needed for MSI support, because MSI > needs to know the total number of vectors upfront. [...] > --- a/drivers/s390/kvm/kvm_virt

[patch 1/2] virtio: fix id_matching for virtio drivers

2009-05-26 Thread Christian Borntraeger
From: Christian Borntraeger This bug never appeared, since all current virtio drivers use VIRTIO_DEV_ANY_ID for the vendor field. If a real vendor would be used, the check in virtio_id_match is wrong - it returns 0 if id->vendor == dev->id.vendor. Signed-off-by: Christian Bornt

[patch 2/2] virtio: enhance id_matching for virtio drivers

2009-05-26 Thread Christian Borntraeger
From: Christian Borntraeger This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the device id. This will be used by a test module that can be bound to any virtio device. Signed-off-by: Christian Borntraeger --- drivers/virtio/virtio.c |2 +- scripts/mod/file2alias.c |2

[patch 0/2] Fix and enhance virtio device id matching

2009-05-26 Thread Christian Borntraeger
Hello Rusty, here are two patches that change the device matching of the virtio bus. The patches have been refreshed agains linux-next and should apply to your private virtio tree. OK for linux-next? Christian ___ Virtualization mailing list Virtualiz

Re: A set of "standard" virtual devices?

2007-04-03 Thread Christian Borntraeger
On Monday 02 April 2007 23:12, Andi Kleen wrote: > > > How would that work in the case where virtualized guests don't have a > > visible PCI bus, and the virtual environment doesn't pretend to emulate > > a PCI bus? > > If they emulated one with the appropiate device > then distribution driver a

Re: [PATCH 2/3] Virtio draft IV: the block driver

2007-07-05 Thread Christian Borntraeger
Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > + vbr = mempool_alloc(vblk->pool, GFP_ATOMIC); > + if (!vbr) > + goto stop; [...] > + BUG_ON(req->nr_phys_segments > ARRAY_SIZE(vblk->sg)); > + vbr->req = req; > + if (

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > +static void try_fill_recv(struct virtnet_info *vi) > +{ > + struct sk_buff *skb; > + struct scatterlist sg[MAX_SKB_FRAGS]; > + int num, err; > + > + for (;;) { > + skb = netdev_alloc_skb(vi->ndev, MAX_PACKET_LEN); > +

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > +static void receive_skb(struct net_device *dev, struct sk_buff *skb, [...] > + netif_rx(skb); In the NAPI case, we should use netif_receive_skb, no? Christian ___ Virtualization mailing list Virtua

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 11. Juli 2007 schrieb Rusty Russell: > There will be some internal limit on how many buffers the virtio > implementation supports, but depends on that implementation. It could > be a number of buffers or a total number of descriptors. I would suggest to implement a limit in the devic

Re: [PATCH 2/3] Virtio draft IV: the block driver

2007-07-23 Thread Christian Borntraeger
> +#ifdef __KERNEL__ > +struct gendisk; > +struct virtio_device; > + > +struct gendisk *virtblk_probe(struct virtqueue *vq); Hello Rusty, I am currently do some prototyping with virtio IV and found tis small issue in the block device. virtblk_probe requires a declaration of virtqueue, not virti

Re: [kvm-devel] [PATCH 0/2][KVM] guest time accounting

2007-08-13 Thread Christian Borntraeger
Am Montag, 13. August 2007 schrieb Laurent Vivier: > > [copying Ingo and Rusty] @Avi, seems that sourceforge is mangling the cc list? > > > > The patches look good. A couple of comments: > > > > - perhaps the new fields should be guarded by a #ifdef CONFIG_HYPERVISOR > > (selected by CONFIG_KV

Re: [kvm-devel] [PATCH 0/2][KVM] guest time accounting

2007-08-13 Thread Christian Borntraeger
Am Montag, 13. August 2007 schrieb Avi Kivity: > Christian Borntraeger wrote: > > Am Montag, 13. August 2007 schrieb Laurent Vivier: > > > >>> [copying Ingo and Rusty] > >>> > > > > @Avi, seems that sourceforge is mangling the cc list?

lguest virtio_descriptor structure on 64bit

2007-08-17 Thread Christian Borntraeger
Hello Rusty, while playing with your virtio descriptor code, I realized that the desc_pages data structure is not 64 bit safe. struct lguest_desc desc[NUM_DESCS] can be smaller than a page, as struct lguest_desc is 24 bytes on 64bit systems. Lets add a char padding to make the next page really

Re: [kvm-devel] [PATCH/RFC 3/4]Introduce "account modifiers" mechanism

2007-08-17 Thread Christian Borntraeger
Am Freitag, 17. August 2007 schrieb Laurent Vivier: > > The normal user/system accounting has the same issue, no? Whereever we > > happen to land (kernel or user) gets the whole tick. > > Yes... but perhaps I should rewrite this too ;-) If you look further, you will see, that this was actually r

Re: [kvm-devel] [PATCH 2/4] Introduce a new fields "gtime" and "cgtime" in task_struct and signal_struct

2007-08-20 Thread Christian Borntraeger
Am Montag, 20. August 2007 schrieb Laurent Vivier: > Index: kvm/fs/proc/array.c > === > --- kvm.orig/fs/proc/array.c2007-08-20 11:11:30.0 +0200 > +++ kvm/fs/proc/array.c 2007-08-20 13:04:03.0 +0200 Just a heads up,

Re: [kvm-devel] Réf. : Re: [PATCH 0/4] Virtual Machine Time Accounting

2007-08-21 Thread Christian Borntraeger
Am Montag, 20. August 2007 schrieb Glauber de Oliveira Costa: > Although I don't know KVM to a that deep level, I think it should be > possible to keep the virtual cpus in different process (or threads), > and take the accounting time from there. Perfectly possible to know > the time we spent runni

bug in virtio network driver?

2007-08-21 Thread Christian Borntraeger
Hello Rusty, I think I have found a problem in the virtio network driver. virtio_net reclaims sent skbs on xmit. That means that there is always one skb outstanding and the netdev packet statistic is always one packet to low. Documentation/networking/drivers.txt says 3) Do not forget that once

Re: bug in virtio network driver?

2007-08-21 Thread Christian Borntraeger
Am Dienstag, 21. August 2007 schrieb Rusty Russell: > The only reason that we don't do it in skb_xmit_done() is because > kfree_skb() isn't supposed to be called from an interrupt. But there's > dev_kfree_skb_any() which can be used. Ok, I now hacked something that works but I really dont like th

Re: [kvm-devel] [PATCH 00/10] PV-IO v3

2007-08-22 Thread Christian Borntraeger
this patch to make this data structure work on 64 bit to make the second page, really page aligned. On 32 bit this should be a no-op. Signed-Off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/lguest/lguest_virtio.c |3 ++- 1 file changed, 2 insertions(+), 1 dele

Re: [kvm-devel] [PATCH 00/10] PV-IO v3

2007-08-22 Thread Christian Borntraeger
Am Mittwoch, 22. August 2007 schrieb Dor Laor: > Actually while playing with virtio for kvm Avi saw that and recommended > to do the following: > struct desc_pages > { > /* Page of descriptors. */ > union { > struct virtio_desc desc[NUM_DESCS]; > char pad1[PA

Re: bug in virtio network driver?

2007-08-30 Thread Christian Borntraeger
Am Mittwoch, 29. August 2007 schrieb Rusty Russell: > On Tue, 2007-08-21 at 18:02 +0200, Christian Borntraeger wrote: > > Am Dienstag, 21. August 2007 schrieb Rusty Russell: > > > The only reason that we don't do it in skb_xmit_done() is because > > > kfree_skb()

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

2007-09-21 Thread Christian Borntraeger
Am Freitag, 21. September 2007 schrieb Rusty Russell: > Can't we just re-use the default xmit lock? yes we can. This patch is untested but is basically an refresh of an ealier version. I currently have no code testable with the latest virtio version from this mail thread, so if you could apply

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

2007-09-21 Thread Christian Borntraeger
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, but then I cannot reuse the xmit lock in an interrupt handler. Otherwise deadloc

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

2007-09-21 Thread Christian Borntraeger
> +{ > + struct virtqueue_ops *vq_ops; > + struct virtqueue *vq_recv; > + struct virtqueue *vq_send; > + struct net_device *ndev; This is only a matter of taste, but I like netdev or dev more than ndev. [...] Everything else looks sane. 20-minutes-code-review-by: Chri

Re: [patch 32/43] lguest: Virtio interface

2007-10-02 Thread Christian Borntraeger
Am Mittwoch, 26. September 2007 schrieb [EMAIL PROTECTED]: > include/linux/virtio_config.h | 111 + I get the following warnings on s390: /space/linux-2.6/drivers/block/virtio_blk.c: In function 'virtblk_probe': /space/linux-2.6/drivers/block/virtio_blk.c:240: warning: p

Re: [patch 32/43] lguest: Virtio interface

2007-10-10 Thread Christian Borntraeger
Hi Rusty, I have a late question :-) > There is also a generic implementation of config space which drivers can query > to get setup information from the host. After thinking about that for a while, is there a special reason the config field is defined as little endian? The only reason I can com

Re: [git pull] lguest: paravirt boot code

2007-10-23 Thread Christian Borntraeger
ion on s390. For all virtio patches: Acked-by: Christian Borntraeger <[EMAIL PROTECTED]> That reminds me that I promised Rusty to look at one small issue in virtio net driver. Nothing that should hold of the merge. I will sent the patch via Rusty when its ready.

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

2007-11-19 Thread Christian Borntraeger
ell <[EMAIL PROTECTED]> Thanks Rusty, that was the 2nd next item on my todo list :-) Acked-by: Christian Borntraeger <[EMAIL PROTECTED]> ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization

[PATCH] virtnet: remove double ether_setup

2007-12-06 Thread Christian Borntraeger
Hello Rusty, 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]> --- drivers/net/virtio_net.c |1 - 1 file changed, 1 deletion(-) Index: kvm/drivers/net/virtio

[PATCH] virtio_net: Fix stalled inbound traffic on early packets

2007-12-06 Thread Christian Borntraeger
-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Index: kvm/drivers/net/virtio_net.c === --- kvm.orig/drivers/net/virtio_net.c +

[PATCH resend] virtio_net: remove double ether_setup

2007-12-11 Thread Christian Borntraeger
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]> --- drivers/net/virtio_net.c |1 - 1 file changed, 1 deletion(-) Inde

[PATCH resent] virtio_net: Fix stalled inbound traffic on early packets

2007-12-11 Thread Christian Borntraeger
for this device. One solution is the enable napi before inbound buffer are available. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Index: kvm/drivers/net/virtio

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

2007-12-11 Thread Christian Borntraeger
Dor Laor wrote: > Christian Borntraeger wrote: >> >> Hello Rusty, >> >> while implementing and testing virtio on s390 I found a problem in >> virtio_net: The current virtio_net driver has a startup race, which >> prevents any incoming traffic: >> &g

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

2007-12-11 Thread Christian Borntraeger
2nd try. I somehow enable html on the last post Dor Laor wrote: > Christian Borntraeger wrote: >> >> Hello Rusty, >> >> while implementing and testing virtio on s390 I found a problem in >> virtio_net: The current virtio_net driver has a startup race, which

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

2007-12-11 Thread Christian Borntraeger
Am Dienstag, 11. Dezember 2007 schrieb Christian Borntraeger: > > The way other physical NICs doing it is by dis/en/abling interrupt > > using registers (look at e1000). > > I suggest we can export add_status and use the original code but > > before enabling napi add

[PATCH] virtio_net: remove double ether_setup

2007-12-11 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Rusty Russell: > Can you send straight to akpm or davem? I'm supposed to be on vacation at 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: C

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

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: > This is why initially I suggested another status code in order to split > the ring logic with driver status. > > but also not filling any buffers as long as VIRTIO_CONFIG_DEV_OPEN is not > > set. I will have a look but I think that add_status ne

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

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb 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

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

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -406,10 +405,10 @@ again: Hmm, while I agree in general with the patch, I fail to find the proper version of virtio_net where this patch applies. I tried kvm.git and linux-2.6.

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

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: > Christian Borntraeger wrote: > > > > Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: > > > --- a/drivers/net/virtio_net.c > > > +++ b/drivers/net/virtio_net.c > > > @@ -406,10 +405,10 @@ again: > >

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

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: > I think the change below handles the race. Otherwise please detail the > use case. [...] > > @@ -292,6 +292,9 @@ static int virtnet_open(struct net_devic > > return -ENOMEM; > > > > napi_enable(&vi->napi); > > + > > +

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

2007-12-13 Thread Christian Borntraeger
Am Donnerstag, 13. Dezember 2007 schrieb Dor Laor: > You're right I got confused somehow. > So in that case setting the driver status field on open in addition to > your enable will do the trick. > On DRIVER_OPEN the host will trigger an interrupt if the queue is not > empty.. > Thanks, > Dor Af

  1   2   3   4   >