[PATCH] kvm: external module: fix anon_inodes for 2.6.22

2008-07-19 Thread Avi Kivity
From: Jan Kiszka [EMAIL PROTECTED] 2.6.22 came with anon_inode_getfd, but it didn't export it. Since 2.6.23 it is usable for modules, too. Signed-off-by: Jan Kiszka [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/kernel/anon_inodes.c b/kernel/anon_inodes.c index

[PATCH] kvm: qemu: remove hypercall device

2008-07-19 Thread Avi Kivity
From: Anthony Liguori [EMAIL PROTECTED] this was never used by any released code. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/qemu/Makefile.target b/qemu/Makefile.target index 7a51cd0..54480e4 100644 --- a/qemu/Makefile.target +++

[PATCH] kvm: qemu: add info kvm monitor command

2008-07-19 Thread Avi Kivity
From: Anthony Liguori [EMAIL PROTECTED] Add an 'info kvm' command to the monitor to be used to determine if KVM is active. It's very similar to the existing 'info kqemu' command. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git

[PATCH] kvm: qemu: re-add declaration of qemu_get_launch_info()

2008-07-19 Thread Avi Kivity
From: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] somehow missing from sysemu.h after a qemu merge and otherwise complaining with the following warning : kvm-71/qemu/migration.c: In function 'migration_init_ssh': kvm-71/qemu/migration.c:629: warning: implicit declaration of function

[PATCH] kvm: qemu: remove duplicated inclusion of signal.h in qemu-kvm.h

2008-07-19 Thread Avi Kivity
From: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] added by mistake as part of 4820cce75999b2673a964eb87601229a4bd78ad9 Signed-off-by: Carlo Marcelo Arenas Belon [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.h b/qemu/qemu-kvm.h index 8b7dcde..7e28428

[PATCH] kvm: libkvm: s390 port

2008-07-19 Thread Avi Kivity
From: Carsten Otte [EMAIL PROTECTED] Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index 48a8dff..2c54e95 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ DESTDIR= rpmrelease = devel -sane-arch =

[PATCH] KVM: VMX: Avoid vmwrite(HOST_RSP) when possible

2008-07-19 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Usually HOST_RSP retains its value across guest entries. Take advantage of this and avoid a vmwrite() when this is so. Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 48ab60d..0c1cbe5 100644 ---

[PATCH] KVM: Avoid instruction emulation when event delivery is pending

2008-07-19 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] When an event (such as an interrupt) is injected, and the stack is shadowed (and therefore write protected), the guest will exit. The current code will see that the stack is shadowed and emulate a few instructions, each time postponing the injection.

Re: Vista Support and USB2 Support???

2008-07-19 Thread Thomas Mueller
On Fri, 18 Jul 2008 07:16:46 -0400, George Styles wrote: uname -a Linux ubuntu 2.6.24-16-generic #1 SMP it looks like KVM 1:62 is the version in the Ubuntu repo. So my question is 1. Should I build a more recent verison of KVM from source? google says that Vista support was added in

Re: KSM Algorithm

2008-07-19 Thread Sukanto Ghosh
Going through your slide increasing the virtual machine density with ksm I got an idea about how KSM works internally. 1. Scan registered memory area 2. During scan of every page P, generate hashval = hashfn(content of P) 3. The hashval is used as an index into the hashtable, the pfn of P is

Re: [PATCH] qemu-kvm: Fix test for I/O thread

2008-07-19 Thread Avi Kivity
Jan Kiszka wrote: Looks to me like this was rather intended. But given that 4e8b8a6d92c5ece048e65be3a3980d24f065b32b claims to actually fix a bug in its original broken form, please have a careful look. Signed-off-by: Jan Kiszka [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c

Re: [PATCH] kvm: external module: fix anon_inode build for 2.6.26

2008-07-19 Thread Avi Kivity
Alex Williamson wrote: Hi Avi, Commit 330f89ee1c19172b7b0dea739b912afc265bd755 doesn't build on 2.6.26 for some obvious undefined variables. Looks like a cut-n-paste error. Patch below. Thanks, Applied, thanks. -- I have a truly marvellous patch that fixes the bug which this signature

Re: Cannot activate Windows Server 2008

2008-07-19 Thread Avi Kivity
Jonathan Mezach wrote: Hi guys, I've recently gotten KVM to work on my Slamd64 12.1 machine running kernel 2.6.26. Once I got everything up and running I tried installing Windows Server 2008. The installation went fine and I can get everything up and running and it seems to be working fine.

Re: qemu oddness with isolinux vesamenu.c32

2008-07-19 Thread Avi Kivity
H. Peter Anvin wrote: Furthermore, it is completely unnecessary. Instead of stuffing the old pointer in an interupt vector and using the INT instruction, stuff it in a variable in the local code segment, and use the following sequence: pushf lcallw *%cs:old_vector In order to do this

Re: Questions on the VMentry failure patch

2008-07-19 Thread Avi Kivity
Mohammed Gamal wrote: It might be a host interrupt, forcing an exit (and an entry) at a random point, which then fails. It might be a host interrupt, forcing an exit (and an entry) at a random point, which then fails. I tried to disable vmexits on external interrupts in enter_rmode().

Re: [PATCH 5/5] Remove change to TARGET_PAGE_SIZE

2008-07-19 Thread Avi Kivity
Anthony Liguori wrote: This is unnecessary sign-extension will do the Right Thing. Well, I think it is better to be explicit about it, but we do want to stay close to qemu, so I applied this. Paul Brook also objects strongly to it because it's unnecessary. The smaller the patch, the

Re: [PATCH 1/2] Remove application name decoration

2008-07-19 Thread Avi Kivity
Anthony Liguori wrote: Decorating the application name is not the best way to let users figure out if KVM is enabled or not. It's impossible for management applications to figure out, inconsistent with other accelerators like kqemu, and clutters the title bar. We may experience a little user

Re: [PATCH v3] libkvm-s390

2008-07-19 Thread Avi Kivity
Christian Borntraeger wrote: From: Carsten Otte [EMAIL PROTECTED] From: Christian Borntraeger [EMAIL PROTECTED] This is an update patch for libkvm to build and work on s390. It should address Avis and Christians comments. Tested on s390. Compile tested on i386. Applied, thanks. -- I have

Re: Sharing variables/memory between host and guest ?

2008-07-19 Thread Avi Kivity
Arn wrote: How can one share memory (a few variables not necessarily a page) between host/hypervisor and guest VM ? If you use the -mem-path qemu option, all guest memory will be in a file on tmpfs. You can mmap that file and access all guest memory. Of course, this is hitting the

Re: [PATCH 3/5] Remove whitespace in VMDK code.

2008-07-19 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Again, most likely a bad merge. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/block-vmdk.c b/qemu/block-vmdk.c index 67dd2f1..843bf86 100644 --- a/qemu/block-vmdk.c +++ b/qemu/block-vmdk.c @@ -93,6 +93,7 @@ typedef struct

Re: Cannot activate Windows Server 2008

2008-07-19 Thread Jonathan Mezach
On Saturday 19 July 2008 09:24:07 Avi Kivity wrote: Jonathan Mezach wrote: Hi guys, I've recently gotten KVM to work on my Slamd64 12.1 machine running kernel 2.6.26. Once I got everything up and running I tried installing Windows Server 2008. The installation went fine and I can get

Re: Cannot activate Windows Server 2008

2008-07-19 Thread Mohammed Gamal
On Sat, Jul 19, 2008 at 5:58 PM, Jonathan Mezach [EMAIL PROTECTED] wrote: On Saturday 19 July 2008 09:24:07 Avi Kivity wrote: Jonathan Mezach wrote: Hi guys, I've recently gotten KVM to work on my Slamd64 12.1 machine running kernel 2.6.26. Once I got everything up and running I tried

Re: [PATCH] posix-timers: Do not modify an already queued timer signal

2008-07-19 Thread Oleg Nesterov
On 07/18, Mark McLoughlin wrote: On Thu, 2008-07-17 at 17:55 +0400, Oleg Nesterov wrote: I forgot (if ever knew ;) this code completely, but can't we make a simpler fix? posix_timer_event() can check list_empty() lockless, posix_timer_event() { if

KVM: x86: do not execute guest code if vcpu not runnable

2008-07-19 Thread Marcelo Tosatti
If a vcpu has been offlined, or not initialized at all, signals requesting userspace work to be performed will result in KVM attempting to re-entry guest mode. Problem is that the in-kernel irqchip emulation happily executes HALTED state vcpu's. This breaks savevm on Windows SMP installation,

Re: qemu oddness with isolinux vesamenu.c32

2008-07-19 Thread H. Peter Anvin
Avi Kivity wrote: kvm allows writing into the bios; qemu does not. I thought it was a kvm bug, but turns out that it's a qemu bug... (though to be fair, true emulation ought to start out read-only, then be enabled by the bios ram shadow mechanism) Yes, although simulating the memory

[patch 1/3] KVM: task switch: translate guest segment limit to virt-extension byte granular field

2008-07-19 Thread Marcelo Tosatti
If 'g' is one then limit is 4kb granular. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-vmx-checks/arch/x86/kvm/x86.c === --- kvm-vmx-checks.orig/arch/x86/kvm/x86.c +++ kvm-vmx-checks/arch/x86/kvm/x86.c @@ -3195,6

[patch 0/3] task switch fixes

2008-07-19 Thread Marcelo Tosatti
Some more fixes for the task switch emulation. I think the problem is in seg_desct_to_kvm_desct() (besides the extra T's). It copies the limit from the descriptor directly to the kvm_segment structure. You're right. After fixing that 2003 Server task switches successfully to an EIP that

[patch 3/3] KVM: task switch: check for segment base translation failure

2008-07-19 Thread Marcelo Tosatti
Subject says it all. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-vmx-checks/arch/x86/kvm/x86.c === --- kvm-vmx-checks.orig/arch/x86/kvm/x86.c +++ kvm-vmx-checks/arch/x86/kvm/x86.c @@ -3253,6 +3253,8 @@ static int

Re: KVM: x86: do not execute guest code if vcpu not runnable

2008-07-19 Thread Marcelo Tosatti
On Sat, Jul 19, 2008 at 03:11:44PM -0300, Marcelo Tosatti wrote: If a vcpu has been offlined, or not initialized at all, signals requesting userspace work to be performed will result in KVM attempting to re-entry guest mode. Problem is that the in-kernel irqchip emulation happily executes

Odd remapping of keyboard in KVM

2008-07-19 Thread David Liontooth
On a fresh install of Debian Lenny am64 with a 2.6.24 kernel, I installed kqemu-common and kqemu-source, and built the module and inserted it into the kernel: module-assistant auto-install kqemu modprobe kvm_intel kvm kqemu I rebooted to make sure /etc/sysconfig/modules/kvm.modules

Re: qemu oddness with isolinux vesamenu.c32

2008-07-19 Thread H. Peter Anvin
H. Peter Anvin wrote: Yes, although simulating the memory pre-shadowed works just as well; then it should be marked readonly by the BIOS immediately prior to running INT 19h. On top of this, getting proper DDIM support and PCI expansion ROM into the BIOS would be a good thing. A PCI

mmu notifier spte pinning

2008-07-19 Thread Sukanto Ghosh
Hi all, I was going through the slides Integrating KVM with the linux memory management on MMU notifiers. can anyone tell me ... if spte is invisible to linux vm, then why does page-_mapcount increments when a spte mapping is created ? is it done explicitly by the kvm code (if so, why) ? do