[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

[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 [EMAIL PROTECTED

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 reproduce the problem on a 4 way

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

2008-04-30 Thread Christian Borntraeger
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 handling KVM: s390: intercepts for privileged

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

[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 file changed, 5

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 linux/virtio.h I just realized, that this breaks make headers_check as we dont export virtio.h (and we dont want to export it

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

[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 changed, 1

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

2008-04-17 Thread Christian Borntraeger
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/s390/kvm/interrupt.c

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

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 submit

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

[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/include

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

2008-03-11 Thread Christian Borntraeger
. 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: Sam Ravnborg [EMAIL PROTECTED] CCed: David Woodhouse [EMAIL PROTECTED] --- include/asm-alpha

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. asm/kvm.h is populated by each architecture which

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

2008-03-10 Thread Christian Borntraeger
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] CCed: Sam Ravnborg [EMAIL PROTECTED] CCed

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

2008-03-10 Thread Christian Borntraeger
/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 ++ include/asm-avr32/kvm.h|6

[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 asm/kvm.h, which linux/kvm.h includes, not existing. Rather than add a

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

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

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

2008-02-11 Thread Christian Borntraeger
-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 file changed, 1 insertion(+), 1 deletion(-) Index: kvm/drivers/net/virtio_net.c

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

2008-02-11 Thread Christian Borntraeger
] 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 Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c |2 +- 1

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 off

[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_ring.h

[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'++. This will give

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

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
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 Laor [EMAIL PROTECTED] CC: Rusty Russell [EMAIL PROTECTED] --- drivers

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 After

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 needs

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 handling, what about adding

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

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: Hmm, while I agree in general with the patch, I fail to find

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); + +

[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(-) Index: kvm

[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_net.c

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: If try_fill_recv submits buffers to the host system data might

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 prevents any incoming traffic: If try_fill_recv

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
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 a call to add_status(dev

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

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 Xiantao

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 the

[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(-) Index: kvm/kernel/sched.c

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

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

2007-11-15 Thread Christian Borntraeger
à 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. Currently the scheduler checks for PF_VCPU to decide if this timeslice has

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

2007-11-15 Thread Christian Borntraeger
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 alternative: Ingo, you decide :-) From: Christian Borntraeger [EMAIL PROTECTED

[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/sched.c

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] 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 draft 4

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] 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] 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 turn on the

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

2007-10-11 Thread Christian Borntraeger
. We use the diagnose instruction as hypercall. To avoid + * conflicts with existing diagnoses for LPAR and z/VM, we do not use + * the instruction encoded number, but specify the number in R1 and + * use 0xBB as KVM diagnose number. + * + * Copyright 2007, IBM Corp. + * Author(s) Christian

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

2007-10-11 Thread Christian Borntraeger
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 === --- /dev/null 1970-01-01 00:00:00.0 +

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

2007-09-21 Thread Christian Borntraeger
*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: Christian Borntraeger [EMAIL PROTECTED] Christian

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 deadlock

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() isn't supposed to be called from

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

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

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 running

[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

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 the

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

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_KVM)? that

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_VM is used to know

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 frontend

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

2007-04-13 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