Re: kvm problems on new hardware

2009-10-30 Thread Chris Lalancette
Ryan Harper wrote: * Danny ter Haar d...@dth.net [2009-10-29 13:38]: Update: I compiled/installed 2.6.32-rc5-git3 on this machine I manually start kvm: vhost1:~# kvm -m 512 -cdrom /vz/template/iso/debian-503-amd64-netinst.iso The bootscreen comes up, i hit enter to install and i get

Re: [Qemu-devel] [PATCH 0/4] megaraid_sas HBA emulation

2009-10-30 Thread Hannes Reinecke
Gerd Hoffmann wrote: On 10/29/09 05:37, Christoph Hellwig wrote: So something like - Get next request - Attach iovec/bounc-buffer - handle request (command/write/read) - complete request (callback) Btw, from some previuous attempts to sort out this code here are some thing that I think

Re: kvm problems on new hardware

2009-10-30 Thread Danny ter Haar
On Fri, 2009-10-30 at 09:10 +0100, Chris Lalancette wrote: Can either you or Danny: 1) Get the output from stderr of qemu when this happens? I believe qemu dumps the state of all of the guest fields when it's going to crash like this, and that can tell us if the GUEST_STATE is wrong.

Re: [Qemu-devel] [PATCH 0/4] megaraid_sas HBA emulation

2009-10-30 Thread Gerd Hoffmann
Hi, When they do, poke me and I'll make sure to process them quickly. Just sent. One of my short term goals is to get better at handling easy patches more quickly. Great. /me tests the new process ;) cheers, Gerd -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: Impossible to compile kvm-88 on Redhat 5.4

2009-10-30 Thread Jan Kiszka
Arnaud Maillet wrote: In RH 5.4 it's a 2.6.18 ! Hmm, and that's outside the support range of kvm-kmod today. I had a look at the conflicts: there are more than I can fix with reasonable effort ATM. So I'm afraid - unless someone steps up and provides the required patches - support for such old

Re: 2.6.31.4 panic: CRED: put_cred_rcu() sees ffff880204e58c00 with usage 82150912

2009-10-30 Thread Nikola Ciprich
Ouch, typo in subject, it's 2.6.31.1 of course. sorry about that. also CCing kvm. n. On Fri, Oct 30, 2009 at 12:06:32PM +0100, Nikola Ciprich wrote: Hi, some time ago, I updated my KVM hosting machine to 2.6.31.1 and it just died horribly: Oct 30 10:45:17 vbox [706369.133516] Kernel panic -

[PATCH] KVM: x86: Polish exception injection via KVM_SET_GUEST_DEBUG

2009-10-30 Thread Jan Kiszka
Decouple KVM_GUESTDBG_INJECT_DB and KVM_GUESTDBG_INJECT_BP from KVM_GUESTDBG_ENABLE, their are actually orthogonal. At this chance, avoid triggering the WARN_ON in kvm_queue_exception if there is already an exception pending and reject such invalid requests. Signed-off-by: Jan Kiszka

Re: [PATCH 5/5] Fix kdump under KVM.

2009-10-30 Thread Chris Lalancette
Marcelo Tosatti wrote: On Wed, Oct 28, 2009 at 11:21:42AM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Tue, Oct 27, 2009 at 05:41:07PM +0100, Chris Lalancette wrote: This patch is the main point of the series. In order for kdump to properly work inside a KVM guest, we need to

Re: [PATCH 5/5] Fix kdump under KVM.

2009-10-30 Thread Marcelo Tosatti
On Fri, Oct 30, 2009 at 01:23:57PM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Wed, Oct 28, 2009 at 11:21:42AM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Tue, Oct 27, 2009 at 05:41:07PM +0100, Chris Lalancette wrote: This patch is the main point of the series.

Re: [Autotest] [PATCH] [RFC] KVM test: Major control file cleanup

2009-10-30 Thread Ryan Harper
* Lucas Meneghel Rodrigues l...@redhat.com [2009-10-28 14:48]: Ryan, Michael: I absolutely agree that the ability to debug stuff is important, but the ability to make things straightforward to use from the web interface or cli is also important. A longer term goal is to have our test farm

Re: [Autotest] [PATCH] [RFC] KVM test: Major control file cleanup

2009-10-30 Thread Lucas Meneghel Rodrigues
On Fri, 2009-10-30 at 08:54 -0500, Ryan Harper wrote: * Lucas Meneghel Rodrigues l...@redhat.com [2009-10-28 14:48]: Ryan, Michael: I absolutely agree that the ability to debug stuff is important, but the ability to make things straightforward to use from the web interface or cli is

[ kvm-Bugs-2880337 ] PAE guest boot up very slow with -no-acpi

2009-10-30 Thread SourceForge.net
Bugs item #2880337, was opened at 2009-10-16 00:47 Message generated for change (Settings changed) made by jiajun You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2880337group_id=180599 Please note that this message will contain a full copy of the comment

[ kvm-Bugs-2889486 ] NIC device assignment can not work in guest with INTx mode

2009-10-30 Thread SourceForge.net
Bugs item #2889486, was opened at 2009-10-30 07:43 Message generated for change (Tracker Item Submitted) made by jiajun You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2889486group_id=180599 Please note that this message will contain a full copy of the

Biweekly KVM Test report, kernel 11b06... qemu 42a6f...

2009-10-30 Thread Xu, Jiajun
Hi All, This Weekly KVM Testing Report against lastest kvm.git 11b06403991acded51b3304c42a6086fdeaf3fa8 and qemu-kvm.git 42a6f56f1d96574bb3ba093c740fb1e23446ea24. Latest qemu-kvm tree build is broken with error in savevm.c: CCnet-queue.o CCqemu-char.o CCnet-checksum.o

Re: [PATCH 5/5] Fix kdump under KVM.

2009-10-30 Thread Chris Lalancette
Marcelo Tosatti wrote: On Fri, Oct 30, 2009 at 01:23:57PM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Wed, Oct 28, 2009 at 11:21:42AM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Tue, Oct 27, 2009 at 05:41:07PM +0100, Chris Lalancette wrote: This patch is the main

[PATCH 02/27] Pass PVR in sregs

2009-10-30 Thread Alexander Graf
Right now sregs is unused on PPC, so we can use it for initialization of the CPU. KVM on BookE always virtualizes the host CPU. On Book3s we go a step further and take the PVR from userspace that tells us what kind of CPU we are supposed to virtualize, because we support Book3s_32 and Book3s_64

[PATCH 04/27] Add Book3s fields to vcpu structs

2009-10-30 Thread Alexander Graf
We need to store more information than we currently have for vcpus when running on Book3s. So let's extend the internal struct definitions. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - use context_id instead of mm_context v4 - v5: - always include pvr in vcpu struct ---

[PATCH 03/27] Add Book3s definitions

2009-10-30 Thread Alexander Graf
We need quite a bunch of new constants for KVM on Book3s, so let's define them now. These constants will be used in later patches. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4 - remove old kernel compat code --- arch/powerpc/include/asm/kvm_asm.h | 39

[PATCH 25/27] Fix trace.h

2009-10-30 Thread Alexander Graf
It looks like the variable pc is defined. At least the current code always failed on me stating that pc is already defined somewhere else. Let's use _pc instead, because that doesn't collide. Is this the right approach? Does it break on 440 too? If not, why not? Signed-off-by: Alexander Graf

[PATCH 13/27] Add book3s_32 guest MMU

2009-10-30 Thread Alexander Graf
This patch adds an implementation for a G3/G4 MMU, so we can run G3 and G4 guests in KVM on Book3s_64. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - dprintk instead of scattered #ifdef's - // - /* */ - 80 characters per line --- arch/powerpc/kvm/book3s_32_mmu.c | 372

[PATCH 12/27] Add book3s_64 guest MMU

2009-10-30 Thread Alexander Graf
To be able to run a guest, we also need to implement a guest MMU. This patch adds MMU handling for Book3s_64 guests. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - dprintk instead of scattered #ifdef's - 80 line limit - // - /* */ --- arch/powerpc/kvm/book3s_64_mmu.c | 476

[PATCH 01/27] Move dirty logging code to sub-arch

2009-10-30 Thread Alexander Graf
PowerPC code handles dirty logging in the generic parts atm. While this is great for return -ENOTSUPP, we need to be rather target specific when actually implementing it. So let's split it to implementation specific code, so we can implement it for book3s. Signed-off-by: Alexander Graf

[PATCH 08/27] Add SLB switching code for entry/exit

2009-10-30 Thread Alexander Graf
This is the really low level of guest entry/exit code. Book3s_64 has an SLB, which stores all ESID - VSID mappings we're currently aware of. The segments in the guest differ from the ones on the host, so we need to switch the SLB to tell the MMU that we're in a new context. So we store a shadow

[PATCH 14/27] Add book3s_64 specific opcode emulation

2009-10-30 Thread Alexander Graf
There are generic parts of PowerPC that can be shared across all implementations and specific parts that only apply to BookE or desktop PPCs. This patch adds emulation for desktop specific opcodes that don't apply to BookE CPUs. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - //

[PATCH 24/27] Include Book3s_64 target in buildsystem

2009-10-30 Thread Alexander Graf
Now we have everything in place to be able to build KVM, so let's add it as config option and in the Makefile. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig | 17 + arch/powerpc/kvm/Makefile | 27 +++ 2 files changed, 40

[PATCH 15/27] Add mfdec emulation

2009-10-30 Thread Alexander Graf
We support setting the DEC to a certain value right now. Doing that basically triggers the CPU local timer. But there's also an mfdec command that enabled the OS to read the decrementor. This is required at least by all desktop and server PowerPC Linux kernels. It can't really hurt to allow

[PATCH 20/27] Split init_new_context and destroy_context

2009-10-30 Thread Alexander Graf
For KVM we need to allocate a new context id, but don't really care about all the mm context around it. So let's split the alloc and destroy functions for the context id, so we can grab one without allocating an mm context. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 22/27] Add fields to PACA

2009-10-30 Thread Alexander Graf
For KVM we need to store some information in the PACA, so we need to extend it. This patch adds KVM SLB shadow related entries to the PACA and a field that indicates if we're inside a guest. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/paca.h |9 + 1

[PATCH 10/27] Add book3s.c

2009-10-30 Thread Alexander Graf
This adds the book3s core handling file. Here everything that is generic to desktop PowerPC cores is handled, including interrupt injections, MSR settings, etc. It basically takes over the same role as booke.c for embedded PowerPCs. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: -

[PATCH 27/27] Use hrtimers for the decrementer

2009-10-30 Thread Alexander Graf
Following S390's good example we should use hrtimers for the decrementer too! This patch converts the timer from the old mechanism to hrtimers. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |6 -- arch/powerpc/kvm/emulate.c | 18

[PATCH 26/27] Use Little Endian for Dirty Bitmap

2009-10-30 Thread Alexander Graf
We currently use host endian long types to store information in the dirty bitmap. This works reasonably well on Little Endian targets, because the u32 after the first contains the next 32 bits. On Big Endian this breaks completely though, forcing us to be inventive here. So Ben suggested to

[PATCH 06/27] Add Book3s_64 intercept helpers

2009-10-30 Thread Alexander Graf
We need to intercept interrupt vectors. To do that, let's add a file we can always include which only activates the intercepts when we have then configured. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_64_asm.h | 58 ++ 1 files

[PATCH 23/27] Export new PACA constants in asm-offsets

2009-10-30 Thread Alexander Graf
In order to access fields in the PACA from assembly code, we need to generate offsets using asm-offsets.c. So let's add the new PACA related bits, we just introduced! Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c |5 + 1 files changed, 5

[PATCH 11/27] Add book3s_64 Host MMU handling

2009-10-30 Thread Alexander Graf
We designed the Book3S port of KVM as modular as possible. Most of the code could be easily used on a Book3S_32 host as well. The main difference between 32 and 64 bit cores is the MMU. To keep things well separated, we treat the book3s_64 MMU as one possible compile option. This patch adds all

[PATCH 05/27] Add asm/kvm_book3s.h

2009-10-30 Thread Alexander Graf
This adds the book3s specific header file that contains structs that are only valid on book3s specific code. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - use context_id instead of mm_alloc --- arch/powerpc/include/asm/kvm_book3s.h | 136 + 1

[PATCH 09/27] Add interrupt handling code

2009-10-30 Thread Alexander Graf
Getting from host state to the guest is only half the story. We also need to return to our host context and handle whatever happened to get us out of the guest. On PowerPC every guest exit is an interrupt. So all we need to do is trap the host's interrupt handlers and get into our #VMEXIT code to

[PATCH 19/27] Export symbols for KVM module

2009-10-30 Thread Alexander Graf
We want to be able to build KVM as a module. To enable us doing so, we need some more exports from core Linux parts. This patch exports all functions and variables that are required for KVM. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - don't export switch_slb - don't export

[PATCH 17/27] Make head_64.S aware of KVM real mode code

2009-10-30 Thread Alexander Graf
We need to run some KVM trampoline code in real mode. Unfortunately, real mode only covers 8MB on Cell so we need to squeeze ourselves as low as possible. Also, we need to trap interrupts to get us back from guest state to host state without telling Linux about it. This patch adds interrupt

[PATCH 16/27] Add desktop PowerPC specific emulation

2009-10-30 Thread Alexander Graf
Little opcodes behave differently on desktop and embedded PowerPC cores. In order to reflect those differences, let's add some #ifdef code to emulate.c. We could probably also handle them in the core specific emulation files, but I would prefer to reuse as much code as possible. Signed-off-by:

[PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c

2009-10-30 Thread Alexander Graf
We need to access some VCPU fields from assembly code. In order to get the proper offsets, we have to define them in asm-offsets.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff

[PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v6

2009-10-30 Thread Alexander Graf
KVM for PowerPC only supports embedded cores at the moment. While it makes sense to virtualize on small machines, it's even more fun to do so on big boxes. So I figured we need KVM for PowerPC64 as well. This patchset implements KVM support for Book3s_64 hosts and guest support for Book3s_64 and

[PATCH 21/27] Export KVM symbols for module

2009-10-30 Thread Alexander Graf
To be able to keep KVM as module, we need to export the SLB trampoline addresses to the module, so it knows where to jump to. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_exports.c | 24 1 files changed, 24 insertions(+), 0 deletions(-)

[PATCH 07/27] Add book3s_64 highmem asm code

2009-10-30 Thread Alexander Graf
This is the of entry / exit code. In order to switch between host and guest context, we need to switch register state and call the exit code handler on exit. This assembly file does exactly that. To finally enter the guest it calls into book3s_64_slb.S. On exit it gets jumped at from

Re: kernel bug in kvm_intel

2009-10-30 Thread Andrew Theurer
On Thu, 2009-10-15 at 15:18 -0500, Andrew Theurer wrote: On Thu, 2009-10-15 at 02:10 +0900, Avi Kivity wrote: On 10/13/2009 11:04 PM, Andrew Theurer wrote: Look at the address where vmx_vcpu_run starts, add 0x26d, and show the surrounding code. Thinking about it, it probably _is_

Re: 2.6.31.4 panic: CRED: put_cred_rcu() sees ffff880204e58c00 with usage 82150912

2009-10-30 Thread Rafael J. Wysocki
On Friday 30 October 2009, Nikola Ciprich wrote: Ouch, typo in subject, it's 2.6.31.1 of course. sorry about that. also CCing kvm. What about later kernels? Mainline in particular? Rafael -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Ubuntu Patches [was Re: [Qemu-devel] qemu-kvm-0.11 regression, crashes on older guests with virtio network]

2009-10-30 Thread Dustin Kirkland
On Thu, Oct 29, 2009 at 6:22 PM, Scott Tsai scottt...@gmail.com wrote: What's the easiest way to see the patches to qemu that Canonical carries for the different Ubuntu releases? (I think http://patches.ubuntu.com/ only diffs against Debian for the last stable Ubuntu release?) Correct. That

Re: [PATCH] whitelist host virtio networking features [was Re: qemu-kvm-0.11 regression, crashes on older ...]

2009-10-30 Thread Dustin Kirkland
On Thu, Oct 29, 2009 at 10:34 AM, Dustin Kirkland kirkl...@canonical.com wrote: whitelist host virtio networking features This patch is a followup to 8eca6b1bc770982595db2f7207c65051572436cb, fixing crashes when guests with 2.6.25 virtio drivers have saturated virtio network connections.

[PATCH] KVM test: Change the way subtests are loaded

2009-10-30 Thread Lucas Meneghel Rodrigues
Recently autoserv changed its default behavior of rsyncing the whole client directory to the test machine, now it will copy only the needed tests to the client machine. Also, the way the tests are loaded when running from the server has changed, breaking the KVM test when ran from autoserv. So

Re: [PATCH 5/5] Fix kdump under KVM.

2009-10-30 Thread Marcelo Tosatti
On Fri, Oct 30, 2009 at 04:28:01PM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Fri, Oct 30, 2009 at 01:23:57PM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Wed, Oct 28, 2009 at 11:21:42AM +0100, Chris Lalancette wrote: Marcelo Tosatti wrote: On Tue, Oct 27, 2009

Re: [PATCH 5/5] Fix kdump under KVM.

2009-10-30 Thread Marcelo Tosatti
On Fri, Oct 30, 2009 at 12:03:20PM -0600, David S. Ahern wrote: On 10/30/2009 09:28 AM, Chris Lalancette wrote: For VMX, the guests TSC's are now usually synchronized (which was not the case before, when this patch was written). For AMD, they start out of sync. Migration also causes

Re: [PATCH] KVM test: Change the way subtests are loaded

2009-10-30 Thread Ryan Harper
* Lucas Meneghel Rodrigues l...@redhat.com [2009-10-30 17:08]: Recently autoserv changed its default behavior of rsyncing the whole client directory to the test machine, now it will copy only the needed tests to the client machine. Also, the way the tests are loaded when running from the

XP blue screen with qemu-kvm-0.11.0

2009-10-30 Thread Ross Boylan
My XP VM was working OK, and then started crashing shortly after it logged me in. There were no obvious changes at the time. I built the latest qemu-kvm, but the problem persists. I am running 32 bit XP on Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (8 cores total), Debian GNU/Linux mostly Lenny

Re: [PATCH 19/27] Export symbols for KVM module

2009-10-30 Thread Stephen Rothwell
Hi Alexander, On Fri, 30 Oct 2009 16:47:19 +0100 Alexander Graf ag...@suse.de wrote: diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index c8b27bb..baf778c 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c @@ -163,11 +163,12 @@

Re: [PATCH 20/27] Split init_new_context and destroy_context

2009-10-30 Thread Stephen Rothwell
Hi Alexander, On Fri, 30 Oct 2009 16:47:20 +0100 Alexander Graf ag...@suse.de wrote: --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -23,6 +23,11 @@ extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); extern void

[PATCH 03/27] Add Book3s definitions

2009-10-30 Thread Alexander Graf
We need quite a bunch of new constants for KVM on Book3s, so let's define them now. These constants will be used in later patches. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4 - remove old kernel compat code --- arch/powerpc/include/asm/kvm_asm.h | 39

[PATCH 25/27] Fix trace.h

2009-10-30 Thread Alexander Graf
It looks like the variable pc is defined. At least the current code always failed on me stating that pc is already defined somewhere else. Let's use _pc instead, because that doesn't collide. Is this the right approach? Does it break on 440 too? If not, why not? Signed-off-by: Alexander Graf

[PATCH 10/27] Add book3s.c

2009-10-30 Thread Alexander Graf
This adds the book3s core handling file. Here everything that is generic to desktop PowerPC cores is handled, including interrupt injections, MSR settings, etc. It basically takes over the same role as booke.c for embedded PowerPCs. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: -

[PATCH 13/27] Add book3s_32 guest MMU

2009-10-30 Thread Alexander Graf
This patch adds an implementation for a G3/G4 MMU, so we can run G3 and G4 guests in KVM on Book3s_64. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - dprintk instead of scattered #ifdef's - // - /* */ - 80 characters per line --- arch/powerpc/kvm/book3s_32_mmu.c | 372

[PATCH 23/27] Export new PACA constants in asm-offsets

2009-10-30 Thread Alexander Graf
In order to access fields in the PACA from assembly code, we need to generate offsets using asm-offsets.c. So let's add the new PACA related bits, we just introduced! Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c |5 + 1 files changed, 5

[PATCH 06/27] Add Book3s_64 intercept helpers

2009-10-30 Thread Alexander Graf
We need to intercept interrupt vectors. To do that, let's add a file we can always include which only activates the intercepts when we have then configured. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s_64_asm.h | 58 ++ 1 files

[PATCH 11/27] Add book3s_64 Host MMU handling

2009-10-30 Thread Alexander Graf
We designed the Book3S port of KVM as modular as possible. Most of the code could be easily used on a Book3S_32 host as well. The main difference between 32 and 64 bit cores is the MMU. To keep things well separated, we treat the book3s_64 MMU as one possible compile option. This patch adds all

[PATCH 15/27] Add mfdec emulation

2009-10-30 Thread Alexander Graf
We support setting the DEC to a certain value right now. Doing that basically triggers the CPU local timer. But there's also an mfdec command that enabled the OS to read the decrementor. This is required at least by all desktop and server PowerPC Linux kernels. It can't really hurt to allow

[PATCH 20/27] Split init_new_context and destroy_context

2009-10-30 Thread Alexander Graf
For KVM we need to allocate a new context id, but don't really care about all the mm context around it. So let's split the alloc and destroy functions for the context id, so we can grab one without allocating an mm context. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 24/27] Include Book3s_64 target in buildsystem

2009-10-30 Thread Alexander Graf
Now we have everything in place to be able to build KVM, so let's add it as config option and in the Makefile. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig | 17 + arch/powerpc/kvm/Makefile | 27 +++ 2 files changed, 40

[PATCH 14/27] Add book3s_64 specific opcode emulation

2009-10-30 Thread Alexander Graf
There are generic parts of PowerPC that can be shared across all implementations and specific parts that only apply to BookE or desktop PPCs. This patch adds emulation for desktop specific opcodes that don't apply to BookE CPUs. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - //

[PATCH 22/27] Add fields to PACA

2009-10-30 Thread Alexander Graf
For KVM we need to store some information in the PACA, so we need to extend it. This patch adds KVM SLB shadow related entries to the PACA and a field that indicates if we're inside a guest. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/paca.h |9 + 1

[PATCH 12/27] Add book3s_64 guest MMU

2009-10-30 Thread Alexander Graf
To be able to run a guest, we also need to implement a guest MMU. This patch adds MMU handling for Book3s_64 guests. Signed-off-by: Alexander Graf ag...@suse.de --- v5 - v6: - dprintk instead of scattered #ifdef's - 80 line limit - // - /* */ --- arch/powerpc/kvm/book3s_64_mmu.c | 476

[PATCH 09/27] Add interrupt handling code

2009-10-30 Thread Alexander Graf
Getting from host state to the guest is only half the story. We also need to return to our host context and handle whatever happened to get us out of the guest. On PowerPC every guest exit is an interrupt. So all we need to do is trap the host's interrupt handlers and get into our #VMEXIT code to

[PATCH 17/27] Make head_64.S aware of KVM real mode code

2009-10-30 Thread Alexander Graf
We need to run some KVM trampoline code in real mode. Unfortunately, real mode only covers 8MB on Cell so we need to squeeze ourselves as low as possible. Also, we need to trap interrupts to get us back from guest state to host state without telling Linux about it. This patch adds interrupt

[PATCH 18/27] Add Book3s_64 offsets to asm-offsets.c

2009-10-30 Thread Alexander Graf
We need to access some VCPU fields from assembly code. In order to get the proper offsets, we have to define them in asm-offsets.c. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/asm-offsets.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff

[PATCH 07/27] Add book3s_64 highmem asm code

2009-10-30 Thread Alexander Graf
This is the of entry / exit code. In order to switch between host and guest context, we need to switch register state and call the exit code handler on exit. This assembly file does exactly that. To finally enter the guest it calls into book3s_64_slb.S. On exit it gets jumped at from

Re: [PATCH 20/27] Split init_new_context and destroy_context

2009-10-30 Thread Stephen Rothwell
Hi Alexander, On Fri, 30 Oct 2009 16:47:20 +0100 Alexander Graf ag...@suse.de wrote: --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -23,6 +23,11 @@ extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); extern void