Re: [kvm-devel] [ANNOUNCE] kvm-25 release

2007-05-24 Thread Avi Kivity
Laurent Vivier wrote: Compilation fails on my system (Debian etch on x86_64) gcc -I /home/vivierl/kvm-25/kernel/include -MMD -MF test/.bootstrap.d -g -fomit-frame-pointer -Wall -m64 -fno-stack-protector -std=gnu99 -ffreestanding -c -nostdlib -o test/bootstrap.o test/bootstrap.S

[kvm-devel] KVM Windows keyboard layout

2007-05-24 Thread Uwe Kubosch
Hi all! KVM is great! I am successfully running Windows Xp on KVM-24 in Fedora 7 test 4. I have even connected a CDROM drive, which was a bit of hassle. One problem I have is keyboard layout. I need a Norwegian keyboard layout to work, and I have installed this in the Linux host and in the

Re: [kvm-devel] [PATCH 00/10] in-kernel APIC v7 (kernel side)

2007-05-24 Thread Avi Kivity
Li, Xin B wrote: So you will check in the patch soon? Yes. Still need to test AMD and some odd guests. Really a good news since this will be the base for enabling SMP. SMP, faster paravirt drivers, TPR shadow on vmx... -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] KVM Windows keyboard layout

2007-05-24 Thread Avi Kivity
Uwe Kubosch wrote: On Thu, 2007-05-24 at 12:55 +0300, Avi Kivity wrote: One problem I have is keyboard layout. I need a Norwegian keyboard layout to work, and I have installed this in the Linux host and in the Windows XP guest, but no Norwegian characters show, and characters like

Re: [kvm-devel] KVM Windows keyboard layout

2007-05-24 Thread Avi Kivity
Uwe Kubosch wrote: If I skip the virt-manager, and start from the command line, could you give me an example for using sdl? Something like qemu-kvm nice.options.here my.image.file qemu-kvm is the right program to use, right? qemu-kvm -m 1024 your-image-file For virtual machine with

Re: [kvm-devel] KVM Windows keyboard layout

2007-05-24 Thread Uwe Kubosch
On Thu, 2007-05-24 at 13:56 +0300, Avi Kivity wrote: Uwe Kubosch wrote: If I skip the virt-manager, and start from the command line, could you give me an example for using sdl? Something like qemu-kvm nice.options.here my.image.file qemu-kvm is the right program to use, right?

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Gregory Haskins
On Thu, May 24, 2007 at 4:29 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Gregory Haskins wrote: Halting in userspace requires a relatively cumbersome mechanism to signal the halted VCPU. Implementing halt in kernel should be relatively straight forward and it

Re: [kvm-devel] [PATCH 00/10] in-kernel APIC v7 (kernel side)

2007-05-24 Thread Gregory Haskins
On Thu, May 24, 2007 at 5:38 AM, in message [EMAIL PROTECTED], Li, Xin B [EMAIL PROTECTED] wrote: So you will check in the patch soon? Really a good news since this will be the base for enabling SMP. - Xin Our plan is to run regressions tests with it at by Monday to check it in if there are

[kvm-devel] [PATCH 2/7] HOTPLUG: Adapt cpuset hotplug callback to CPU_DYING

2007-05-24 Thread Avi Kivity
CPU_DYING is called in atomic context, so don't try to take any locks. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- kernel/cpuset.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index f57854b..d4ab1c6 100644 --- a/kernel/cpuset.c

[kvm-devel] [PATCH 3/7] HOTPLUG: Adapt thermal throttle to CPU_DYING

2007-05-24 Thread Avi Kivity
CPU_DYING is notified in atomic context, so no taking mutexes here. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/i386/kernel/cpu/mcheck/therm_throt.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c

[kvm-devel] [PATCH 0/7] KVM: Suspend and cpu hotplug fixes

2007-05-24 Thread Avi Kivity
The following patchset makes kvm more robust wrt cpu hotunplug, and makes suspend-to-ram actually work. Suspend-to-disk benefits from the cpu hotunplug improvements as well. The major issue is that KVM wants to disable the virtualization extensions at a point in time when no user processes are

[kvm-devel] [PATCH 1/7] HOTPLUG: Add CPU_DYING notifier

2007-05-24 Thread Avi Kivity
KVM wants a notification when a cpu is about to die, so it can disable hardware extensions, but at a time when user processes cannot be scheduled on the cpu, so it doesn't try to use virtualization extensions after they have been disabled. This adds a CPU_DYING notification. The notification is

[kvm-devel] [PATCH 7/7] KVM: Use CPU_DYING for disabling virtualization

2007-05-24 Thread Avi Kivity
Only at the CPU_DYING stage can we be sure that no user process will be scheduled onto the cpu and oops when trying to use virtualization extensions. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- drivers/kvm/kvm_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Avi Kivity
This defines on_one_cpu() which is similar to smp_call_function_single() except that it works if cpu happens to be the current cpu. Can also be seen as a complement to on_each_cpu() (which also doesn't treat the current cpu specially). Signed-off-by: Avi Kivity [EMAIL PROTECTED] ---

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Avi Kivity
Gregory Haskins wrote: We have a specialized signal mask for the kernel, and it is already in effect here. See KVM_SET_SIGNAL_MASK. KVM_SET_SIGNAL_MASK is precisely what I was trying to counteract ;). Basically I was thinking that userspace could have set some arbitrary

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Gregory Haskins
So as long as any appropriate signal will kick the HLT out of this wait-queue, we are ok. It sounds like I can just get rid of the sigprocmask all together and this will work? If so, I will pull that out for the v8 drop I am about to make (rebased on git-head) On Thu, May 24, 2007 at 8:17

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Avi Kivity
Gregory Haskins wrote: So as long as any appropriate signal will kick the HLT out of this wait-queue, we are ok. It sounds like I can just get rid of the sigprocmask all together and this will work? Yes. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 0/7] KVM: Suspend and cpu hotplug fixes

2007-05-24 Thread Avi Kivity
Avi Kivity wrote: The following patchset makes kvm more robust wrt cpu hotunplug, and makes suspend-to-ram actually work. Suspend-to-disk benefits from the cpu hotunplug improvements as well. Here's the patchset diffstat in case anyone's interested:

[kvm-devel] [PATCH 0/9] in-kernel APIC v8 (kernel side)

2007-05-24 Thread Gregory Haskins
Changelog: v7 plus the following: 1) Rebased on git-head 2) Removed level-senstive patch. I re-read the spec more carefully and we had it right the first time. 3) Got rid of sigprocmask from vcpu_halt per comments Passes the usual tests, and offers an 11% speedup. There is another

[kvm-devel] [PATCH 1/9] KVM: Adds support for in-kernel mmio handlers

2007-05-24 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h | 60 +++ drivers/kvm/kvm_main.c | 94 ++-- 2 files changed, 142 insertions(+), 12 deletions(-) diff --git a/drivers/kvm/kvm.h

[kvm-devel] [PATCH 2/9] KVM: VMX - fix interrupt checking on light-exit

2007-05-24 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/vmx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index bfd5f8e..3411813 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1977,13 +1977,13 @@ static

[kvm-devel] [PATCH 3/9] KVM: Add irqdevice object

2007-05-24 Thread Gregory Haskins
The current code is geared towards using a user-mode (A)PIC. This patch adds an irqdevice abstraction, and implements a userint model to handle the duties of the original code. Later, we can develop other irqdevice models to handle objects like LAPIC, IOAPIC, i8259, etc, as appropriate

[kvm-devel] [PATCH 4/9] KVM: Adds ability to preempt an executing VCPU

2007-05-24 Thread Gregory Haskins
The VCPU executes synchronously w.r.t. userspace today, and therefore interrupt injection is pretty straight forward. However, we will soon need to be able to inject interrupts asynchronous to the execution of the VCPU due to the introduction of SMP, paravirtualized drivers, and asynchronous

[kvm-devel] [PATCH 5/9] KVM: Add support for in-kernel LAPIC model

2007-05-24 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/Makefile |2 drivers/kvm/kernint.c | 149 + drivers/kvm/kvm.h | 35 + drivers/kvm/kvm_main.c | 198 ++- drivers/kvm/lapic.c| 1418 drivers/kvm/svm.c

[kvm-devel] [PATCH 8/9] KVM: Add statistics from interrupt subsystem

2007-05-24 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |6 ++ drivers/kvm/kvm_main.c | 23 --- drivers/kvm/vmx.c |2 ++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index

[kvm-devel] [PATCH 9/9] KVM: Adds support for halting in the kernel

2007-05-24 Thread Gregory Haskins
Halting in userspace requires a relatively cumbersome mechanism to signal the halted VCPU. Implementing halt in kernel should be relatively straight forward and it eliminates the need for the signaling Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- drivers/kvm/kvm.h |3 ++

[kvm-devel] [PATCH 0/6] in-kernel APIC v8 (usermode side)

2007-05-24 Thread Gregory Haskins
v7 + rebase on git-head -Greg - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.

[kvm-devel] [PATCH 3/6] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs

2007-05-24 Thread Gregory Haskins
Non-performance critical code is made more awkward by having to always define both #ifdef KVM and if (kvm_allowed). Define kvm_allowed = 0 by default. Anthony Ligouri is credited with the idea. Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- qemu/qemu-kvm.c |9 - 1 files

[kvm-devel] [PATCH 6/6] KVM-USER: Check kvm extensions at runtime

2007-05-24 Thread Gregory Haskins
Newer userspace may run on an older kernel. Therefore we need a way to check the capabilities of the kernel so that we can downgrade userspace dynamically if necessary Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- qemu/qemu-kvm.c | 27 +++ user/kvmctl.c |

[kvm-devel] [PATCH 5/6] KVM: in-kernel-apic modification to QEMU

2007-05-24 Thread Gregory Haskins
Signed-off-by: Gregory Haskins [EMAIL PROTECTED] --- qemu/hw/apic.c | 35 ++- qemu/hw/pc.c| 34 -- qemu/qemu-kvm.c | 49 +++-- qemu/qemu-kvm.h |2 ++ qemu/vl.h | 11

[kvm-devel] [PATCH] KVM: Support vector backlogging

2007-05-24 Thread Gregory Haskins
There is still a minor issue with the in-kernel APIC (even in v8) w.r.t. informing QEMU about irq-windows. As a result, QEMU thinks there are more windows than there actually are, and pushes another round of interrupts down into the kernel. Since PICs can generally only queue 1-2 interrupts,

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Heiko Carstens
On Thu, May 24, 2007 at 03:10:12PM +0300, Avi Kivity wrote: This defines on_one_cpu() which is similar to smp_call_function_single() except that it works if cpu happens to be the current cpu. Can also be seen as a complement to on_each_cpu() (which also doesn't treat the current cpu

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Avi Kivity
Heiko Carstens wrote: On Thu, May 24, 2007 at 03:10:12PM +0300, Avi Kivity wrote: This defines on_one_cpu() which is similar to smp_call_function_single() except that it works if cpu happens to be the current cpu. Can also be seen as a complement to on_each_cpu() (which also doesn't treat

Re: [kvm-devel] [PATCH 4/7] SMP: Implement on_one_cpu()

2007-05-24 Thread Roland Dreier
I don't see any documented restrictions about preemption being disabled when this function is called, but... +int on_one_cpu(int cpu, void (*func) (void *info), void *info, + int retry, int wait) +{ +int ret; +int this_cpu; + +this_cpu = get_cpu(); what if a

[kvm-devel] [PATCH] fix missing headers

2007-05-24 Thread Joerg Roedel
Author: Markus Rechberger [EMAIL PROTECTED] kvm-25 won't compile against the latest git tree due missing header files. /devel/kvm-25/kernel# make make -C /lib/modules/2.6.22-rc2/build M=`pwd` $@ make[1]: Entering directory `/usr/src/linux-2.6' LD /devel/kvm-25/kernel/built-in.o CC [M]

[kvm-devel] Qemu crash with some livecds

2007-05-24 Thread Jan Hosek
With some linux livecds qemu crash before i see the (grub?) start menu. images which crash: kubuntu-7.04-desktop-i386.iso or openSUSE-10.2-GM-LiveDVD.iso image which dont crash: dsl-3.3.iso

Re: [kvm-devel] Performance comparaison with dbench on KVM

2007-05-24 Thread Anthony Liguori
Laurent Vivier wrote: Hi, I made some benchmarks with dbench on linux/KVM. IDE means I use an image disk with -hda SCSI means I use an image disk with -sda (see the patch I proposed on qemu list: http://www.mail-archive.com/[EMAIL PROTECTED]/msg08679.html ) threads KVM-21 KVM-21 KVM-24

Re: [kvm-devel] Performance comparaison with dbench on KVM

2007-05-24 Thread Laurent Vivier
Anthony Liguori wrote: Laurent Vivier wrote: Hi, I made some benchmarks with dbench on linux/KVM. IDE means I use an image disk with -hda SCSI means I use an image disk with -sda (see the patch I proposed on qemu list: http://www.mail-archive.com/[EMAIL PROTECTED]/msg08679.html )

Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v8 (kernel side)

2007-05-24 Thread Avi Kivity
Gregory Haskins wrote: Passes the usual tests, and offers an 11% speedup. There is another enhancement not included here (coming shortly) which exposes another 12% speedup over this as well. Stay tuned This fails on amd, locks up completely. Bisecting now. lapic.c needs a #include

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Carsten Otte
Gregory Haskins wrote: 1) I think I really want *any* signal to kick the HLT, so I temporarily unmask everything while halted. Acutally that'll cause trouble if people have device drivers in user space, which mask SIGIO for the CPU threads like our s390 prototype does. Consider leaving the

Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v8 (kernel side)

2007-05-24 Thread Avi Kivity
Avi Kivity wrote: Gregory Haskins wrote: Passes the usual tests, and offers an 11% speedup. There is another enhancement not included here (coming shortly) which exposes another 12% speedup over this as well. Stay tuned This fails on amd, locks up completely. Bisecting now. lapic.c

Re: [kvm-devel] [PATCH 10/10] KVM: Adds support for halting in the kernel

2007-05-24 Thread Gregory Haskins
On Thu, May 24, 2007 at 10:57 AM, in message [EMAIL PROTECTED], Carsten Otte [EMAIL PROTECTED] wrote: Gregory Haskins wrote: 1) I think I really want *any* signal to kick the HLT, so I temporarily unmask everything while halted. Acutally that'll cause trouble if people have device drivers

Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v8 (kernel side)

2007-05-24 Thread Avi Kivity
Gregory Haskins wrote: On Thu, May 24, 2007 at 10:58 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Avi Kivity wrote: Gregory Haskins wrote: Passes the usual tests, and offers an 11% speedup. There is another enhancement not included here

Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v8 (kernel side)

2007-05-24 Thread Gregory Haskins
On Thu, May 24, 2007 at 11:06 AM, in message [EMAIL PROTECTED], Avi Kivity [EMAIL PROTECTED] wrote: Gregory Haskins wrote: I bet it has something to do with the local_irq_disable vs clgi in the kvm_run() code. clgi() overrides local irq, so I don't see how that happens. Im just

Re: [kvm-devel] Performance comparaison with dbench on KVM

2007-05-24 Thread Anthony Liguori
Laurent Vivier wrote: Anthony Liguori wrote: Hi Anthony, I didn't modify aio_init limit... It would be pretty useful to give it a try. In qemu_aio_init() where aio_init() get's called. If you just bump aio_threads and aio_num from 1 to, say, 32. You should see a big difference in

Re: [kvm-devel] compile error with kvm-25

2007-05-24 Thread Anthony Liguori
Axel Kittenberger wrote: Hello List! I just downloaded kvm-25 and get following error while trying compile. Avi just fixed this in git. Regards, Anthony Liguori (Because the kvm 0.8 that came with my distro, always crashed after 1 second into trying to boot an qemu-installed Windows

Re: [kvm-devel] [PATCH 0/7] KVM: Suspend and cpu hotplug fixes

2007-05-24 Thread Shaohua Li
On Thu, 2007-05-24 at 20:10 +0800, Avi Kivity wrote: The following patchset makes kvm more robust wrt cpu hotunplug, and makes suspend-to-ram actually work. Suspend-to-disk benefits from the cpu hotunplug improvements as well. The major issue is that KVM wants to disable the virtualization