Re: [kvm-devel] KVM performance

2007-01-30 Thread Rusty Russell
On Tue, 2007-01-30 at 14:56 +0200, Avi Kivity wrote: > Another optimization is that we can stop having two parallel > implementations of the same code. I suggest we start thinking how to merge. KVM has more ambition than lguest, so I was planning on letting you do all the hard work then rebase m

Re: [kvm-devel] [PATCH 4/5] KVM: cpu hotplug support

2007-01-30 Thread Andrew Morton
On Tue, 30 Jan 2007 14:56:16 - Avi Kivity <[EMAIL PROTECTED]> wrote: > +static void decache_vcpus_on_cpu(int cpu) > +{ > + struct kvm *vm; > + struct kvm_vcpu *vcpu; > + int i; > + > + spin_lock(&kvm_lock); > + list_for_each_entry(vm, &vm_list, vm_list) > + for

Re: [kvm-devel] [PATCH 5/5] KVM: Host suspend/resume support

2007-01-30 Thread Nigel Cunningham
Hi. On Tue, 2007-01-30 at 23:19 +0100, Rafael J. Wysocki wrote: > On Tuesday, 30 January 2007 22:20, Nigel Cunningham wrote: > > Hi. > > > > On Tue, 2007-01-30 at 14:57 +, Avi Kivity wrote: > > > Add the necessary callbacks to suspend and resume a host running kvm. > > > This > > > is just

Re: [kvm-devel] [PATCH 5/5] KVM: Host suspend/resume support

2007-01-30 Thread Rafael J. Wysocki
On Tuesday, 30 January 2007 22:20, Nigel Cunningham wrote: > Hi. > > On Tue, 2007-01-30 at 14:57 +, Avi Kivity wrote: > > Add the necessary callbacks to suspend and resume a host running kvm. This > > is just a repeat of the cpu hotplug/unplug work. > > > > Signed-off-by: Avi Kivity <[EMAIL

Re: [kvm-devel] [PATCH 5/5] KVM: Host suspend/resume support

2007-01-30 Thread Nigel Cunningham
Hi. On Tue, 2007-01-30 at 14:57 +, Avi Kivity wrote: > Add the necessary callbacks to suspend and resume a host running kvm. This > is just a repeat of the cpu hotplug/unplug work. > > Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Maybe it's just a lack of understanding, but I'm wondering i

Re: [kvm-devel] [RFT] kvm host suspend/resume

2007-01-30 Thread Jeremy Katz
Avi Kivity wrote: > I've committed kvm support for host suspend-to-disk (and hopefully > resume too). This means you can suspend your machine with running vms, > and resume it later will all vms returning to the saved state. This > should please laptop owners. So testing with trunk (r4365) +

[kvm-devel] [PATCH 0/11] KVM updates for 2.6.21

2007-01-30 Thread Avi Kivity
This patchset contains an assortment of guest and host fixes for kvm. Andrew, please queue for 2.6.21. -- error compiling committee.c: too many arguments to function - Take Surveys. Earn Cash. Influence the Future of IT J

[kvm-devel] [PATCH 5/11] KVM: fix what looks like an obvious typo in the file drivers/kvm/svm.c

2007-01-30 Thread Avi Kivity
From: Robert P. J. Day <[EMAIL PROTECTED]> Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/svm.c === --- linux-2.6.orig/drivers/kvm/svm.c +++ linux-2.6/dr

[kvm-devel] [PATCH 6/11] KVM: Fix mmu going crazy of guest sets cr0.wp == 0

2007-01-30 Thread Avi Kivity
The kvm mmu relies on cr0.wp being set even if the guest does not set it. The vmx code correctly forces cr0.wp at all times, the svm code does not, so it can't boot solaris without this patch. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/svm.c ==

[kvm-devel] [PATCH 3/11] KVM: Fix gva_to_gpa()

2007-01-30 Thread Avi Kivity
gva_to_gpa() needs to be updated to the new walk_addr() calling convention, otherwise it may oops under some circumstances. Use the opportunity to remove all the code duplication in gva_to_gpa(), which essentially repeats the calculations in walk_addr(). Signed-off-by: Avi Kivity <[EMAIL PROTECTE

[kvm-devel] [PATCH 4/11] KVM: vmx: handle triple faults by returning EXIT_REASON_SHUTDOWN to userspace

2007-01-30 Thread Avi Kivity
Just like svm. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/vmx.c === --- linux-2.6.orig/drivers/kvm/vmx.c +++ linux-2.6/drivers/kvm/vmx.c @@ -1373,6 +1373,11 @@ static int handle_external_interrupt(str

[kvm-devel] [PATCH 7/11] KVM: SVM: Hack initial cpu csbase to be consistent with intel

2007-01-30 Thread Avi Kivity
This allows us to run the mmu testsuite on amd. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/svm.c === --- linux-2.6.orig/drivers/kvm/svm.c +++ linux-2.6/drivers/kvm/svm.c @@ -528,7 +528,13 @@ static voi

[kvm-devel] [PATCH 9/11] KVM: VMX: Reload ds and es even in 64-bit mode

2007-01-30 Thread Avi Kivity
Or 32-bit userspace will get confused. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/vmx.c === --- linux-2.6.orig/drivers/kvm/vmx.c +++ linux-2.6/drivers/kvm/vmx.c @@ -1863,9 +1863,7 @@ again: fx_

Re: [kvm-devel] qemu vnc auth

2007-01-30 Thread Anthony Liguori
Avi Kivity wrote: > Yellis Services wrote: > >> Hello, >> >> I have adapted a xen path to kvm-qemu. >> This patch enable auth in vnc >> >> qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto >> >> work with vncviewer on linux and Win. >> Don't work with vncviewer applet via http, must be fixed. >>

[kvm-devel] [PATCH 2/11] KVM: Fix asm constraint for lldt instruction

2007-01-30 Thread Avi Kivity
From: S.Çağlar Onur <[EMAIL PROTECTED]> lldt does not accept immediate operands, which "g" allows. Signed-off-by: S.Çağlar Onur <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/kvm.h ===

[kvm-devel] [PATCH 10/11] KVM: Fix mismatch between 32-bit and 64-bit abi

2007-01-30 Thread Avi Kivity
Unfortunately requiring a version bump. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/include/linux/kvm.h === --- linux-2.6.orig/include/linux/kvm.h +++ linux-2.6/include/linux/kvm.h @@ -11,7 +11,7 @@ #include #in

Re: [kvm-devel] KVM performance

2007-01-30 Thread Anthony Liguori
Rusty Russell wrote: On Sun, 2007-01-28 at 11:40 +0200, Avi Kivity wrote: Rusty Russell wrote: I use virtbench (http://ozlabs.org/~rusty/virtbench) to try to measure optimization results; it still needs more tests (and an explicit kvm backend). A kvm backend would be appreci

[kvm-devel] [PATCH 4/5] KVM: cpu hotplug support

2007-01-30 Thread Avi Kivity
On hotplug, we execute the hardware extension enable sequence. On unplug, we decache any vcpus that last ran on the exiting cpu, and execute the hardware extension disable sequence. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/kvm_main.c =

[kvm-devel] [PATCH 11/11] KVM: fix vcpu freeing bug

2007-01-30 Thread Avi Kivity
From: Ingo Molnar <[EMAIL PROTECTED]> vcpu_load() can return NULL and it sometimes does in failure paths (for example when the userspace ABI version is too old) - causing a preemption count underflow in the ->vcpu_free() later on. So check for NULL. Signed-off-by: Ingo Molnar <[EMAIL PROTECTED

[kvm-devel] freebsd 6.2 i486 does not boot under kvm

2007-01-30 Thread Aurelien Jarno
Hi all, Today I have just tried kvm, as it seems to be a really good replacement to qemu, as it is a lot faster. I don't really have confidence on kqemu, so I don't use it. I am using it on my laptop to be able to develop while I am away from my various computers. I am really interesting in havin

[kvm-devel] [PATCH 1/5] hotplug: Allow modules to use the cpu hotplug notifiers even if !CONFIG_HOTPLUG_CPU

2007-01-30 Thread Avi Kivity
KVM wants the cpu hotplug notifications, both for cpu hotplug itself, but more commonly for host suspend/resume. In order to avoid extensive #ifdefs, provide stubs when CONFIG_CPU_HOTPLUG is not defined. In all, we have four cases: - UP: register and unregister stubbed out - SMP+hotplug: full re

[kvm-devel] [PATCH 0/5] KVM: suspend/resume support

2007-01-30 Thread Avi Kivity
The following patchset allows a host with running virtual machines to be suspended and, on at least a subset of the machines tested, resumed. Note that this is orthogonal to suspending and resuming an individual guest to a file. A side effect of implementing suspend/resume is that cpu hotplug

[kvm-devel] [PATCH 5/5] KVM: Host suspend/resume support

2007-01-30 Thread Avi Kivity
Add the necessary callbacks to suspend and resume a host running kvm. This is just a repeat of the cpu hotplug/unplug work. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/kvm_main.c === --- linux-2.6.orig

[kvm-devel] [PATCH 3/5] KVM: VMX: add vcpu_clear()

2007-01-30 Thread Avi Kivity
Like the inline code it replaces, this function decaches the vmcs from the cpu it last executed on. in addition: - vcpu_clear() works if the last cpu is also the cpu we're running on - it is faster on larger smps by virtue of using smp_call_function_single() Includes fix from Ingo Molnar. Sig

Re: [kvm-devel] [PATCH 2/11] KVM: Fix asm constraint for lldt instruction

2007-01-30 Thread Avi Kivity
Avi Kivity wrote: > From: S.ÇaÄŸlar Onur <[EMAIL PROTECTED]> > Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> > > The mangled name is actually S.Çağlar Onur <[EMAIL PROTECTED]>. Apologies to S.Çağlar and Andrew. Will fix my script to include charset info. -- error compiling committee.c: t

[kvm-devel] [PATCH 2/5] KVM: Add a global list of all virtual machines

2007-01-30 Thread Avi Kivity
This will allow us to iterate over all vcpus and see which cpus they are running on. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/kvm_main.c === --- linux-2.6.orig/drivers/kvm/kvm_main.c +++ linux-2.6/dr

[kvm-devel] [PATCH 8/11] KVM: Two-way apic tpr synchronization

2007-01-30 Thread Avi Kivity
From: Dor Laor <[EMAIL PROTECTED]> We report the value of cr8 to userspace on an exit. Also let userspace change cr8 when we re-enter the guest. The lets 64-bit guest code maintain the tpr correctly. Thanks for Yaniv Kamay for the idea. Signed-off-by: Dor Laor <[EMAIL PROTECTED]> Signed-off-by

[kvm-devel] [PATCH 1/11] KVM: optimize inline assembly

2007-01-30 Thread Avi Kivity
From: Ingo Molnar <[EMAIL PROTECTED]> forms like "0(%rsp)" generate an instruction with an unnecessary one byte displacement under certain circumstances. replace with the equivalent "(%rsp)". Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Index: linux-2.6/drivers/kvm/vmx.c =

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Dor Laor
>I did not install kvm using rpm because I compiled it (is there a rpm >for fedora core 6 ?) so I cannot find the kvm script on /etc/init.d You can build the kvm & kvm-kmod rpm by make rpm. This would be the best since it works out of the box. > >Then if I create the bridge when I add the eth2 in

Re: [kvm-devel] qemu vnc auth

2007-01-30 Thread Daniel P. Berrange
On Tue, Jan 30, 2007 at 01:03:20PM +0100, Yellis Services wrote: > Hello, > > I have adapted a xen path to kvm-qemu. > This patch enable auth in vnc > > qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto > > work with vncviewer on linux and Win. > Don't work with vncviewer applet via http, must b

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
I also think there is another problem: where is the tap interface ? ifconfig tap >= tap: unknown interface: No such device Does qemu-ifup add the tap interface to the bridge ? - Messaggio da [EMAIL PROTECTED] - Data: Tue, 30 Jan 2007 14:17:16 +0100 Da: [EMAIL PROTEC

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
I did not install kvm using rpm because I compiled it (is there a rpm for fedora core 6 ?) so I cannot find the kvm script on /etc/init.d Then if I create the bridge when I add the eth2 interface my system stop responding on the network. brctl addbr bridge (ok) brctl addif bridge eth2 then I co

Re: [kvm-devel] qemu vnc auth

2007-01-30 Thread Avi Kivity
Yellis Services wrote: > Hello, > > I have adapted a xen path to kvm-qemu. > This patch enable auth in vnc > > qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto > > work with vncviewer on linux and Win. > Don't work with vncviewer applet via http, must be fixed. > > Anthony, you're our qemu exp

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Dor Laor
Oops, my mistake, for your previous run I noticed you don't have a bridge set up at all. (I thought you have one named 'bridge' but that was a mistake.) So please run the kvm script, you can build & install the rpm and it will automatically add itself to the /etc/init.d dir. Alternative is to a

Re: [kvm-devel] [patch] kvm: qemu: fix configure defaults

2007-01-30 Thread Avi Kivity
Ingo Molnar wrote: > From: Ingo Molnar <[EMAIL PROTECTED]> > Subject: [patch] kvm: qemu: fix configure defaults > > i always found it weird that the Qemu version that comes with KVM has > kqemu enabled on x86 and x86_64 by default but not KVM ;-) Fix this. > Well, the top level ./configure doe

Re: [kvm-devel] [patch] KVM: fix vcpu freeing bug

2007-01-30 Thread Avi Kivity
Ingo Molnar wrote: > From: Ingo Molnar <[EMAIL PROTECTED]> > Subject: [patch] KVM: fix vcpu freeing bug > > vcpu_load() can return NULL and it sometimes does in failure paths (for > example when the userspace ABI version is too old) - causing a > preemption count underflow in the ->vcpu_free() la

Re: [kvm-devel] [patch] KVM: fix vcpu_clear() bug

2007-01-30 Thread Avi Kivity
Ingo Molnar wrote: > Subject: [patch] KVM: fix vcpu_clear() bug > From: Ingo Molnar <[EMAIL PROTECTED]> > > if vcpu_clear() is called on a not yet run vcpu then vcpu->cpu will be > -1. Check this case and dont call smp_call_function_single(-1). > > this patch fixes the crash i reported earlier and

Re: [kvm-devel] KVM performance

2007-01-30 Thread Avi Kivity
Rusty Russell wrote: >> The clever guest kernel will set the accessed bit (and the dirty bit on >> writable ptes) to avoid an rmw cycle by the hardware pagetable walker. >> >> [two instrumented runs later] >> >> Both Linux and Windows seem to do this optimization. >> > > Right. This (trivial

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
Ok At this time mai script /root/kvm-svn/kvm/scripts/qemu-ifup contains: #!/bin/sh #switch=$(ip route list | awk '/^default / { print $NF }') switch="bridge" ifconfig $1 0.0.0.0 up brctl addif ${switch} $1 If a try this: /usr/local/bin/qemu-system-x86_64 -no-acpi -hda /root/winXP/windows_kvm

Re: [kvm-devel] KVM performance

2007-01-30 Thread Rusty Russell
On Sun, 2007-01-28 at 11:40 +0200, Avi Kivity wrote: > Rusty Russell wrote: > I use virtbench (http://ozlabs.org/~rusty/virtbench) to try > > to measure optimization results; it still needs more tests (and an > > explicit kvm backend). > > A kvm backend would be appreciated. Yes, and patches

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Dor Laor
The problem is that the qemu-ifup script assumes you used the kvm script from the svn for bringing the bridge up. The kvm script puts the IP address on the bridge and also the default gw, thus the qemu-ifup script thinks your eth2 is the bridge. So either use the kvm script (in the scripts dire

[kvm-devel] qemu vnc auth

2007-01-30 Thread Yellis Services
Hello, I have adapted a xen path to kvm-qemu. This patch enable auth in vnc qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto work with vncviewer on linux and Win. Don't work with vncviewer applet via http, must be fixed. Emmanuel. diff -Naur kvm-12/qemu/d3des.c kvm-12.1/qemu/d3des.c --- kvm-

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
Here there is the report: rpm -q bridge-utils bridge-utils-1.1-2 /sbin/lsmod | grep bridge bridge 98929 0 /usr/sbin/brctl show bridge name bridge id STP enabled interfaces /sbin/ip route list | grep default default via 158.102.66.129 dev eth2 - Mes

[kvm-devel] A Friend

2007-01-30 Thread bestcasinos
Hello, A friend told us to give you the world's online best gambling deals! That's right: If you o

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Uri Lublin
Please run the following commands and report their output: rpm -q bridge-utils /sbin/lsmod | grep bridge /usr/sbin/brctl show /sbin/ip route list | grep default -Original Message- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Tue 30/01/2007 13:26 To: Dor Laor Cc: kv

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
Sorry, I did not understand ! Could me explain what I must put in the quemu-ifup script ? I am using the original supplayed by kvm svn !!! Thanks - Messaggio da [EMAIL PROTECTED] - Data: Tue, 30 Jan 2007 03:08:20 -0800 Da: Dor Laor <[EMAIL PROTECTED]> Rispondi-A: Dor Laor <[E

Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Dor Laor
>Good morning, I installed kvm 12 on a linux fedora core 6. >I also installed a windows XP guest but I am not able to setup bridging >network. >If I launch: >/usr/local/bin/qemu-system-x86_64 -no-acpi -hda >/root/winXP/windows_kvm.disk -boot c -m 1024 -cdrom >/root/winXP/winXP.iso -net nic -net >t

[kvm-devel] kvm 12 windows XP network

2007-01-30 Thread ignazio . cassano
Good morning, I installed kvm 12 on a linux fedora core 6. I also installed a windows XP guest but I am not able to setup bridging network. If I launch: /usr/local/bin/qemu-system-x86_64 -no-acpi -hda /root/winXP/windows_kvm.disk -boot c -m 1024 -cdrom /root/winXP/winXP.iso -net nic -net tap,s

[kvm-devel] [patch] qemu vnc auth

2007-01-30 Thread Yellis Services
Hello, I have adapted a xen path to kvm-qemu. This patch enable auth to vnc qemu ../.. -hda=/home/os.img -vnc -vncpasswd toto work with vncviewer on linux and Win. Don't work with vncviewer applet via http, must be fixed. Emmanuel. diff -Naur kvm-12/qemu/d3des.c kvm-12.1/qemu/d3des.c --- kvm-

[kvm-devel] [patch] KVM: fix vcpu_clear() bug

2007-01-30 Thread Ingo Molnar
Subject: [patch] KVM: fix vcpu_clear() bug From: Ingo Molnar <[EMAIL PROTECTED]> if vcpu_clear() is called on a not yet run vcpu then vcpu->cpu will be -1. Check this case and dont call smp_call_function_single(-1). this patch fixes the crash i reported earlier and -trunk now works fine on a 32

[kvm-devel] crash of latest trunk on SMP

2007-01-30 Thread Ingo Molnar
FYI, UP works fine, but a 32-bit SMP host crashes with latest trunk: BUG: at arch/i386/kernel/smp.c:177 send_IPI_mask_bitmask() [] show_trace_log_lvl+0x19/0x2e [] show_trace+0x12/0x14 [] dump_stack+0x14/0x16 [] send_IPI_mask_bitmask+0x55/0xb0 [] send_IPI_mask+0x8/0xa [] smp_call_function_si