Re: kvm on G4 processors?

2009-02-18 Thread Alexander Graf
On 18.02.2009, at 13:19, Jimi Xenidis wrote: On Feb 18, 2009, at 3:21 AM, Alexander Graf wrote: On 17.02.2009, at 09:32, Liu Yu-B13201 yu@freescale.com wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf

Re: kvm on G4 processors?

2009-02-18 Thread Alexander Graf
On 18.02.2009, at 14:10, Jimi Xenidis wrote: On Feb 18, 2009, at 6:53 AM, Alexander Graf wrote: On 18.02.2009, at 13:19, Jimi Xenidis wrote: On Feb 18, 2009, at 3:21 AM, Alexander Graf wrote: On 17.02.2009, at 09:32, Liu Yu-B13201 yu@freescale.com wrote: -Original

Re: How is code passed for KVM_RUN?

2009-03-06 Thread Alexander Graf
On 06.03.2009, at 23:47, Christoffer Dall wrote: Hi. We are a small group trying to port KVM to ARM and taking inspiration in the work done for PowerPC. Wow, awesome. Do you have any idea how to come around the limitations of the platform? As far as I know ARM is not virtualizable. One

Re: MMU tricks for NetBSD guests

2009-04-02 Thread Alexander Graf
spaces (two different host PIDs, one for each guest AS value). Alexander Graf has already done something like this for his 970 work, so he might be able to provide more details or issues to be aware of in a scheme like this. That sounds a lot like what I imlemented for real mode on 970. I

Re: [Lguest] powerpc64 port anyone?

2009-04-26 Thread Alexander Graf
On 22.04.2009, at 23:41, Hollis Blanchard wrote: On Thu, 2009-04-23 at 01:19 +0400, Wartan Hachaturow wrote: On Wed, Apr 22, 2009 at 7:41 PM, Hollis Blanchard holl...@us.ibm.com wrote: KVM supports embedded PowerPC (440 and e500 at the moment), and there has been some work to port it to

Re: Exception handling between QEMU and KVM

2009-07-01 Thread Alexander Graf
On 01.07.2009, at 05:28, Christoffer Dall wrote: Hi all. We are still working on our ARM port of KVM and we are managing to let the guest decompress the kernel image and run from relocated address and we can support enabling MMU before this. Howver, to debug relocated micro-hypervisor for

[PATCH 02/23] Add PPC64 definitions

2009-07-07 Thread Alexander Graf
We need quite a bunch of new constants for PPC64, so let's define them now. These constants will be used in later patches. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_asm.h | 39 1 files changed, 39 insertions(+), 0

[PATCH 04/23] Add asm/970_kvm.h

2009-07-07 Thread Alexander Graf
This adds the 970 specific header file that contains structs that are only valid on 970 specific code. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_970.h | 131 1 files changed, 131 insertions(+), 0 deletions(-) create mode

[PATCH 22/23] Hack in dirty logging for VGA

2009-07-07 Thread Alexander Graf
I haven't implemented dirty logging yet, but without things are just way too slow. So for the time being I hacked in a dummy function that always tells userspace we're dirty in VGA regions. Please don't apply this. This patch is for reference only. Signed-off-by: Alexander Graf ag...@suse.de

Re: [PATCH 22/23] Hack in dirty logging for VGA

2009-07-07 Thread Alexander Graf
On 07.07.2009, at 17:48, Avi Kivity wrote: On 07/07/2009 05:17 PM, Alexander Graf wrote: I haven't implemented dirty logging yet, but without things are just way too slow. So for the time being I hacked in a dummy function that always tells userspace we're dirty in VGA regions. Please

Re: [PATCH 01/23] Pass PVR in sregs

2009-07-07 Thread Alexander Graf
On 08.07.2009, at 00:50, Hollis Blanchard wrote: On Tue, 2009-07-07 at 18:40 +0300, Avi Kivity wrote: On 07/07/2009 05:17 PM, Alexander Graf wrote: 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 PPC64 we

Re: [PATCH 05/23] Add common PPC64 KVM asm helpers

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 06:17, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 16:17 +0200, Alexander Graf wrote: +.macro to_phys dest_reg, source_reg +#if PAGE_OFFSET == 0xc000 + clrldi \dest_reg, \source_reg, 2 +#else + #error Unknown PAGE_OFFSET +#endif We already

Re: [PATCH 05/23] Add common PPC64 KVM asm helpers

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 06:17, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 16:17 +0200, Alexander Graf wrote: +#define HOST_STACK_R1 (0 * ULONG_SIZE) +/* We need to keep some space here that the C function */ +/* we jump into later can clobber */ +#define HOST_STACK_LR (8 * ULONG_SIZE

Re: [PATCH 06/23] Add 970 highmem asm code

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 06:30, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 16:17 +0200, Alexander Graf wrote: 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

Re: [PATCH 07/23] Add SLB switching code for entry/exit

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 06:38, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 16:17 +0200, Alexander Graf wrote: This is the really low level of guest entry/exit code. Usually the Linux kernel resides in virtual memory 0xc000 to 0x. These addresses are mapped

Re: [PATCH 08/23] Add interrupt handling code

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 07:24, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 16:17 +0200, Alexander Graf wrote: 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

Re: [PATCH 00/23] Add KVM support for PPC64 (970) hosts

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 08:17, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 17:44 +0200, Arnd Bergmann wrote: Most of the code is after 970 but does look generic enough to be usable on other powerpc64 implementations. How specific to 970 is it really? Maybe the files and identifiers could be

Re: [PATCH 22/23] Hack in dirty logging for VGA

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 08:20, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 18:48 +0300, Avi Kivity wrote: On 07/07/2009 05:17 PM, Alexander Graf wrote: I haven't implemented dirty logging yet, but without things are just way too slow. So for the time being I hacked in a dummy function

Re: [PATCH 00/23] Add KVM support for PPC64 (970) hosts

2009-07-08 Thread Alexander Graf
On 08.07.2009, at 13:10, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Wed, 2009-07-08 at 10:28 +0200, Alexander Graf wrote: What about userspace applications that use dcbz? That's generally the killer... but then, MOL was only ever implemented on ppc32 so we never had

Re: kvm BookE and SPRGs

2009-07-10 Thread Alexander Graf
Hi Ben, On 10.07.2009, at 10:10, Benjamin Herrenschmidt wrote: On Fri, 2009-07-10 at 16:31 +1000, Benjamin Herrenschmidt wrote: I was roaming through kernel usage of SPRGs and noticed a small detail in kvmppc for BookE ... any reason why in OP_31_XOP_MTSPR, you open coded the emulation of

Re: kvm BookE and SPRGs

2009-07-10 Thread Alexander Graf
On 10.07.2009, at 11:39, Benjamin Herrenschmidt wrote: On Fri, 2009-07-10 at 11:18 +0200, Alexander Graf wrote: The only problem I see is that the firmware lives in the high 4k, so we'd have to have some sort of enabling HV-call too. What firmware out of curiosity ? The treeboot thingy

[PATCH 04/23] Add asm/kvm_book3s.h

2009-07-16 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 --- arch/powerpc/include/asm/kvm_book3s.h | 131 + 1 files changed, 131 insertions(+), 0 deletions(-) create

[PATCH 05/23] Add Book3s_64 intercept helpers

2009-07-16 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 07/23] Add SLB switching code for entry/exit

2009-07-16 Thread Alexander Graf
to guest high SLB state and vice versa. To store both host and guest state in the SLB, we store guest kernel SLB entries in a different range (0x4 - 0x7). For details on which entries go where, please see the patch itself. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 08/23] Add interrupt handling code

2009-07-16 Thread Alexander Graf
handlers. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_rmhandlers.S | 133 +++ 1 files changed, 133 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/book3s_64_rmhandlers.S diff --git a/arch/powerpc/kvm

[PATCH 10/23] Add book3s_64 Host MMU handling

2009-07-16 Thread Alexander Graf
the MMU helpers the rest of the code needs in order to modify the host's MMU, like setting PTEs and segments. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu_host.c | 439 + 1 files changed, 439 insertions(+), 0 deletions(-) create

[PATCH 11/23] Add book3s_64 guest MMU

2009-07-16 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 --- arch/powerpc/kvm/book3s_64_mmu.c | 466 ++ 1 files changed, 466 insertions(+), 0 deletions

[PATCH 12/23] Add book3s_32 guest MMU

2009-07-16 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 --- arch/powerpc/kvm/book3s_32_mmu.c | 357 ++ 1 files changed, 357 insertions(+), 0 deletions(-) create mode

[PATCH 13/23] Add book3s_64 specific opcode emulation

2009-07-16 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 --- arch/powerpc/kvm

[PATCH 14/23] Add mfdec emulation

2009-07-16 Thread Alexander Graf
embedded ones to do it as well though. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 7737146..50d411d 100644 --- a/arch

[PATCH 15/23] Add desktop PowerPC specific emulation

2009-07-16 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 50d411d..665fa83 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc

[PATCH 17/23] Patch SLB size

2009-07-16 Thread Alexander Graf
as well, so we can loop through the SLB easily. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/mm/slb.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 3b52c80..3be40a4 100644 --- a/arch

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

2009-07-16 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 19/23] Export symbols for KVM module

2009-07-16 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 --- arch/powerpc/kernel/ppc_ksyms.c |3 ++- arch

[PATCH 22/23] Fix trace.h

2009-07-16 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 ag

[PATCH 23/23] Hack in dirty logging for VGA

2009-07-16 Thread Alexander Graf
I haven't implemented dirty logging yet, but without things are just way too slow. So for the time being I hacked in a dummy function that always tells userspace we're dirty in VGA regions. Please don't apply this. This patch is for reference only. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 21/23] Include Book3s_64 target in buildsystem

2009-07-16 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

Re: [PATCH 00/23] Add KVM support for Book3s_64 (PPC64) hosts v2

2009-07-17 Thread Alexander Graf
On 18.07.2009, at 06:49, Benjamin Herrenschmidt wrote: On Thu, 2009-07-16 at 15:29 +0200, Alexander Graf wrote: To really make use of this, you will also need a modified version of qemu that can deal with KVM on desktop cores. I will send out patches for those later, but want to get feedback

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-07-26 Thread Alexander Graf
On 26.07.2009, at 14:10, Avi Kivity wrote: On 07/26/2009 02:55 PM, Alexander Graf wrote: I will need some acks from ppc people. Obviously for the non-kvm bits, but also for the kvm bits as I am not qualified to review ppc code. Right, FWIW Ben would actually even prefer to take

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-07-26 Thread Alexander Graf
On 26.07.2009, at 14:46, Avi Kivity wrote: On 07/26/2009 03:26 PM, Alexander Graf wrote: Cool, next week :-). The current version works fine without. And I need a weekend for a change :-D. Having returned from a 10-day weekend, I can only recommend this. Hope you had fun and didn't read

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-07-26 Thread Alexander Graf
On 26.07.2009, at 14:56, Avi Kivity wrote: On 07/26/2009 03:46 PM, Alexander Graf wrote: On 26.07.2009, at 14:46, Avi Kivity wrote: On 07/26/2009 03:26 PM, Alexander Graf wrote: Cool, next week :-). The current version works fine without. And I need a weekend for a change :-D. Having

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-07-26 Thread Alexander Graf
Am 26.07.2009 um 14:54 schrieb Alexander Graf ag...@suse.de: On 26.07.2009, at 14:56, Avi Kivity wrote: On 07/26/2009 03:46 PM, Alexander Graf wrote: On 26.07.2009, at 14:46, Avi Kivity wrote: On 07/26/2009 03:26 PM, Alexander Graf wrote: Cool, next week :-). The current version

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-07-26 Thread Alexander Graf
Am 26.07.2009 um 19:53 schrieb Avi Kivity a...@redhat.com: On 07/26/2009 08:25 PM, Alexander Graf wrote: Perhaps we can get away with disabling 32-on-64 for the configurations that break to start with. 32-on-64 only breaks for big endian which nobody except for this target implements

[PATCH] Use Little Endian for Dirty Bitmap

2009-07-27 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 17d8688..3482ad1 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -48,6 +48,7 @@ #include asm/io.h #include

Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu

2009-08-21 Thread Alexander Graf
...@codesourcery.com; Alexander Graf Subject: Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu On Tue, 2009-08-04 at 17:36 +0800, Liu Yu wrote: Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/helper.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 4/5] kvmppc: Translate eaddr for fsl_booke mmu

2009-08-29 Thread Alexander Graf
On 24.08.2009, at 19:33, Hollis Blanchard wrote: On Mon, 2009-08-24 at 10:44 +0800, Liu Yu-B13201 wrote: IMHO userspace should do the translation and do an ioctl to fetch the required information (soft TLB cache / SLB / SDR1) so we can reuse the existing qemu infrastructure. BOOK3S has

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-09-02 Thread Alexander Graf
On 02.09.2009, at 07:40, Benjamin Herrenschmidt wrote: On Fri, 2009-07-24 at 18:30 +0200, Alexander Graf wrote: 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

Re: [GIT PULL] Add KVM support for Book3s_64 (PPC64) hosts v3

2009-09-02 Thread Alexander Graf
On 02.09.2009, at 08:23, Benjamin Herrenschmidt wrote: Well, we need mm_alloc to reserve a VA range. And since that happens in module code, it needs to be exported. Hrm... I've missed where you call it. Can't you directly allocate a context ID instead of a whole mm ? It's in the vcpu init

Re: [PATCH] Use Little Endian for Dirty Bitmap

2009-09-26 Thread Alexander Graf
bump On 27.07.2009, at 12:38, Alexander Graf wrote: 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

[PATCH 02/27] Pass PVR in sregs

2009-09-29 Thread Alexander Graf
guests. In order to get that information, we use the sregs ioctl, because we don't want to reset the guest CPU on every normal register set. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch

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

2009-09-29 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 --- arch/powerpc/include/asm/kvm_host.h | 75

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

2009-09-29 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 ag

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

2009-09-29 Thread Alexander Graf
Alexander Graf (27): Move dirty logging code to sub-arch Pass PVR in sregs Add Book3s definitions Add Book3s fields to vcpu structs Add asm/kvm_book3s.h Add Book3s_64 intercept helpers Add book3s_64 highmem asm code Add SLB switching code for entry/exit Add interrupt handling code Add

[PATCH 06/27] Add Book3s_64 intercept helpers

2009-09-29 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 05/27] Add asm/kvm_book3s.h

2009-09-29 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 16/27] Add desktop PowerPC specific emulation

2009-09-29 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 50d411d..665fa83 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc

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

2009-09-29 Thread Alexander Graf
of the guest's SLB in the PACA, switch to that on entry and only restore bolted entries on exit, leaving the rest to the Linux SLB fault handler. That way we get a really clean way of switching the SLB. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_slb.S | 277

[PATCH 07/27] Add book3s_64 highmem asm code

2009-09-29 Thread Alexander Graf
book3s_64_slb.S too. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - header rename fix --- arch/powerpc/include/asm/kvm_ppc.h |1 + arch/powerpc/kvm/book3s_64_interrupts.S | 392 +++ 2 files changed, 393 insertions(+), 0 deletions(-) create mode 100644

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

2009-09-29 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 21/27] Export KVM symbols for module

2009-09-29 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 20/27] Split init_new_context and destroy_context

2009-09-29 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 --- arch/powerpc/include

[PATCH 09/27] Add interrupt handling code

2009-09-29 Thread Alexander Graf
handlers. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - header rename fix --- arch/powerpc/kvm/book3s_64_rmhandlers.S | 131 +++ 1 files changed, 131 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/book3s_64_rmhandlers.S diff --git

[PATCH 22/27] Add fields to PACA

2009-09-29 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 11/27] Add book3s_64 Host MMU handling

2009-09-29 Thread Alexander Graf
the MMU helpers the rest of the code needs in order to modify the host's MMU, like setting PTEs and segments. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_mmu_host.c | 412 + 1 files changed, 412 insertions(+), 0 deletions(-) create

[PATCH 24/27] Include Book3s_64 target in buildsystem

2009-09-29 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 25/27] Fix trace.h

2009-09-29 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 ag

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

2009-09-29 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 91c0225..5aaa67c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -48,6 +48,7 @@ #include asm/io.h #include

[PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
for suggestions here. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index e27b7a9..91c0225 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -720,6 +720,11

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
Am 29.09.2009 um 06:25 schrieb Avi Kivity a...@redhat.com: On 09/29/2009 11:17 AM, Alexander Graf wrote: On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 15:25, Avi Kivity wrote: On 09/29/2009 11:17 AM, Alexander Graf wrote: On 29.09.2009, at 11:14, Avi Kivity wrote: On 09/29/2009 10:18 AM, Alexander Graf wrote: With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-09-29 Thread Alexander Graf
On 29.09.2009, at 18:42, Avi Kivity wrote: On 09/29/2009 06:29 PM, Alexander Graf wrote: How about this one? (broken whitespace!) From c3864a2c5e1fccff7839e47f12c09d9739ca441e Mon Sep 17 00:00:00 2001 From: Alexander Graf ag...@suse.de Date: Thu, 23 Jul 2009 21:05:57 +0200 Subject

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v4

2009-09-30 Thread Alexander Graf
On 30.09.2009, at 10:42, Avi Kivity wrote: On 09/29/2009 10:17 AM, Alexander Graf wrote: 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

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v4

2009-09-30 Thread Alexander Graf
On 30.09.2009, at 10:59, Avi Kivity wrote: On 09/30/2009 10:47 AM, Alexander Graf wrote: What's the plan here? While not a requirement for merging, that's one of the kvm points of strength and I'd like to see it supported across the board. I'm having a deja vu :-). Will probably

Re: [PATCH 02/27] Pass PVR in sregs

2009-10-10 Thread Alexander Graf
Am 09.10.2009 um 23:00 schrieb Hollis Blanchard holl...@us.ibm.com: On Tue, 2009-09-29 at 10:17 +0200, Alexander Graf wrote: 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

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Alexander Graf
On 30.09.2009, at 15:29, Avi Kivity wrote: On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct *vma) static struct file_operations kvm_vm_fops = { .release=

Re: [PATCH 26/27] Enable 32bit dirty log pointers on 64bit host

2009-10-20 Thread Alexander Graf
On 20.10.2009, at 15:23, Avi Kivity wrote: On 10/20/2009 07:09 PM, Alexander Graf wrote: On 30.09.2009, at 15:29, Avi Kivity wrote: On 09/30/2009 03:17 PM, Avi Kivity wrote: { struct page *page[1]; @@ -2331,7 +2374,7 @@ static int kvm_vm_mmap(struct file *file, struct vm_area_struct

[PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-21 Thread Alexander Graf
layer for the ioctl: A better way to do this is to add a separate compat_ioctl() method that converts this for you. From: Arnd Bergmann a...@arndb.de Signed-off-by: Arnd Bergmann a...@arndb.de Acked-by: Alexander Graf ag...@suse.de --- Changes from Arnd's example version: - s/log.log/log

[PATCH 09/27] Add interrupt handling code

2009-10-21 Thread Alexander Graf
handlers. Signed-off-by: Alexander Graf ag...@suse.de --- v3 - v4: - header rename fix --- arch/powerpc/kvm/book3s_64_rmhandlers.S | 131 +++ 1 files changed, 131 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/book3s_64_rmhandlers.S diff --git

[PATCH 27/27] Use hrtimers for the decrementer

2009-10-21 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-21 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 54a272f..c565e5b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -49,6 +49,7 @@ #include asm/io.h #include

[PATCH 03/27] Add Book3s definitions

2009-10-21 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 20/27] Split init_new_context and destroy_context

2009-10-21 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 --- arch/powerpc/include

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

2009-10-21 Thread Alexander Graf
traps and includes the KVM code that requires real mode in the real mode parts of Linux. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/exception-64s.h |2 ++ arch/powerpc/kernel/exceptions-64s.S |8 arch/powerpc/kernel/head_64.S|7

[PATCH 15/27] Add mfdec emulation

2009-10-21 Thread Alexander Graf
embedded ones to do it as well though. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 7737146..50d411d 100644 --- a/arch

[PATCH 14/27] Add book3s_64 specific opcode emulation

2009-10-21 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 --- arch/powerpc/kvm

[PATCH 13/27] Add book3s_32 guest MMU

2009-10-21 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 --- arch/powerpc/kvm/book3s_32_mmu.c | 354 ++ 1 files changed, 354 insertions(+), 0 deletions(-) create mode

[PATCH 02/27] Pass PVR in sregs

2009-10-21 Thread Alexander Graf
guests. In order to get that information, we use the sregs ioctl, because we don't want to reset the guest CPU on every normal register set. Signed-off-by: Alexander Graf ag...@suse.de --- v4 - v5 - make PVR 32 bits --- arch/powerpc/include/asm/kvm.h |2 ++ 1 files changed, 2 insertions

[PATCH 24/27] Include Book3s_64 target in buildsystem

2009-10-21 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 16/27] Add desktop PowerPC specific emulation

2009-10-21 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- v4 - v5: - use get_tb instead of mftb - make ppc32 and ppc64 emulation share more code --- arch/powerpc/kvm/emulate.c | 49 +++- 1 files changed, 39 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kvm

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

2009-10-21 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 08/27] Add SLB switching code for entry/exit

2009-10-21 Thread Alexander Graf
of the guest's SLB in the PACA, switch to that on entry and only restore bolted entries on exit, leaving the rest to the Linux SLB fault handler. That way we get a really clean way of switching the SLB. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_slb.S | 277

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5

2009-10-21 Thread Alexander Graf
On 21.10.2009, at 17:03, Alexander Graf wrote: 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

Re: [PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-22 Thread Alexander Graf
On 22.10.2009, at 12:23, Avi Kivity wrote: On 10/21/2009 04:08 PM, Alexander Graf wrote: From: Arnd Bergmanna...@arndb.de With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty

[PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-22 Thread Alexander Graf
layer for the ioctl: A better way to do this is to add a separate compat_ioctl() method that converts this for you. Based on initial patch from Arnd Bergmann. From: Arnd Bergmann a...@arndb.de Signed-off-by: Arnd Bergmann a...@arndb.de Signed-off-by: Alexander Graf ag...@suse.de --- Changes

Re: [PATCH] Enable 32bit dirty log pointers on 64bit host

2009-10-23 Thread Alexander Graf
On 23.10.2009, at 10:41, Jan Kiszka wrote: Alexander Graf wrote: From: Arnd Bergmann a...@arndb.de With big endian userspace, we can't quite figure out if a pointer is 32 bit (shifted 32) or 64 bit when we read a 64 bit pointer. This is what happens with dirty logging. To get the pointer

[PATCH] Only expose compat ioctl when CONFIG_COMPAT

2009-10-23 Thread Alexander Graf
jan.kis...@siemens.com Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 54a272f..bd44fb4 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c

Re: [PATCH 00/27] Add KVM support for Book3s_64 (PPC64) hosts v5

2009-10-27 Thread Alexander Graf
On 27.10.2009, at 09:56, Avi Kivity wrote: On 10/27/2009 01:21 AM, Olof Johansson wrote: On Oct 26, 2009, at 6:20 PM, Hollis Blanchard wrote: For some reason, I'm not seeing this build break, but the patch is obviously correct. Acked-by: Hollis Blanchard holl...@us.ibm.com I saw it when

[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 ag

  1   2   3   4   5   6   7   8   9   10   >