Re: [kvm-devel] apic+ioapiuc patch

2007-07-17 Thread Dong, Eddie
If guest is in hlt time, vcpu-guest_mode=0. (VM Exit always clear this one). BTW, even we give a redunadant IPI, it is just a minor performance issue only. I think that Avi was looking for the call to wake_up_interruptible(vcpu-wq); Maybe it's hard to realize the apic code path where you call

Re: [kvm-devel] kvm-27 vs 28 I/O speed

2007-07-17 Thread Avi Kivity
Luca wrote: So, would it be correct to revert the patch enabling the ports, assuming people use the kvm-supplied bios? I think so. Please confirm that the original test case (I think it was the FC7 installer?) works with the kvm bios. Where does the BIOS come from? Latest Bochs? Yes.

Re: [kvm-devel] apic+ioapiuc patch

2007-07-17 Thread Avi Kivity
Dong, Eddie wrote: If guest is in hlt time, vcpu-guest_mode=0. (VM Exit always clear this one). BTW, even we give a redunadant IPI, it is just a minor performance issue only. I think that Avi was looking for the call to

Re: [kvm-devel] [PATCH 2/3] KVM - Fix hypercall arguments

2007-07-17 Thread Avi Kivity
Jeff Dike wrote: It looks like kvm_hypercall is trying to match the system call convention and mixed up the call number and first argument in the 32-bit case. Signed-off-by: Jeff Dike [EMAIL PROTECTED] -- drivers/kvm/kvm_main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [kvm-devel] [PATCH 3/3] KVM - add hypercall nr to kvm_run

2007-07-17 Thread Avi Kivity
Jeff Dike wrote: Add the hypercall number to kvm_run and initialize it. This might be considered API-changing, so I kept it separate. Signed-off-by: Jeff Dike [EMAIL PROTECTED] -- drivers/kvm/kvm_main.c |1 + include/linux/kvm.h|1 + 2 files changed, 2 insertions(+) Index:

Re: [kvm-devel] [PATCH 1/3] KVM - Add missing kvm_run initializations

2007-07-17 Thread Avi Kivity
Jeff Dike wrote: There are a bunch of missing initializations of run-exit_reason and associated data. kvm_hypercall wasn't setting exit_reason at all. When exit_reason is KVM_EXIT_MMIO, the mmio data isn't initialized. I don't know what it should be, so I just stuck a FIXME in there.

Re: [kvm-devel] kvm.git git question

2007-07-17 Thread Avi Kivity
Gregory Haskins wrote: Is there a way I can see a list of commits that are related only to KVM since 2.6.22 without seeing all the stuff from upstream? If 'kvm' is the remote referencing kvm.git and 'origin' references -linus, git log kvm/master ^origin/master will show all commits

Re: [kvm-devel] [RESOLVED] Re: kvm-29 failing to exit or reboot

2007-07-17 Thread Avi Kivity
Charles Duffy wrote: On rereading this post, I find that I forgot to mention my use of -no-reboot. As I wish the VM to exit on a reboot attempt (and kvm --help documents -no-reboot as exit instead of rebooting), I am using said flag. If I leave out -no-reboot, reboot -f causes kvm to exit

Re: [kvm-devel] [PATCH 3/3] KVM - add hypercall nr to kvm_run

2007-07-17 Thread Avi Kivity
Avi Kivity wrote: Jeff Dike wrote: Add the hypercall number to kvm_run and initialize it. This might be considered API-changing, so I kept it separate. Signed-off-by: Jeff Dike [EMAIL PROTECTED] -- drivers/kvm/kvm_main.c |1 + include/linux/kvm.h|1 + 2 files changed, 2

Re: [kvm-devel] Add string PIO support

2007-07-17 Thread Avi Kivity
Dong, Eddie wrote: Avi: This is to add kernel string pio support which is used by some of Windows version. The patch is developped on top of lapic2 branch but should be fine to mainline head too. thanks, eddie Applied, thanks. -- error compiling committee.c: too many arguments

[kvm-devel] [PATCH 1/10] Trivial: /dev/kvm interface is no longer experimental.

2007-07-17 Thread Rusty Russell
KVM interface is no longer experimental. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 4e57f5c6d4a9 include/linux/kvm.h --- a/include/linux/kvm.h Tue Jul 17 13:04:58 2007 +1000 +++ b/include/linux/kvm.h Tue Jul 17 13:09:54 2007 +1000 @@ -4,8 +4,7 @@ /* * Userspace

[kvm-devel] [PATCH 3/10] Trivial: Remove unused struct cpu_user_regs declaration

2007-07-17 Thread Rusty Russell
Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 725f52d66cc0 drivers/kvm/x86_emulate.h --- a/drivers/kvm/x86_emulate.h Tue Jul 17 13:25:52 2007 +1000 +++ b/drivers/kvm/x86_emulate.h Tue Jul 17 13:33:34 2007 +1000 @@ -112,8 +112,6 @@ struct x86_emulate_ops { }; -struct cpu_user_regs; -

[kvm-devel] [PATCH 4/10] Trivial: Make decode_register() static

2007-07-17 Thread Rusty Russell
I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r c7348ac9677f drivers/kvm/x86_emulate.c ---

[kvm-devel] [PATCH 5/10] Trivial: Comment spelling may escape grep

2007-07-17 Thread Rusty Russell
Speling error in comment. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r f8a814265118 drivers/kvm/x86_emulate.c --- a/drivers/kvm/x86_emulate.c Tue Jul 17 13:35:26 2007 +1000 +++ b/drivers/kvm/x86_emulate.c Tue Jul 17 13:36:15 2007 +1000 @@ -6,7 +6,7 @@ * Copyright (c) 2005 Keir Fraser

[kvm-devel] [PATCH 6/10] Trivial: Avoid hardware_disable predeclaration

2007-07-17 Thread Rusty Russell
Don't pre-declare hardware_disable: shuffle the reboot hook down. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 1bfd3798620c drivers/kvm/kvm_main.c --- a/drivers/kvm/kvm_main.cTue Jul 17 13:36:23 2007 +1000 +++ b/drivers/kvm/kvm_main.cTue Jul 17 16:25:23 2007 +1000 @@ -53,8

[kvm-devel] [PATCH 7/10] Trivial: Use standard CR0 flags macros from asm/cpu-features.h

2007-07-17 Thread Rusty Russell
The kernel now has asm/cpu-features.h: use those macros instead of inventing our own. Also spell out definition of CR0_RESEVED_BITS (no code change) and fix typo. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 6deb1d1318f4 drivers/kvm/kvm.h --- a/drivers/kvm/kvm.h Tue Jul 17 16:27:26

[kvm-devel] virtio implementation?

2007-07-17 Thread Gregory Haskins
Hi Rusty, I was curious if there are any implementations of your virtio substrate for KVM yet? And if not, I can offer help to get this done as I have an immediate need for a ring-buffer like PV channel. Regards, -Greg -

[kvm-devel] [PATCH 1/3] KVM: MMU: Store nx bit for large page shadows

2007-07-17 Thread Avi Kivity
We need to distinguish between large page shadows which have the nx bit set and those which don't. The problem shows up when booting a newer smp Linux kernel, where the trampoline page (which is in real mode, which uses the same shadow pages as large pages) is using the same mapping as a kernel

[kvm-devel] [PATCH 3/3] KVM: x86 emulator: implement rdmsr and wrmsr

2007-07-17 Thread Avi Kivity
Allow real-mode emulation of rdmsr and wrmsr. This allows smp Windows to boot, presumably for its sipi trampoline. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- drivers/kvm/kvm.h |2 ++ drivers/kvm/kvm_main.c|8 drivers/kvm/x86_emulate.c | 26

[kvm-devel] [PATCH 2/3] KVM: Fix memory slot management functions for guest smp

2007-07-17 Thread Avi Kivity
The memory slot management functions were oriented against vcpu 0, where they should be kvm-wide. This causes hangs starting X on guest smp. Fix by making the functions (and resultant tail in the mmu) non-vcpu-specific. Unfortunately this reduces the efficiency of the mmu object cache a bit. We

Re: [kvm-devel] [PATCH 2/10] Trivial: Remove KVM_IRQ_BITMAP macro

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: Creating one's own BITMAP macro seems suboptimal: if we use manual arithmetic in the one place exposed to userspace, we can use standard macros elsewhere. The - 7 + 8 calc is overkill: can NR_IRQ_WORDS ever really change? Looks like it can: /* for

Re: [kvm-devel] questions about ack_intr_on_exit and preemption hooks

2007-07-17 Thread Stephane Eranian
Avi, On Fri, Jul 13, 2007 at 09:53:36AM +0300, Avi Kivity wrote: Stephane Eranian wrote: Avi, A couple of months back, we had a discussion about PMU virtualization and the difficulty I encountered trying to catch the PMU interrupt vector in kvm on VM-exit. KVM does not set

Re: [kvm-devel] [PATCH 1/10] Trivial: /dev/kvm interface is no longer experimental.

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: KVM interface is no longer experimental. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 4e57f5c6d4a9 include/linux/kvm.h --- a/include/linux/kvm.h Tue Jul 17 13:04:58 2007 +1000 +++ b/include/linux/kvm.h Tue Jul 17 13:09:54 2007 +1000 @@ -4,8 +4,7 @@

Re: [kvm-devel] [PATCH 4/10] Trivial: Make decode_register() static

2007-07-17 Thread Gregory Haskins
On Tue, 2007-07-17 at 23:16 +1000, Rusty Russell wrote: I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). On this topic, here's an idea I have been kicking around for a

Re: [kvm-devel] [PATCH 3/10] Trivial: Remove unused struct cpu_user_regs declaration

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 725f52d66cc0 drivers/kvm/x86_emulate.h --- a/drivers/kvm/x86_emulate.h Tue Jul 17 13:25:52 2007 +1000 +++ b/drivers/kvm/x86_emulate.h Tue Jul 17 13:33:34 2007 +1000 @@ -112,8 +112,6 @@ struct

Re: [kvm-devel] [PATCH 4/10] Trivial: Make decode_register() static

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 5/10] Trivial: Comment spelling may escape grep

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: Speling error in comment. Aplied, thanks. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE

Re: [kvm-devel] virtio implementation?

2007-07-17 Thread Dor Laor
Hi Rusty, I was curious if there are any implementations of your virtio substrate for KVM yet? And if not, I can offer help to get this done as I have an immediate need for a ring-buffer like PV channel. Regards, -Greg Actually I was planning of doing it. I'm maintaining our not-merged PV

Re: [kvm-devel] [PATCH 6/10] Trivial: Avoid hardware_disable predeclaration

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: Don't pre-declare hardware_disable: shuffle the reboot hook down. Applied, thanks. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by DB2 Express

[kvm-devel] [PATCH 8/10] Use standard CR3 flags, tighten checking

2007-07-17 Thread Rusty Russell
The kernel now has asm/cpu-features.h: use those macros instead of inventing our own. Also spell out definition of CR3_RESEVED_BITS, fix spelling and tighten it for the non-PAE case. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r a253a0af3da6 drivers/kvm/kvm.h --- a/drivers/kvm/kvm.h

Re: [kvm-devel] [PATCH 7/10] Trivial: Use standard CR0 flags macros from asm/cpu-features.h

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: The kernel now has asm/cpu-features.h: use those macros instead of inventing our own. Also spell out definition of CR0_RESEVED_BITS (no code change) and fix typo. Long overdue. Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 8/10] Use standard CR3 flags, tighten checking

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: The kernel now has asm/cpu-features.h: use those macros instead of inventing our own. Also spell out definition of CR3_RESEVED_BITS, fix spelling and tighten it for the non-PAE case. Applied, thanks. Watch out for trailing whitespace! -- error compiling

Re: [kvm-devel] virtio implementation?

2007-07-17 Thread Gregory Haskins
On Tue, 2007-07-17 at 06:31 -0700, Dor Laor wrote: You're welcome to rip my ring code ;) Point me at the code, if you would. I would be happy to use it as a base. :) - This SF.net email is sponsored by DB2 Express

Re: [kvm-devel] [PATCH 4/10] Trivial: Make decode_register() static

2007-07-17 Thread Dor Laor
I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). On this topic, here's an idea I have been kicking around for a while: If the x86_emulate code is so buggy/incomplete,

Re: [kvm-devel] [PATCH 9/10] Use standard CR4 flags, tighten checking

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: On this machine (Intel), writing to the CR4 bits 0x0800 and 0x1000 cause a GPF. The Intel manual is a little unclear, but AFIACT they're reserved, too. Also fix spelling of CR4_RESEVED_BITS. Applied, thanks. -- error compiling committee.c: too many

Re: [kvm-devel] [PATCH 4/10] Trivial: Make decode_register() static

2007-07-17 Thread Anthony Liguori
Gregory Haskins wrote: On Tue, 2007-07-17 at 23:16 +1000, Rusty Russell wrote: I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). On this topic, here's an idea

Re: [kvm-devel] [PATCH 10/10] Use standard CR8 flags, and fix TPR definition

2007-07-17 Thread Avi Kivity
Rusty Russell wrote: Intel manual (and KVM definition) say it's TPR is 4 bits wide. Also fix CR8_RESEVED_BITS typo. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r 6ef0b4c0d6f7 include/asm-i386/processor-flags.h --- a/include/asm-i386/processor-flags.h Tue Jul 17 18:07:48 2007

Re: [kvm-devel] Trivial: Make decode_register() static

2007-07-17 Thread Mike Day
On 17/07/07 08:41 -0500, Anthony Liguori wrote: Gregory Haskins wrote: On Tue, 2007-07-17 at 23:16 +1000, Rusty Russell wrote: I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to

Re: [kvm-devel] questions about ack_intr_on_exit and preemption hooks

2007-07-17 Thread Avi Kivity
Stephane Eranian wrote: Avi, On Fri, Jul 13, 2007 at 09:53:36AM +0300, Avi Kivity wrote: Stephane Eranian wrote: Avi, A couple of months back, we had a discussion about PMU virtualization and the difficulty I encountered trying to catch the PMU interrupt vector in kvm on

Re: [kvm-devel] [PATCH 3/3] KVM - add hypercall nr to kvm_run

2007-07-17 Thread Anthony Liguori
Avi Kivity wrote: Jeff Dike wrote: Add the hypercall number to kvm_run and initialize it. This might be considered API-changing, so I kept it separate. Signed-off-by: Jeff Dike [EMAIL PROTECTED] -- drivers/kvm/kvm_main.c |1 + include/linux/kvm.h|1 + 2 files changed, 2

Re: [kvm-devel] apic+ioapiuc patch

2007-07-17 Thread Dong, Eddie
+unsigned long get_cr8(struct kvm_vcpu *vcpu) +{ + if (irqchip_in_kernel(vcpu-kvm)) + return kvm_lapic_get_cr8(vcpu); + else + return vcpu-cr8; +} +EXPORT_SYMBOL_GPL(get_cr8); How about keep vcpu-cr8 even with kernel lapic? then we don't need this. We

Re: [kvm-devel] [PATCH 10/10] Use standard CR8 flags, and fix TPR definition

2007-07-17 Thread H. Peter Anvin
Rusty Russell wrote: Intel manual (and KVM definition) say it's TPR is 4 bits wide. Also fix CR8_RESEVED_BITS typo. Signed-off-by: Rusty Russell [EMAIL PROTECTED] Indeed it is. Acked-by: H. Peter Anvin [EMAIL PROTECTED] -hpa

Re: [kvm-devel] [PATCH 10/10] Use standard CR8 flags, and fix TPR definition

2007-07-17 Thread H. Peter Anvin
Avi Kivity wrote: X86_CR8_TPR is not used in the kernel. But is this meant to be a mask, or something else? Yes, a mask. And no, it's not used, except for KVM... -hpa - This SF.net email is sponsored by DB2

Re: [kvm-devel] [PATCH 3/3] KVM - add hypercall nr to kvm_run

2007-07-17 Thread Jeff Dike
On Tue, Jul 17, 2007 at 09:15:51AM -0500, Anthony Liguori wrote: I'm planning on breaking this interface again since the new hypercall API only takes 4 arguments instead of 6. Is anything written anywhere about this hypercall interface? The thing which would make me happy (which the current

Re: [kvm-devel] virtio implementation?

2007-07-17 Thread Dor Laor
You're welcome to rip my ring code ;) Point me at the code, if you would. I would be happy to use it as a base. :) It's under git://kvm.qumranet.com/home/dor/export/[kvm.git kvm-userspace.git] Enojy, I hope that in a week or two (busy) I'll start sending patches with cleanup of the current

Re: [kvm-devel] capturing debug outputs

2007-07-17 Thread Luca
On 7/17/07, eric magaoay [EMAIL PROTECTED] wrote: Hi, I'm trying to capture debugs output (kernel panic) using -kernel and -serial options but nothing is coming out of /dev/ttyS0 (using minicom). Hi, you have to tell the kernel to use the serial port as a console (the same way you do with

Re: [kvm-devel] [GIT PULL][RESEND #2] KVM Updates for 2.6.23-rc1

2007-07-17 Thread S.Çağlar Onur
Hi; 17 Tem 2007 Sal tarihinde, Avi Kivity şunları yazmıştı: I fixed the issue with the previous patchset. Please provide further feedback, or pull from: git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git for-linus This contains kvm updates for the 2.6.23 merge window, including

Re: [kvm-devel] [GIT PULL][RESEND #2] KVM Updates for 2.6.23-rc1

2007-07-17 Thread Linus Torvalds
On Tue, 17 Jul 2007, H. Peter Anvin wrote: S.Çağlar Onur wrote: If i'm not wrong X86_CMPXCHG64 depends on CONFIG_X86_PAE which depends on HIGHMEM64 and again if i'm not wrong this means distributions who wants to provide KVM must enable CONFIG_X86_PAE and CONFIG_HIGHMEM64G from now

Re: [kvm-devel] [GIT PULL][RESEND #2] KVM Updates for 2.6.23-rc1

2007-07-17 Thread Anthony Liguori
S.Çağlar Onur wrote: Hi; 17 Tem 2007 Sal tarihinde, Avi Kivity şunları yazmıştı: I fixed the issue with the previous patchset. Please provide further feedback, or pull from: git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git for-linus This contains kvm updates for the 2.6.23

Re: [kvm-devel] apic+ioapiuc patch

2007-07-17 Thread Dong, Eddie
This is the ioapic patch. With this on rebased lapic2 branch, Both Win2003/Xp and Rhel5 works well. Appreciate if this can be in the branch so that I can fully move to live migration support. thx,eddie kernel apic/ioapic support Signed-off-by: Yaozu (Eddie) Dong [EMAIL PROTECTED]

Re: [kvm-devel] apic+ioapiuc patch

2007-07-17 Thread Dong, Eddie
Missed attachment. Here it is. ioapic-30-4.user.patch Description: ioapic-30-4.user.patch ioapic-30-4.patch Description: ioapic-30-4.patch - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE

Re: [kvm-devel] [PATCH 2/10] Trivial: Remove KVM_IRQ_BITMAP macro

2007-07-17 Thread Rusty Russell
On Tue, 2007-07-17 at 16:25 +0300, Avi Kivity wrote: Rusty Russell wrote: Creating one's own BITMAP macro seems suboptimal: if we use manual arithmetic in the one place exposed to userspace, we can use standard macros elsewhere. The - 7 + 8 calc is overkill: can NR_IRQ_WORDS ever really