[kvm-devel] [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: [kvm-devel] s390 kvm_virtio.c build error

2008-05-14 Thread Christian Borntraeger
Am Montag, 5. Mai 2008 schrieb Avi Kivity: > I can, but tell me which one. Also, the patch (Heiko's) needs a > changelog entry and a signoff. Avi, as this patch is now in your queue, can you push this change --- commit eee4646877b748afbfd34d8dbe6ea9b454a65745 Author: Heiko Carstens <[EMAIL PROT

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

[kvm-devel] [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: [kvm-devel] s390 kvm_virtio.c build error

2008-05-05 Thread Christian Borntraeger
> Hmm... this should help: > > --- > drivers/s390/kvm/kvm_virtio.c | 40 +++- > 1 file changed, 23 insertions(+), 17 deletions(-) Thanks Heiko. I did a short test and it seems to work. Acked-by: Christian Borntraeger <[EMAIL PROTECTED]&g

[kvm-devel] small author mixup (was: git pull KVM updates for 2.6.26rc)

2008-04-30 Thread Christian Borntraeger
running on kvm > > Christian Borntraeger (10): > KVM: kvm.h: __user requires compiler.h > s390: KVM preparation: host memory management changes for s390 kvm > s390: KVM preparation: address of the 64bit extint parm in lowcore > KVM: s390: sie intercept handl

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

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

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

[kvm-devel] [PATCH/trivial] kvm: remove long -> void *user -> long cast

2008-04-21 Thread Christian Borntraeger
Avi, kvm_dev_ioctl casts the arg value to void __user *, just to recast it again to long. This seems unnecessary. According to objdump the binary code on x86 is unchanged by this patch. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c |3 +-- 1 file c

Re: [kvm-devel] [PATCH 2/2] virtio-s390: Change virtio interrupt definitions to follow architectu re

2008-04-17 Thread Christian Borntraeger
rge this into the first patch? Christian Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Carsten Otte <[EMAIL PROTECTED]> --- arch/s390/kvm/interrupt.c |2 +- include/linux/kvm.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: kvm/arch/

Re: [kvm-devel] [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: [kvm-devel] [PATCH] virtio-blk: allow more than one in-flight request

2008-03-27 Thread Christian Borntraeger
Am Donnerstag, 27. März 2008 schrieb Marcelo Tosatti: > > Allow more than one in-flight request in the virtio ring. This allows > the host driver to submit requests in parallel. [...] > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 3b1a68d..5bb041f 100644 > --- a/dri

Re: [kvm-devel] [PATCH] kvm.h: __user requires compiler.h

2008-03-25 Thread Christian Borntraeger
Am Montag, 24. März 2008 schrieb Avi Kivity: > Christian Borntraeger wrote: > > Am Freitag, 21. März 2008 schrieb Anthony Liguori: > > > >> This patch breaks QEMU build when doing a 'make sync'. When you do a > >> top-level ./configure, libkvm is

Re: [kvm-devel] + kvm-provide-kvmh-for-all-architecture-fixes-headers_install.patch added to -mm tree

2008-03-25 Thread Christian Borntraeger
Am Mittwoch, 12. März 2008 schrieben Sie: > > The patch titled > kvm: provide kvm.h for all architecture: fixes headers_install > has been added to the -mm tree. Its filename is > kvm-provide-kvmh-for-all-architecture-fixes-headers_install.patch > Hello Andrew, is there a chance to s

Re: [kvm-devel] [PATCH] kvm.h: __user requires compiler.h

2008-03-24 Thread Christian Borntraeger
Am Freitag, 21. März 2008 schrieb Anthony Liguori: > This patch breaks QEMU build when doing a 'make sync'. When you do a > top-level ./configure, libkvm is built with kerneldir pointing to > kvm-userspace/kernel/include. While linux/kvm.h is present there, there > isn't a linux/compiler.h. I

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

[kvm-devel] [PATCH] kvm.h: __user requires compiler.h

2008-03-12 Thread Christian Borntraeger
include files. This patch makes kvm.h compile in all cases. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- include/linux/kvm.h |1 + 1 file changed, 1 insertion(+) Index: kvm/include/linux/kvm.h === --- kvm.orig/i

Re: [kvm-devel] [PATCH] kvm: provide kvm.h for all architecture: fixes headers_install

2008-03-11 Thread Christian Borntraeger
Am Dienstag, 11. März 2008 schrieb Andreas Schwab: > Christian Borntraeger <[EMAIL PROTECTED]> writes: > > > include/asm-alpha/kvm.h|6 ++ > > Can't you put it in asm-generic? I dont think so. The generic part is in include/linux/kvm.h. as

Re: [kvm-devel] [PATCH] kvm: provide kvm.h for all architecture: fixes headers_install

2008-03-11 Thread Christian Borntraeger
vm.h. Therefore, this patch also provides asm/kvm.h on all architectures. Changes since v1: o use asm-generic/Kbuild.asm (Arnd Bergmann) o fix comment in asm-frv (David Howells) Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Avi Kivity <[EMAIL PROTECTED]> CCed:

[kvm-devel] [PATCH] kvm: provide kvm.h for all architecture: fixes headers_install

2008-03-10 Thread Christian Borntraeger
e v1: o use asm-generic/Kbuild.asm (Arnd Bergmann) o fix comment in asm-frv (David Howells) Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Avi Kivity <[EMAIL PROTECTED]> --- include/asm-alpha/kvm.h|6 ++ include/asm-arm/kvm.h |6

[kvm-devel] [PATCH] kvm: provide kvm.h for all architecture: fixes headers_install

2008-03-10 Thread Christian Borntraeger
ifdef-y is used for linux/kvm.h "make headers_check" will fail on all architectures without asm/kvm.h. Therefore, this patch also provides asm/kvm.h on all architectures. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Avi Kivity <[EMAIL PROTECTED]>

Re: [kvm-devel] headersinstall of kvm.h does not work

2008-03-07 Thread Christian Borntraeger
Am Freitag, 7. März 2008 schrieb Avi Kivity: > As I'm about to disappear for a week, consider a patch to remove the > config dependency and add asm-*/kvm.h pre-acked for mainline. Maybe the > presence of those empty asm-*/kvm.h files will encourage further kvm > ports to *. Something like the

[kvm-devel] headersinstall of kvm.h does not work

2008-03-07 Thread Christian Borntraeger
Hello Avi, in commit fb56dbb31c4738a3918db81fd24da732ce3b4ae6 you changed include/linux/Kbuild: snip KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM Currently, make headers_check barfs due to , which includes, not existing. Rather than add a zillion s, export kvm.h

Re: [kvm-devel] [patch 3/5] KVM: hypercall batching

2008-02-18 Thread Christian Borntraeger
Am Montag, 18. Februar 2008 schrieb Avi Kivity: > > AFAICS there is no guarantee about page-alignment here... > Kernel data is physically contiguous (true for per-cpu data as well?), > so no there's issue here. Modules are loaded into vmalloc space, no? I think, if kvm is built as module, stati

[kvm-devel] [PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
call as vdev->priv is used in skb_recv_done. So lets move the assignment of vdev->priv before we call try_fill_recv. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Acked-by: Anthony Liguori <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c |2 +- 1

[kvm-devel] [PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
13b5a>] ext_no_vtime+0x1c/0x20 [<0010a0b6>] cpu_idle+0x21a/0x230 We must initialize vdev->priv before we use the notify hypercall as vdev->priv is used in skb_recv_done. So lets move the assignment of vdev->priv before we call try_fill_recv. Signed-off-by: Christian

Re: [kvm-devel] [PATCH] virtio_ring: make structure defines packed

2008-02-11 Thread Christian Borntraeger
Am Sonntag, 10. Februar 2008 schrieb ron minnich: > The problem for me is that gcc packed is not compatible with the plan > 9 C compiler. So, for a truly heterogeneous setup, you are going to > have > to have code to marshall the structures when transferring between > domains, and you are better of

[kvm-devel] [PATCH] virtio_ring: make structure defines packed

2008-02-08 Thread Christian Borntraeger
as packed. Does anybody see a problem with packed? Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- include/linux/virtio_ring.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) Index: kvm/include/linux/virtio_

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

2008-02-01 Thread Christian Borntraeger
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 creates the disk name combinging "vd" with 'a&

Re: [kvm-devel] [PATCH] virtio_blk: Dont waste major numbers

2008-01-31 Thread Christian Borntraeger
Am Donnerstag, 31. Januar 2008 schrieb Anthony Liguori: > There's are some other limitations to the number of virtio block > devices. For instances... > > > sprintf(vblk->disk->disk_name, "vd%c", virtblk_index++); > > This gets bogus after 64 disks. Right. I will fix that with an additio

[kvm-devel] [PATCH] virtio_blk: Dont waste major numbers

2008-01-31 Thread Christian Borntraeger
virtio_blk disks. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/block/virtio_blk.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) Index: kvm/drivers/block/virtio

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

2008-01-17 Thread Christian Borntraeger
Am Donnerstag, 17. Januar 2008 schrieb Rusty Russell: > Since the balloon requires Guest cooperation anyway, there seems > little reason to force it to tell the Host when it wants to reuse a > page. It can simply fault it in. Yes, thats what we do in the s390 cmm driver. All in all the driver has

Re: [kvm-devel] virtio_net and SMP guests

2008-01-10 Thread Christian Borntraeger
Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: > Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: > > Am Dienstag, 18. Dezember 2007 schrieb Rusty Russell: > > > To me this points to doing interrupt suppression a different way. If we > > > h

Re: [kvm-devel] virtio_net and SMP guests

2008-01-10 Thread Christian Borntraeger
Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: > Am Dienstag, 18. Dezember 2007 schrieb Rusty Russell: > > To me this points to doing interrupt suppression a different way. If we > > have a ->disable_cb() virtio function, and call it before we call > > neti

Re: [kvm-devel] virtio_net and SMP guests

2008-01-10 Thread Christian Borntraeger
Am Dienstag, 18. Dezember 2007 schrieb Rusty Russell: > To me this points to doing interrupt suppression a different way. If we > have a ->disable_cb() virtio function, and call it before we call > netif_rx_schedule, does that fix it? The fix looks good and I agree with it. There is one problem

Re: [kvm-devel] [PATCH/RFC 0/2] CPU hotplug virtio driver

2008-01-09 Thread Christian Borntraeger
Am Mittwoch, 9. Januar 2008 schrieb Glauber de Oliveira Costa: > I'm sending a first draft of my proposed cpu hotplug driver for kvm/virtio > The first patch is the kernel module, while the second, the userspace pci device. I personally prefer to use non paravirtualized cpu hotplug and implement

[kvm-devel] virtio_net and SMP guests

2007-12-14 Thread Christian Borntraeger
remove this check? (See patch below). I am not sure if the proper fix also requires to change vring.avail->flags to be only changed by atomic bitops. Any ideas, comments? Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> CC: Anthony Liguori <[EMAIL PROTECTED]> CC: Dor Lao

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

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] [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] [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] [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] [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

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

Re: [kvm-devel] [RFC] Proposed new directory layout for kvm and virtualization

2007-12-11 Thread Christian Borntraeger
Am Dienstag, 11. Dezember 2007 schrieb Avi Kivity: > KVM is due to receive support for multiple architectures (ppc, ia64, and > s390, in addition to the existing x86), hopefully in time for the 2.6.25 > merge window. It is awkward to place the new arch support in > drivers/kvm/, so I'd like to

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

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

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

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

Re: [kvm-devel] [PATCH] Add the arg "module" for kvm_arch_init

2007-11-23 Thread Christian Borntraeger
Am Freitag, 23. November 2007 schrieb Zhang, Xiantao: > > From: Zhang Xiantao <[EMAIL PROTECTED]> > Date: Fri, 23 Nov 2007 07:28:35 +0800 > Subject: [PATCH] Add the arg module for kvm_arch_into > Add the arg module for kvm_arch_into, since some archs may > need module info. > Signed-off-by: Zhang

Re: [kvm-devel] [RFC] virtio-blk PCI backend

2007-11-20 Thread Christian Borntraeger
Am Freitag, 9. November 2007 schrieb Dor Laor: > I believe that the network interface will quickly go to the kernel since > copy takes most of the > cpu time and qemu does not support scatter gather dma at the moment. > Nevertheless using pio seems good enough, Anthony's suggestion of > notifying

Re: [kvm-devel] [PATCH v2] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-15 Thread Christian Borntraeger
p, cputime); > return; > } [...] > But I agree with your patch. > > Laurent Yes, that would have the same result. I think its a matter of taste, if we want to have a not-so-obvious one line if, or a multi-line-if. I dont mind which version use, here is your variant as an alt

Re: [kvm-devel] [PATCH v2] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-15 Thread Christian Borntraeger
irq time. > Le jeudi 15 novembre 2007 à 15:10 +0100, Christian Borntraeger a écrit : > > Avi pointed out, that my first patch was broken, here is the 2nd try. > > I tested the patch on s390 with CONFIG_VIRT_CPU_ACCOUNTING and on x86_64. > > Seems to work. > > > > Cur

Re: [kvm-devel] [PATCH v2] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-15 Thread Christian Borntraeger
Am Donnerstag, 15. November 2007 schrieb Avi Kivity: > > + if ((p->flags & PF_VCPU) && (irq_count() - hardirq_offset == 0)) [...] > What's irq_count()? Is it defined to ignore the timer tick? Or is that > hardirq_offset? hardirq_offset is used to ignore the timer tick. irq_count is defined in

[kvm-devel] [PATCH v2] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-15 Thread Christian Borntraeger
, feedback is welcome. CC: Ingo Molnar <[EMAIL PROTECTED]> CC: Avi Kivity <[EMAIL PROTECTED]> CC: Laurent Vivier <[EMAIL PROTECTED]> Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- kernel/sched.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) I

Re: [kvm-devel] [PATCH] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-14 Thread Christian Borntraeger
Am Mittwoch, 14. November 2007 schrieb Avi Kivity: > But isn't account_system_time() called via the timer tick interrupt, and > never directly from kvm? So in_interrupt() would always be true. Ouch, yes. Please dont use that patch, I will make a new one. Christian

Re: [kvm-devel] [PATCH] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-14 Thread Christian Borntraeger
Am Mittwoch, 14. November 2007 schrieb Ingo Molnar: > > * Christian Borntraeger <[EMAIL PROTECTED]> wrote: > > > Avi, Ingo, Laurent, > > > > what do you think about the following patch? > > fine to me. I guess this should mostly be a NOP to KVM, right? Y

[kvm-devel] [PATCH] kvm: Fix accounting of interrupts during guest execution on s390

2007-11-14 Thread Christian Borntraeger
. Solution is to check for in_interrupt to let interrupt time account as soft or hardirq. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- kernel/sched.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: kvm/kernel/s

Re: [kvm-devel] A question about virtio and KVM

2007-11-07 Thread Christian Borntraeger
Am Dienstag, 6. November 2007 schrieb Dor Laor: > The is my latest (old) branch: > > -Kernel repo: git://kvm.qumranet.com/home/dor/src/virtio/kvm > -Userspace repo: git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace > Use virt-final branch. Yes I had a look at these. This code is virtio dra

Re: [kvm-devel] RFC/patch portability: split kvm_vm_ioctl v3

2007-11-05 Thread Christian Borntraeger
Am Montag, 5. November 2007 schrieb Arnd Bergmann: > Read again what I wrote above. I'm suggesting to have just one external > interrupt for virtio and use the generic IRQ abstraction to handle > everything that comes below that. So you basically suggest to implement wrapper code around extint and

Re: [kvm-devel] A question about virtio and KVM

2007-11-05 Thread Christian Borntraeger
Am Donnerstag, 1. November 2007 schrieb Dor Laor: > Hi Ian, > The intention is there, I just didn't have the time to work on it. > I can promise [there is no way to backoff now] that it will be > working/merge-able state by December 1st. > Dor. Dor, that is good news. I also work on virtio and

Re: [kvm-devel] severe bug in 2.6.23+ kvm.git

2007-10-19 Thread Christian Borntraeger
Am Freitag, 19. Oktober 2007 schrieb Luca Tettamanti: > linus-git has at least one bug with SG chaining, but usually it just > hangs the machine. Patch is here: > > http://lkml.org/lkml/2007/10/17/269 Looks promising. I pulled this fix by pulling the latest Linus-git into the kvm.git. I also ena

Re: [kvm-devel] severe bug in 2.6.23+ kvm.git

2007-10-19 Thread Christian Borntraeger
Am Freitag, 19. Oktober 2007 schrieb Laurent Vivier: > Did you patch kvm.git with patch-2.6.23.1.bz2 or did you download > linux-2.6.23.1.tar.bz2 ? > > 2.6.23.1 corrects nothing except sata_mv... Yes I know. The question we tried to answer was: is the bug in 2.6.23 or was it introduced after 2.6

Re: [kvm-devel] severe bug in 2.6.23+ kvm.git

2007-10-19 Thread Christian Borntraeger
Am Freitag, 19. Oktober 2007 schrieb Jan Engelhardt: > > On Oct 19 2007 15:44, Carsten Otte wrote: > > Carsten Otte wrote: > >> First thing we do, is figure whether or not 2.6.23.1 as released breaks our > >> system too. This way, we can either focus on differences between Linus and > >> Avi, or t

Re: [kvm-devel] severe bug in 2.6.23+ kvm.git

2007-10-19 Thread Christian Borntraeger
Am Freitag, 19. Oktober 2007 schrieb Laurent Vivier: > Carsten Otte a écrit : > > Laurent Vivier wrote: > >> How do you know the problem has been introduced by kvm ? > > I don't. In fact I think it has not been introduced by kvm. All I > > stated, is that we experienced the problem when running th

[kvm-devel] Fix guest time accounting going faster than user time accounting

2007-10-18 Thread Christian Borntraeger
Seems I overlooked this type while reviewing Laurents patch. cputime_add already adds, dont do it twice. Avi. This should go to Linus before 2.6.24. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- fs/proc/array.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[kvm-devel] Use virtual cpu accounting if available for guest times.

2007-10-18 Thread Christian Borntraeger
patch on s390. Avi, please apply. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |3 +++ 1 file changed, 3 insertions(+) Index: kvm/drivers/kvm/kvm.h === --- kvm.orig/drivers/kvm/kvm.h +

Re: [kvm-devel] [PATCH/RFC] Per-architecture hypercall definitions

2007-10-11 Thread Christian Borntraeger
6* architectures. To provide hypercall infrastructure for other kvm architectures I split kvm_para.h into a generic header file and architecture specific definitions. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Index: kvm/include/asm-x86/kvm_para.h ===

[kvm-devel] [PATCH/RFC] Per-architecture hypercall definitions

2007-10-11 Thread Christian Borntraeger
PARA_H +#define __S390_KVM_PARA_H + +/* + * This is subject to change: + * + * Hypercalls for KVM on s390. The calling convention is similar to the + * s390 ABI, so we use R2-R6 for parameters 1-5. In addition we use R1 + * as hypercall number and R7 as parameter 6. The return value is + * written to R2.

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
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
> +{ > + 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: [kvm-devel] 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 1/4] [HYPERCALL] Add hypercalls functions

2007-08-27 Thread Christian Borntraeger
Am Samstag, 25. August 2007 schrieb Dor Laor: > +static inline int > +__hypercall2(unsigned int nr, unsigned long p1, unsigned long p2) > +{ > + int ret; > + asm (" call hypercall_addr\n" [...] > + return ret; Hello Dor, Linux system calls return long. I think hypercalls should behave

Re: [kvm-devel] [PATCH 1/4] [HYPERCALL] Add hypercalls functions

2007-08-27 Thread Christian Borntraeger
Am Samstag, 25. August 2007 schrieb Dor Laor: > + asm (" call hypercall_addr\n" Hi Dor, This cannot work, because hypercall_addr is currently not defined in todays kvm.git: # grep -R hypercall_addr * drivers/kvm/kvm.h:unsigned char *hypercall_addr); # IIRC there was a defin

Re: [kvm-devel] [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code

2007-08-27 Thread Christian Borntraeger
Am Samstag, 25. August 2007 schrieb Dor Laor: > + * Permission is hereby granted, free of charge, to any person > obtaining a copy Hi Dor, some of your patch lines seem line-wrapped. Is there place where I can download the whole series? Thanks Christian

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: [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] 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

[kvm-devel] 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: [kvm-devel] Réf. : Re: [PATCH 0/4] Vir tual 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

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] [PATCH/RFC 3/4]Introduce "accou nt 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 0/2][KVM] guest time accounting

2007-08-13 Thread Christian Borntraeger
Am Montag, 13. August 2007 schrieb Laurent Vivier: > >> As guest accounting is hw dependent, I think we should add a hook in the > >> accounting functions. > >> > > > > Isn't PF_VM exactly such a hook? All the hypervisor needs to do is to > > set/unset it correctly? > > In fact, no. > > PF_V

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?

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

2007-08-13 Thread Christian Borntraeger
Am Montag, 13. August 2007 schrieb Avi Kivity: > Laurent's patch gives the best of both worlds: on old 'top', you get > guest time accounted as user time, while on new 'top' it is accounted > separately. This is done by reporting user time as the sum of the real > user time and guest time. A

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
old PATCH GPLv2 -- Subject: [PATCH/RFC] Fix system<->user misaccount of interpreted execution From: Christian Borntraeger <[EMAIL PROTECTED]> This patches fixes the accouting of guest cpu time. As sie is executed via a system call, all guest operations were accounted as system time.

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Christian Borntraeger
Anthony Liguori <[EMAIL PROTECTED]> wrote on 17.05.2007 16:22:23: > Is there anything that explains what the fields in sockaddr mean: > > sa_family_tsiucv_family; > unsigned shortsiucv_port;/* Reserved */ > unsigned intsiucv_addr;/* Reserved */ > char

Re: [kvm-devel] [PATCH/RFC 7/9] Virtual network guest device driver

2007-05-21 Thread Christian Borntraeger
> This is quite easy with KVM. I like the approach that vmchannel has > taken. A simple PCI device. That gives you a discovery mechanism for > shared memory and an interrupt and then you can just implement a ring > queue using those mechanisms (along with a PIO port for signaling from > the

Re: [kvm-devel] [PATCH/RFC 5/9] s390 virtual console for guests

2007-05-14 Thread Christian Borntraeger
On Monday 14 May 2007 18:23, Christian Bornträger wrote: > On Friday 11 May 2007 21:00, Anthony Liguori wrote: > > I think it would be better to use hvc_console as Xen now uses it too. > I just had a look at hvc_console, and indeed this driver looks appropriate As I started prototyping this front

Re: [kvm-devel] file-backed guest memory

2007-04-12 Thread Christian Borntraeger
On Thursday 12 April 2007 17:38, Avi Kivity wrote: > > But wouldn't it also be possible to create a file in > > userspace and pass its descriptor to kvm? [...] > swap, hugetlbfs, and maybe other nifty stuff. I think I know how to do > this for the current mmu, but I'm worried that it will have a