Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Avi Kivity
Laurent Vivier wrote: > Avi Kivity wrote: > >> Laurent Vivier (Bull) wrote: >> Not being able to emulate is sometimes legitimate. In the case of writing to a write-protected guest page table, we simply un-write-protect it and go back to the guest (which should now execute >>

Re: [kvm-devel] Windows 2003 Server R2 networking

2007-09-17 Thread Haydn Solomon
Thanks a bunch wes.. works now, you're a genius. I didn't know it would override -net user... need to spend more time playing with qemu. On 9/17/07, Wes <[EMAIL PROTECTED]> wrote: > > Yep. > As soon as you specify '-net nic' it over-rides this default setting and > therefore requires the additiona

Re: [kvm-devel] Windows 2003 Server R2 networking

2007-09-17 Thread Wes
Yep. As soon as you specify '-net nic' it over-rides this default setting and therefore requires the additional -net user or -net tap afterwards On 9/18/07, Haydn Solomon <[EMAIL PROTECTED]> wrote: > > Thanks for response Wes. I have a windows xp running under kvm without > using any -net paramete

Re: [kvm-devel] Windows 2003 Server R2 networking

2007-09-17 Thread Haydn Solomon
Thanks for response Wes. I have a windows xp running under kvm without using any -net parameters ( I remember reading that -net user is default ) and it works "out of the box". I had assumed that it would be same for windows 2003 server apart from the fact that the kvm wiki website says specific

Re: [kvm-devel] Windows 2003 Server R2 networking

2007-09-17 Thread Wes
Hi Haydn, The '-net nic' clause on it's own tells qemu to create a virtual nic in the guest but doesn't tell qemu how to connect it to the host. after '-net nic' you need another -net clause, such as '-net user' to use qemu's internal NAT or '-net tap' to create a tun/tap virtual interface on the

[kvm-devel] Windows 2003 Server R2 networking

2007-09-17 Thread Haydn Solomon
I'm unable to get my networking functioning for windows 2003 server R2 virtual machine. This is the first time I've installed 2003 Server under kvm ( release 40 ) and had no problems installing. Once it iwas installed I start the 2003 server machine with the following parameters. /usr/local/kvm

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: > Nakajima, Jun wrote: >>> I don't understand the purpose of returning the max leaf. Who is that >>> information useful for? >>> >> >> Well, this is the key info to the user of CPUID. It tells which leaves >> are valid to use. Otherwise, the user cannot tell whether the

Re: [kvm-devel] [PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Avi Kivity
Nick Piggin wrote: >> >> I should mention that the converting to use ->fault() is a 15-minute >> change; the tricky part is adding backwards compatibility for the >> external module package. >> > > It should be mostly possible to ifdef a nopage() handler, which is > just a wrapper function to

Re: [kvm-devel] [PATCH 048/104] KVM: Add and use pr_unimpl for standard formatting of unimplemented features

2007-09-17 Thread Rusty Russell
On Mon, 2007-09-17 at 09:16 -0700, Joe Perches wrote: > On Mon, 2007-09-17 at 10:31 +0200, Avi Kivity wrote: > > diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h > > index cfda3ab..6d25826 100644 > > --- a/drivers/kvm/kvm.h > > +++ b/drivers/kvm/kvm.h > > @@ -474,6 +474,14 @@ struct kvm_arch_ops

Re: [kvm-devel] Using VMChannel to communicate with the host.

2007-09-17 Thread Dor Laor
Cameron Macdonell wrote: > > On 15-Sep-07, at 4:47 PM, Dor Laor wrote: > > > Cam Macdonell wrote: > >> It didn't work. I used the following option: -vmchannel > >> di:2258,tcp:0:,server (the // confused kvm) and when the VM > >> booted, > >> I connected with "telnet localhost " which allo

[kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-17 Thread Anthony Liguori
This patch refactors the current hypercall infrastructure to better support live migration and SMP. It eliminates the hypercall page by trapping the UD exception that would occur if you used the wrong hypercall instruction for the underlying architecture and replacing it with the right one lazily.

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Jeremy Fitzhardinge
Nakajima, Jun wrote: > Using CPUID.0x400N (N > 2) does not prevent Xen from doing that, > either. If you use 0x40001000, 1) you need to say the leaves from > 0x4000 through 0x40001000 are all valid, OR 2) you create/fork a > new/odd leaf (with 0x1000 offset) repeating the detection redundan

Re: [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3)

2007-09-17 Thread Nakajima, Jun
Anthony Liguori wrote: > This patch refactors the current hypercall infrastructure to better support > live > migration and SMP. It eliminates the hypercall page by trapping the UD > exception that would occur if you used the wrong hypercall instruction for the > underlying architecture and repla

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

2007-09-17 Thread Simon Gao
Solaris 10 now works again also. Thanks a lot. Simon Haydn Solomon wrote: > First, thank you for release 40. Reboot of my windows xp machine > worked! Great job. > > Haydn > > On 9/16/07, *Avi Kivity* < [EMAIL PROTECTED] > > wrote: > > Not a lot of progress, but stil

Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Laurent Vivier (Bull)
Avi Kivity wrote: > Laurent Vivier wrote: >> Avi Kivity wrote: ... >>> Interesting. I don't see how an instruction fetch can fail on >>> uniprocessor. Can you give details of the failure? >>> >>> Instruction fetches can fail on SMP so a fix is certainly needed. >>> >> OK, I spoke too fast

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Nakajima, Jun
Jeremy Fitzhardinge wrote: > Nakajima, Jun wrote: > > > Again, 0x4000 is not Xen specific. If the leaf 0x4000 is used > > for any guest to detect any hypervisor, that would be compelling > > benefit. For future Xen-specific features, it's safe for Xen to use > > other bigger leaves (like 0

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: >> I'm starting to lean toward just using . If for no other reason >> than the hypercall space is unsharable. >> > > Well, it could be, but it would take affirmative action on the guest's > part. If there's feature bits for each supported hypercall interface, >

[kvm-devel] [PATCH 3/3] Add the paravirtualization CPUID entry to QEMU (v3)

2007-09-17 Thread Anthony Liguori
This adds CPUID support for paravirtualization. We can do this unconditionally because there are no features defined at the moment. Future code that introduces features, however, should validate that the kernel supports those features before setting the bits. Signed-off-by: Anthony Liguori <[EMA

Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Laurent Vivier
Avi Kivity wrote: > Laurent Vivier (Bull) wrote: >> > >> > Not being able to emulate is sometimes legitimate. In the case of >> > writing to a write-protected guest page table, we simply >> > un-write-protect it and go back to the guest (which should now execute >> > the instruction natively). >>

[kvm-devel] [PATCH 1/3] Add vmmcall/vmcall to x86_emulate (v3)

2007-09-17 Thread Anthony Liguori
Add vmmcall/vmcall to x86_emulate. Future patch will implement functionality for these instructions. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 18c2b2c..a16bbd6 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/k

Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Avi Kivity
Laurent Vivier (Bull) wrote: > > > > Not being able to emulate is sometimes legitimate. In the case of > > writing to a write-protected guest page table, we simply > > un-write-protect it and go back to the guest (which should now execute > > the instruction natively). > > > > Perhaps the logic th

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Anthony Liguori
Nakajima, Jun wrote: >> I don't understand the purpose of returning the max leaf. Who is that >> information useful for? >> > > Well, this is the key info to the user of CPUID. It tells which leaves > are valid to use. Otherwise, the user cannot tell whether the results of > CPUID.0x400N

Re: [kvm-devel] [PATCH -rc] KVM: Fix virtualization menu help text

2007-09-17 Thread Jan Engelhardt
On Sep 17 2007 11:10, Avi Kivity wrote: > >What guest drivers? Well, why is lguest called lguest? :) But yeah, ack. >Cc: Jan Engelhardt <[EMAIL PROTECTED]> >Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> >--- >diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig >index 9b72f33..8749fa4 100644

Re: [kvm-devel] [PATCH] Refactor hypercall infrastructure

2007-09-17 Thread Nakajima, Jun
Anthony Liguori wrote: > Nakajima, Jun wrote: > > > > I'm suggesting that we use CPUID.0x400Y (Y: TBD, e.g. 6) for Linux > > paravirtualization. The ebx, ecx and edx return the Linux > > paravirtualization features available on that hypervisor. Those features > > are defined architecturally

Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Avi Kivity
Laurent Vivier wrote: > Avi Kivity wrote: > >> Laurent Vivier wrote: >> >>> Avi Kivity wrote: >>> >>> Laurent Vivier wrote: > These patches split the emulator in two parts: one to decode the > instruction, > the other to execute it. The dec

Re: [kvm-devel] [PATCH] Add support for a basic boot menu to the bios

2007-09-17 Thread Avi Kivity
Luca wrote: > On 9/16/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > >> - coding this stuff in rombios32.c instead of rombios.c (with its >> strange idea of C) is *much* preferable for maintainability. >> > > The strange code style is due to the compiler used (bcc). I see that > today it's pos

Re: [kvm-devel] [PATCH 045/104] KVM: Fix defined but not used warning in drivers/kvm/vmx.c

2007-09-17 Thread Avi Kivity
David Miller wrote: > You've got to be kidding me. > > 104 patches is way over the top, post them in smaller chunks > please instead of killing vger.kernel.org as it has to crunch > out every single one of these 104 patches to several thousand > recipients. > > I can understand the load on the

Re: [kvm-devel] [PATCH] Add support for a basic boot menu to the bios

2007-09-17 Thread Luca
On 9/16/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > - coding this stuff in rombios32.c instead of rombios.c (with its > strange idea of C) is *much* preferable for maintainability. The strange code style is due to the compiler used (bcc). I see that today it's possible to make as and gcc to emit 1

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

2007-09-17 Thread Haydn Solomon
I don't know if someone can reproduce a problem I'm having. When I run the windows xp service pack 2 update with kvm-40 it always crashes and after I'm unable to boot virtual machine resulting in blue screen. Running kvm on Linux localhost.localdomain 2.6.22.5-76.fc7 #1 SMP Thu Aug 30 13:08:59 EDT

Re: [kvm-devel] [PATCH 045/104] KVM: Fix defined but not used warning in drivers/kvm/vmx.c

2007-09-17 Thread David Miller
You've got to be kidding me. 104 patches is way over the top, post them in smaller chunks please instead of killing vger.kernel.org as it has to crunch out every single one of these 104 patches to several thousand recipients. --

Re: [kvm-devel] [PATCH 048/104] KVM: Add and use pr_unimpl for standard formatting of unimplemented features

2007-09-17 Thread Joe Perches
On Mon, 2007-09-17 at 10:31 +0200, Avi Kivity wrote: > diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h > index cfda3ab..6d25826 100644 > --- a/drivers/kvm/kvm.h > +++ b/drivers/kvm/kvm.h > @@ -474,6 +474,14 @@ struct kvm_arch_ops { > > extern struct kvm_arch_ops *kvm_arch_ops; > > +/* The g

Re: [kvm-devel] [PATCH 0/5] Split the emulator: decode & execute

2007-09-17 Thread Laurent Vivier
Avi Kivity wrote: > Laurent Vivier wrote: >> Avi Kivity wrote: >> >>> Laurent Vivier wrote: >>> These patches split the emulator in two parts: one to decode the instruction, the other to execute it. The decode part is then called only when needed. >>>

Re: [kvm-devel] Using VMChannel to communicate with the host.

2007-09-17 Thread Cameron Macdonell
On 15-Sep-07, at 4:47 PM, Dor Laor wrote: > Cam Macdonell wrote: >> It didn't work. I used the following option: -vmchannel >> di:2258,tcp:0:,server (the // confused kvm) and when the VM >> booted, >> I connected with "telnet localhost " which allowed the boot to >> proceed. But, I di

[kvm-devel] qemu: add qemu command line option description for -no-kvm-irqchip

2007-09-17 Thread Carlo Marcelo Arenas Belon
Add command line option description to qemu for -no-kvm-irqchip to complement commit 8936d5f864ee809af05fe22673d8e891bedec7f1 Carlo Signed-off-by: Carlo Marcelo Arenas Belon <[EMAIL PROTECTED]> --- qemu/vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qem

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

2007-09-17 Thread Farkas Levente
here's the console of x86_64 during the startap and where it's hang:-( Farkas Levente wrote: > i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 > host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, > mandrake i586 guests. i try to give 4 cpu for the first 2 gue

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

2007-09-17 Thread Dor Laor
i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, mandrake i586 guests. i try to give 4 cpu for the first 2 guest and 1 cpu for the last. after i start these 3 guests the host kernel crash all the time after

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

2007-09-17 Thread Luca
On 9/17/07, Farkas Levente <[EMAIL PROTECTED]> wrote: > Dor Laor wrote: > > i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 > >> > >> host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, > >> mandrake i586 guests. i try to give 4 cpu for the first 2 guest and 1

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

2007-09-17 Thread Farkas Levente
Dor Laor wrote: > i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 >> >> host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, >> mandrake i586 guests. i try to give 4 cpu for the first 2 guest and 1 >> cpu for the last. after i start these 3 guests the host kerne

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

2007-09-17 Thread Farkas Levente
Dor Laor wrote: > i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 >> >> host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, >> mandrake i586 guests. i try to give 4 cpu for the first 2 guest and 1 >> cpu for the last. after i start these 3 guests the host kerne

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

2007-09-17 Thread Farkas Levente
i've try kvm-40 it now on centos-5 with kernel-2.6.18-8.1.10.el5 x86_64 host (8gb ram and 4 core) and one centos-5 x86_64, centos-5 i386, mandrake i586 guests. i try to give 4 cpu for the first 2 guest and 1 cpu for the last. after i start these 3 guests the host kernel crash all the time after the

[kvm-devel] (: .)! )(*:.

2007-09-17 Thread Antwan Pearson
Sy m[b+oool F[D+E!G Last 0.04 Ta.rg et 0.12

Re: [kvm-devel] [PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Nick Piggin
On Monday 17 September 2007 19:18, Avi Kivity wrote: > Avi Kivity wrote: > > Christoph Hellwig wrote: > >> On Mon, Sep 17, 2007 at 10:30:43AM +0200, Avi Kivity wrote: > >>> From: Nguyen Anh Quynh <[EMAIL PROTECTED]> > >>> > >>> *nopage() in kvm_main.c should only store the type of mmap() fault if >

[kvm-devel] [PATCH 094/104] KVM: x86 emulator: call near

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction opcode: 0xe8 call (near) Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 22 +- 1 files changed, 21 in

Re: [kvm-devel] [PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Avi Kivity
Avi Kivity wrote: > Christoph Hellwig wrote: > >> On Mon, Sep 17, 2007 at 10:30:43AM +0200, Avi Kivity wrote: >> >> >>> From: Nguyen Anh Quynh <[EMAIL PROTECTED]> >>> >>> *nopage() in kvm_main.c should only store the type of mmap() fault if >>> the pointers are not NULL. This patch fixes

Re: [kvm-devel] [PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Avi Kivity
Christoph Hellwig wrote: > On Mon, Sep 17, 2007 at 10:30:43AM +0200, Avi Kivity wrote: > >> From: Nguyen Anh Quynh <[EMAIL PROTECTED]> >> >> *nopage() in kvm_main.c should only store the type of mmap() fault if >> the pointers are not NULL. This patch fixes the problem. >> > > Care to conve

Re: [kvm-devel] [PATCH 001/104] KVM: Fix *nopage() in kvm_main.c

2007-09-17 Thread Christoph Hellwig
On Mon, Sep 17, 2007 at 10:30:43AM +0200, Avi Kivity wrote: > From: Nguyen Anh Quynh <[EMAIL PROTECTED]> > > *nopage() in kvm_main.c should only store the type of mmap() fault if > the pointers are not NULL. This patch fixes the problem. Care to convert it to ->faul while you're at it? -

[kvm-devel] [PATCH 098/104] KVM: x86 emulator: imlpement jump conditional relative

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: jump conditional rel opcodes: 0x0f 0x80 - 0x0f 0x8f Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 61 ++

[kvm-devel] [PATCH 099/104] KVM: X86 emulator: jump conditional short

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of more jump conditional instructions jcc shortrel opcodes: 0x70 - 0x7f Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 15 +-- 1 fil

[kvm-devel] [PATCH -rc] KVM: Fix virtualization menu help text

2007-09-17 Thread Avi Kivity
What guest drivers? Cc: Jan Engelhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- An August 18 patch from Jan Engelhardt (06bfb7e) added help text for the virtualization menu. Unfortunately the text is misleading, as "guest drivers" are usually interpreted to mean "dr

[kvm-devel] [PATCH 029/104] KVM: Convert vm lock to a mutex

2007-09-17 Thread Avi Kivity
From: Shaohua Li <[EMAIL PROTECTED]> This allows the kvm mmu to perform sleepy operations, such as memory allocation. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 +- drivers/kvm/kvm_main.c | 69 ++

[kvm-devel] [PATCH 101/104] KVM: x86 emulator: jmp abs

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: jump absolute r/m opcode: 0xff /4 Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |6 ++ 1 files changed, 6 insertions(+), 0

[kvm-devel] [PATCH 089/104] KVM: MMU: Don't do GFP_NOWAIT allocations

2007-09-17 Thread Avi Kivity
Before preempt notifiers, kvm needed to allocate memory with GFP_NOWAIT so as not to have to enable preemption and take a heavyweight exit. On oom, we'd fall back to a GFP_KERNEL allocation. With preemption notifiers, we can do a GFP_KERNEL allocation, and perform the heavyweight exit only if the

[kvm-devel] [PATCH 091/104] KVM: Move main vcpu loop into subarch independent code

2007-09-17 Thread Avi Kivity
This simplifies adding new code as well as reducing overall code size. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |9 +++- drivers/kvm/kvm_main.c | 124 +- drivers/kvm/svm.c | 142 +---

[kvm-devel] [PATCH 090/104] KVM: VMX: Move vm entry failure handling to the exit handler

2007-09-17 Thread Avi Kivity
This will help moving the main loop to subarch independent code. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 57a6055..713f78a 100644 ---

[kvm-devel] [PATCH 087/104] KVM: Simplify memory allocation

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> The mutex->splinlock convertion alllows us to make some code simplifications. As we can keep the lock longer, we don't have to release it and then have to check if the environment has not been modified before re-taking it. We can remove kvm->busy and kvm->m

[kvm-devel] [PATCH 081/104] KVM: enable in-kernel APIC INIT/SIPI handling

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch enables INIT/SIPI handling using in-kernel APIC by introducing a ->mp_state field to emulate the SMP state transition. [avi: remove smp_processor_id() warning] Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Xin Li <[EMAIL PROTECTED]> Signe

[kvm-devel] [PATCH 095/104] KVM: x86 emulator: pushf

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction pushf opcode: 0x9c Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 11 +-- 1 files changed, 9 insertions(+), 2 del

[kvm-devel] [PATCH 068/104] KVM: Emulate hlt in the kernel

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> By sleeping in the kernel when hlt is executed, we simplify the in-kernel guest interrupt path considerably. Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 100/104] KVM: x86 emulator: lea

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction lea r16/r32, m opcode: 0x8d: Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |5 - 1 files changed, 4 insertions(+), 1 deleti

[kvm-devel] [PATCH 067/104] KVM: In-kernel I/O APIC model

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This allows in-kernel host-side device drivers to raise guest interrupts without going to userspace. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/Makefile |2 +- drivers/kvm/ioapic.c

[kvm-devel] [PATCH 096/104] KVM: Improve emulation failure reporting

2007-09-17 Thread Avi Kivity
Report failed opcodes from all locations. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c | 16 drivers/kvm/svm.c |2 +- drivers/kvm/vmx.c |2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff

[kvm-devel] [PATCH 097/104] KVM: x86 emulator: sort opcodes into ascending order

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 99 ++--- 1 files changed, 49 insertions(+), 50 deletions(-) diff --git a/drivers/kvm

[kvm-devel] [PATCH 102/104] KVM: x86 emulator: fix src, dst value initialization

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Some operand fetches are less than the machine word size and can result in stale bits if used together with operands of different sizes. Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_em

[kvm-devel] [PATCH 066/104] KVM: Emulate local APIC in kernel

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Because lightweight exits (exits which don't involve userspace) are many times faster than heavyweight exits, it makes sense to emulate high usage devices in the kernel. The local APIC is one such device, especially for Windows and for SMP, so we add an APIC m

[kvm-devel] [PATCH 093/104] KVM: x86 emulator: push imm8

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement the instruction push imm8 opcode: 0x6a Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 17 ++--- 1 files changed, 14 insertions(+), 3

[kvm-devel] [PATCH 103/104] KVM: x86 emulator: popf

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction: popf opcode: 0x9d Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) di

[kvm-devel] [PATCH 092/104] KVM: VMX: Fix exit qualification width on i386

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> According to Intel Software Developer's Manual, Vol. 3B, Appendix H.4.2, exit qualification should be of natural width. However, current code uses u64 as the data type for this register, which occasionally introduces invalid value to VMExit handling logics. This

[kvm-devel] [PATCH 021/104] KVM: VMX: Import some constants of vmcs from IA32 SDM

2007-09-17 Thread Avi Kivity
From: Yang, Sheng <[EMAIL PROTECTED]> This patch mainly imports some constants and rename two exist constants of vmcs according to IA32 SDM. It also adds two constants to indicate Lock bit and Enable bit in MSR_IA32_FEATURE_CONTROL, and replace the hardcode _5_ with these two bits. Signed-off-by

[kvm-devel] [PATCH 088/104] KVM: Rename kvm_arch_ops to kvm_x86_ops

2007-09-17 Thread Avi Kivity
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch just renames the current (misnamed) _arch namings to _x86 to ensure better readability when a real arch layer takes place. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/k

[kvm-devel] [PATCH 072/104] KVM: in-kernel IOAPIC save and restore support

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch adds support for in-kernel ioapic save and restore (to and from userspace). It uses the same get/set_irqchip ioctl as in-kernel PIC. Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Ki

[kvm-devel] [PATCH 075/104] KVM: VMX: Use shadow TPR/cr8 for 64-bits guests

2007-09-17 Thread Avi Kivity
From: Yang, Sheng <[EMAIL PROTECTED]> This patch enables TPR shadow of VMX on CR8 access. 64bit Windows using CR8 access TPR frequently. The TPR shadow can improve the performance of access TPR by not causing vmexit. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong

[kvm-devel] [PATCH 073/104] KVM: in-kernel LAPIC save and restore support

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This patch adds a new vcpu-based IOCTL to save and restore the local apic registers for a single vcpu. The kernel only copies the apic page as a whole, extraction of registers is left to userspace side. On restore, the APIC timer is restarted from the initial c

[kvm-devel] [PATCH 024/104] KVM: Remove arch specific components from the general code

2007-09-17 Thread Avi Kivity
From: Gregory Haskins <[EMAIL PROTECTED]> struct kvm_vcpu has vmx-specific members; remove them to a private structure. Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |

[kvm-devel] [PATCH 083/104] KVM: Remove the unused invlpg member of struct kvm_arch_ops.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 - drivers/kvm/svm.c |6 -- 2 files changed, 0 insertions(+), 7 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kv

[kvm-devel] [PATCH 085/104] KVM: Keep control regs in sync

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> We don't update the vcpu control registers in various places. We should do so. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |8 1 files changed, 4 insertions(+), 4 d

[kvm-devel] [PATCH 078/104] KVM: disable tpr/cr8 sync when in-kernel APIC is used

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index f4cbd4f..a25dfc9

[kvm-devel] [PATCH 082/104] KVM: Set the ET flag in CR0 after initializing FX

2007-09-17 Thread Avi Kivity
From: Amit Shah <[EMAIL PROTECTED]> This was missed when moving stuff around in fbc4f2e Fixes Solaris guests and bug #1773613 Signed-off-by: Amit Shah <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |1 + 1 files changed, 1 insertions(+), 0 delet

[kvm-devel] [PATCH 084/104] KVM: Clean up unloved invlpg emulation

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> invlpg shouldn't fetch the "src" address, since it may not be valid, however SVM's "solution" which neuters emulation of all group 7 instruction is horrible and breaks kvm-lite. The simplest fix is to put a special check in for invlpg. Signed-off-by: Rusty

[kvm-devel] [PATCH 070/104] KVM: Add get/set irqchip ioctls for in-kernel PIC live migration support

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented in this patch. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Av

[kvm-devel] [PATCH 086/104] KVM: Hoist SVM's get_cs_db_l_bits into core code.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> SVM gets the DB and L bits for the cs by decoding the segment. This is in fact the completely generic code, so hoist it for kvm-lite to use. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm

[kvm-devel] [PATCH 063/104] KVM: VMX: Split segments reload in vmx_load_host_state()

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> vmx_load_host_state() bundles fs, gs, ldt, and tss reloading into one in the hope that it is infrequent. With smp guests, fs reloading is frequent due to fs being used by threads. Unbundle the reloads so reduce expensive gs reloads. Signed-off-by: Laurent

[kvm-devel] [PATCH 074/104] KVM: pending irq save/restore

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Add in kernel irqchip save/restore support for pending vectors. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 ++ drivers/kvm/kv

[kvm-devel] [PATCH 076/104] KVM: Keep track of missed timer irq injections

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> APIC timer IRQ is set every time when a certain period expires at host time, but the guest may be descheduled at that time and thus the irq be overwritten by later fire. This patch keep track of firing irq numbers and decrease only when the IRQ is injected to g

[kvm-devel] [PATCH 079/104] KVM: deliver PIC interrupt only to vcpu0

2007-09-17 Thread Avi Kivity
From: Qing He <[EMAIL PROTECTED]> This patch changes the PIC interrupts delivery. Now it is only delivered to vcpu0 when either condition is met (on vcpu0): 1. local APIC is hardware disabled 2. LVT0 is unmasked and configured to delivery mode ExtInt It fixes the 2x faster wall clock on x86_6

[kvm-devel] [PATCH 077/104] KVM: Migrate lapic hrtimer when vcpu moves to another cpu

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> This reduces overhead by accessing cachelines from the wrong node, as well as simplifying locking. [Qing: fix for inactive or expired one-shot timer] Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-b

[kvm-devel] [PATCH 058/104] KVM: x86 emulator: Implement 'jmp rel short' instruction (opcode 0xeb)

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c i

[kvm-devel] [PATCH 080/104] KVM: round robin for APIC lowest priority delivery mode

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/lapic.c | 33 - 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/drivers/kvm/k

[kvm-devel] [PATCH 048/104] KVM: Add and use pr_unimpl for standard formatting of unimplemented features

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> All guest-invokable printks should be ratelimited to prevent malicious guests from flooding logs. This is a start. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |8 d

[kvm-devel] [PATCH 064/104] KVM: Add support for in-kernel PIC emulation

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/Makefile |2 +- drivers/kvm/i8259.c| 442 drivers/kvm/irq.c | 61 +++ dri

[kvm-devel] [PATCH 062/104] KVM: X86 emulator: fix 'push reg' writeback

2007-09-17 Thread Avi Kivity
Pointed out by Rusty Russell. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index cf895aa..7439b34 100644 --- a/drivers/kvm/x86_emulate.c ++

[kvm-devel] [PATCH 061/104] KVM: Support more memory slots

2007-09-17 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> Needed for mapping memory at 4GB. Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h

[kvm-devel] [PATCH 059/104] KVM: x86 emulator: implement 'push reg' (opcodes 0x50-0x57)

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x

[kvm-devel] [PATCH 071/104] KVM: Bypass irq_pending get/set when using in kernel irqchip

2007-09-17 Thread Avi Kivity
From: He, Qing <[EMAIL PROTECTED]> vcpu->irq_pending is saved in get/set_sreg IOCTL, but when in-kernel local APIC is used, doing this may occasionally overwrite vcpu->apic to an invalid value, as in the vm restore path. Signed-off-by: Qing He <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 2

[kvm-devel] [PATCH 056/104] KVM: x86 emulator: implement 'and $imm, %{al|ax|eax}'

2007-09-17 Thread Avi Kivity
From: Nitin A Kamble <[EMAIL PROTECTED]> Implement emulation of instruction and al imm8 (opcode 0x24) and ax/eax imm16/imm32 (opcode 0x25) Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/x86_emulate.c | 21

[kvm-devel] [PATCH 069/104] KVM: Protect in-kernel pio using kvm->lock

2007-09-17 Thread Avi Kivity
From: Eddie Dong <[EMAIL PROTECTED]> pio operation and IRQ_LINE kvm_vm_ioctl is not kvm->lock protected. Add lock to same with IOAPIC MMIO operations. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |6 ++ 1

[kvm-devel] [PATCH 051/104] KVM: Remove useless assignment

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> Line 1809 of kvm_main.c is useless, value is overwritten in line 1815: 1809 now = min(count, PAGE_SIZE / size); 1810 1811 if (!down) 1812 in_page = PAGE_SIZE - offset_in_page(address); 1813 else 1814

[kvm-devel] [PATCH 060/104] KVM: VMX: allow rmode_tss_base() to work with >2G of guest memory

2007-09-17 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index cd999c0..b400668 100644 ---

[kvm-devel] [PATCH 032/104] KVM: Remove three magic numbers

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> There are several places where hardcoded numbers are used in place of the easily-available constant, which is poor form. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |2 +- dr

[kvm-devel] [PATCH 052/104] KVM: Cleanup string I/O instruction emulation

2007-09-17 Thread Avi Kivity
From: Laurent Vivier <[EMAIL PROTECTED]> Both vmx and svm decode the I/O instructions, and both botch the job, requiring the instruction prefixes to be fetched in order to completely decode the instruction. So, if we see a string I/O instruction, use the x86 emulator to decode it, as it already h

[kvm-devel] [PATCH 047/104] KVM: Remove unneeded kvm_dev_open and kvm_dev_release functions.

2007-09-17 Thread Avi Kivity
From: Rusty Russell <[EMAIL PROTECTED]> Devices don't need open or release functions. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 12 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/dri

  1   2   >