RE: [patch 0/4] add e500 platform support for KVM

2008-08-22 Thread Liu Yu
-Original Message- From: Hollis Blanchard [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2008 4:54 AM To: Liu Yu Cc: kvm-ppc@vger.kernel.org Subject: Re: [patch 0/4] add e500 platform support for KVM On Fri, 2008-08-15 at 16:50 +0800, Liu Yu wrote: These patches add

RE: kernel status update

2008-11-02 Thread Liu Yu
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard Sent: Saturday, November 01, 2008 3:44 AM To: kvm-ppc Subject: kernel status update I've posted most of the patches here before, but I've built up a small backlog of patches to be

RE: cross-compiling flags?

2008-11-05 Thread Liu Yu
-Original Message- From: Hollis Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2008 11:57 PM To: Liu Yu-B13201 Cc: kvm-ppc Subject: cross-compiling flags? Hi Yu, Christian tells me you have some weird cross-build setup that brings you to want to use gcc's

RE: [PATCH 05 of 14] ppc: Create disassemble.h to extract instructionfields

2008-11-10 Thread Liu Yu
Since this header is created, will you consider to unify the argument list of kmppc_emul_tlbre/tlbwe/tlbsx, such as (struct kvm_vcpu *vcpu, u32 inst)? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard Sent: Wednesday, November 05,

RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-24 Thread Liu Yu
Good catch. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard Sent: Tuesday, November 25, 2008 1:38 AM To: Avi Kivity Cc: kvm-ppc; kvm Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit When the VM exits, we must

RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-25 Thread Liu Yu
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard Sent: Tuesday, November 25, 2008 1:38 AM To: Avi Kivity Cc: kvm-ppc; kvm Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit When the VM exits, we must call put_page()

[Patch] kvmppc: Add e500 support in KVM

2008-12-03 Thread Liu Yu
This patch set add e500 support in KVM. In order to merge e500 code, I adjusted some code of 44x. Not sure the code can work well for 44x. :-/ Comments are always welcomes. -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to [EMAIL PROTECTED] More

[PATCH 1/3] kvmppc: Some refactor for merging e500

2008-12-03 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_44x.h |9 + arch/powerpc/include/asm/kvm_host.h |7 arch/powerpc/include/asm/kvm_ppc.h |5 +-- arch/powerpc/kvm/44x.c | 22 +- arch/powerpc/kvm/44x_tlb.c | 29

[PATCH 2/3] kvmppc: Add e500 support

2008-12-03 Thread Liu Yu
Mainly include tlb and instruction emulation. Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_e500.h | 67 arch/powerpc/include/asm/kvm_host.h |1 + arch/powerpc/kernel/asm-offsets.c | 17 +- arch/powerpc/kvm/44x.c | 22 +-- arch/powerpc/kvm

[PATCH 3/3] kvmppc: Add extra exceptions' support for e500

2008-12-03 Thread Liu Yu
As e500 defines extra exceptions, more than booke. We need to make sure other booke platform cannot be influenced. Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_asm.h |7 +- arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerpc/kvm/booke.c

RE: [PATCH 2/3] kvmppc: Add e500 support

2008-12-03 Thread Liu Yu
-Original Message- From: Liu Yu-B13201 Sent: Wednesday, December 03, 2008 5:29 PM To: kvm-ppc@vger.kernel.org Cc: [EMAIL PROTECTED]; Liu Yu-B13201 Subject: [PATCH 2/3] kvmppc: Add e500 support Mainly include tlb and instruction emulation. Signed-off-by: Liu Yu [EMAIL

RE: [PATCH 1/3] kvmppc: Some refactor for merging e500

2008-12-05 Thread Liu Yu
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard Sent: Thursday, December 04, 2008 7:50 AM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH 1/3] kvmppc: Some refactor for merging e500 On Wed, 2008-12-03 at 17

[PATCH] fsl-booke: declare tlbcam_index and num_tlbcam_entries for use in c file

2008-12-10 Thread Liu Yu
KVM on E500 platform currently utilize TLB1 entries without bothering host, that is using unused TLB1 entries. So, KVM needs to read tlbcam_index and num_tlbcam_entries to know exactly which TLB1 entry is unused. Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/mmu-fsl

[PATCH 0/11] Add E500 support in KVM

2008-12-11 Thread Liu Yu
This patch set add E500 support in KVM, and is already based on Hollis's feedback (a patchset which not yet commit) btw: The latest code seems broken with this error. --- CC arch/powerpc/kvm/../../../virt/kvm/kvm_main.o arch/powerpc/kvm/../../../virt/kvm/kvm_main.c: In function

[PATCH 02/11] No need to include core header for KVM in asm-offsets.c currently

2008-12-11 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/kernel/asm-offsets.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index fc3b863..544a27f 100644 --- a/arch/powerpc/kernel/asm-offsets.c

[PATCH 04/11] Put iccci into CONFIG_44x ifdef

2008-12-11 Thread Liu Yu
E500 deosn't support this instruction. Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/kvm/booke_interrupts.S |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S index 084ebcd..4679ec2

[PATCH 05/11] E500 core-specific code

2008-12-11 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_e500.h | 67 +++ arch/powerpc/kvm/e500.c | 151 +++ 2 files changed, 218 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/include/asm/kvm_e500.h

[PATCH 06/11] E500 instructions emulation

2008-12-11 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/kvm/e500_emulate.c | 359 +++ 1 files changed, 359 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/e500_emulate.c diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm

[PATCH 08/11] Add kvmppc_mmu_dtlb/itlb_miss for booke

2008-12-11 Thread Liu Yu
E500 needs to update some mmu registers, when itlb or dtlb miss happens. Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_ppc.h |2 ++ arch/powerpc/kvm/44x_tlb.c |8 arch/powerpc/kvm/booke.c |2 ++ 3 files changed, 12 insertions

[PATCH 10/11] Fix IRQ priority search bug

2008-12-11 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/kvm/booke.c |2 +- arch/powerpc/kvm/booke.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 933c406..f192fbe 100644 --- a/arch/powerpc/kvm/booke.c +++ b

[PATCH 11/11] Add extra E500 exceptions

2008-12-11 Thread Liu Yu
Signed-off-by: Liu Yu [EMAIL PROTECTED] --- arch/powerpc/include/asm/kvm_asm.h |7 ++- arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerpc/kvm/booke.c| 18 ++ arch/powerpc/kvm/booke.h| 30 ++ arch/powerpc/kvm

RE: [PATCH 03/11] Use arch.pid as shadow pid for E500

2008-12-12 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Liu Yu-B13201 Sent: Friday, December 12, 2008 10:21 AM To: Hollis Blanchard Cc: kvm-ppc@vger.kernel.org Subject: RE: [PATCH 03/11] Use arch.pid as shadow pid for E500

[PATCH] Refresh TLB only when switch vcpu for powerpc

2008-12-15 Thread Liu Yu
Some work such as TLB put/load on E500 is not necessary at every process switch, which may take place frequently when host workload is heavy. This patch add a refresh interface for powerpc. These kind of work can use it to refresh at vcpu switch. Signed-off-by: Liu Yu yu@freescale.com

RE: [PATCH] Refresh TLB only when switch vcpu for powerpc

2008-12-15 Thread Liu Yu
Not sure 44x needs it... -Original Message- From: Liu Yu-B13201 Sent: Monday, December 15, 2008 5:55 PM To: kvm-ppc@vger.kernel.org Cc: Liu Yu-B13201 Subject: [PATCH] Refresh TLB only when switch vcpu for powerpc Some work such as TLB put/load on E500 is not necessary at every

[PATCH] Keep shadow pid equal to guest pid on E500

2008-12-15 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_emulate.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index ae3b249..ecb3f55 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b

RE: [PATCH 07/11] segment_map

2008-12-16 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Hollis Blanchard Sent: Tuesday, December 16, 2008 7:17 AM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH 07/11] segment_map On Thu, 2008-12-11 at 17:11

[PATCH 01/10] Add dbsr in kvm_vcpu_arch

2008-12-18 Thread Liu Yu
Kernel for E500 need clear dbsr when startup. So add dbsr register in kvm_vcpu_arch for BOOKE. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_host.h |1 + arch/powerpc/kvm/booke_emulate.c|4 2 files changed, 5 insertions(+), 0 deletions(-) diff

[PATCH 03/10] Put iccci into 44x specific code

2008-12-18 Thread Liu Yu
E500 deosn't support this instruction. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke_interrupts.S |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S index 084ebcd..4679ec2

[PATCH 04/10] E500 core-specific code

2008-12-18 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h | 67 +++ arch/powerpc/kvm/e500.c | 151 +++ 2 files changed, 218 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/include/asm/kvm_e500.h

[PATCH 06/10] E500 TLB emulation

2008-12-18 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 737 +++ arch/powerpc/kvm/e500_tlb.h | 184 +++ 2 files changed, 921 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/kvm/e500_tlb.c create mode 100644

[PATCH 09/10] Fix IRQ priority search confusion

2008-12-18 Thread Liu Yu
Although BOOKE_MAX_INTERRUPT has the right value, the meaning is not match. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke.c |2 +- arch/powerpc/kvm/booke.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc

[PATCH 10/10] Add extra E500 exceptions

2008-12-18 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_asm.h |7 ++- arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerpc/kvm/booke.c| 18 ++ arch/powerpc/kvm/booke.h| 30 ++ arch/powerpc

[PATCH 08/10] Enable E500 in KVM

2008-12-18 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/Kconfig | 13 + arch/powerpc/kvm/Makefile |9 + 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig index 6dbdc48..1465705 100644 --- a/arch

RE: [PATCH 07/10] Add kvmppc_mmu_dtlb/itlb_miss for booke

2008-12-18 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Hollis Blanchard Sent: Friday, December 19, 2008 7:49 AM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH 07/10] Add kvmppc_mmu_dtlb/itlb_miss for booke

[PATCH 06/10 v3] E500 TLB emulation

2008-12-18 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- [v2] 1. rename a lot functions in e500_tlb.c in order to get a clearer hierarchy. 2. remove unmatched comments. 3. adjust mask to make sure tlbsel always be safe. [v3] fix wrong spelling in comments. arch/powerpc/kvm/e500_tlb.c | 737

RE: [PATCH 07/10] Add kvmppc_mmu_dtlb/itlb_miss for booke

2008-12-18 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Hollis Blanchard Sent: Friday, December 19, 2008 7:49 AM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH 07/10] Add kvmppc_mmu_dtlb/itlb_miss for booke I

[PATCH] KVM/e500: Move to new tlb invalidate interface

2009-01-06 Thread Liu Yu
Commit 0ba3418b8b1c85ee1771c63f1dd12041614e56ff introduced a set of new interfaces for local tlb invalidate. Commit 2a4aca1144394653269720ffbb5a325a77abd5fa removed old method _tlbia(). Signed-off-by: Liu Yu yu@freescale.com --- KVM e500 now is broken as _tlbia() is removed. arch/powerpc

[PATCH 0/9] powerpc/kvm: Add MPC85xx platform support

2009-01-15 Thread Liu Yu
This patchset enable the support of MPC85xx platform in qemu/kvm. patch 1,2: bug fix patch 3: enable mpic for E500 core. patch 4: enable E500 mmu in kvm mode. patch 5: add E500 pci controller emulation. patch 6: add E500 irq support patch 7: add E500 core emulation patch 8: extern one function

[PATCH 7/9] powerpc/kvm: Add E500 core emulation

2009-01-15 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- Makefile.target |1 + hw/ppce500.c| 49 + hw/ppce500.h| 44 3 files changed, 94 insertions(+), 0 deletions(-) create mode 100644 hw/ppce500

[PATCH 6/9] powerpc/kvm: Add E500 irq support

2009-01-15 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- hw/ppc.c| 89 +++ hw/ppc.h|1 + target-ppc/cpu.h| 12 ++ target-ppc/translate_init.c |6 ++- 4 files changed, 106 insertions(+), 2 deletions

RE: [PATCH 7/9] powerpc/kvm: Add E500 core emulation

2009-01-19 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Liu Yu-B13201 Sent: Monday, January 19, 2009 6:55 PM To: Hollis Blanchard Cc: qemu-de...@nongnu.org; kvm-ppc@vger.kernel.org Subject: RE: [PATCH 7/9] powerpc/kvm: Add E500

RE: [PATCH 9/9] powerpc/kvm: Add MPC85xx board support

2009-01-19 Thread Liu Yu
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Hollis Blanchard Sent: Saturday, January 17, 2009 2:10 AM To: Liu Yu-B13201 Cc: qemu-de...@nongnu.org; kvm-ppc@vger.kernel.org Subject: RE: [PATCH 9/9] powerpc/kvm: Add

[PATCH 0/6] kvm/powerpc: Add emulation for MPC85xx in KVM mode

2009-01-22 Thread Liu Yu
This patch set enable another KVM PowerPC platform E500. Like the 440 core, the MMU and a few other bits are not currently emulated in Qemu itself, so right now it's only functional in conjunction with KVM. The emulation of MPC85xx boards (which use E500 as its core) can be run on any MPC85xx

[PATCH 1/6] kvm/powerpc: Enable MPIC for MPC85xx platform

2009-01-22 Thread Liu Yu
This patch add MPIC support for MPC85xx platform. MPIC and OpenPIC have very similar design. So a lot of code can be reused. Since no other TCG and KVM platforms uses OpenPIC for now, the modification makes the code only support MPIC. Signed-off-by: Liu Yu yu@freescale.com --- hw/openpic.c

[PATCH 3/6] kvm/powerpc: Add irq support for E500 core

2009-01-22 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- hw/ppc.c| 89 +++ hw/ppc.h|1 + target-ppc/cpu.h| 10 + target-ppc/translate_init.c |6 ++- 4 files changed, 104 insertions(+), 2 deletions

[PATCH 4/6] kvm/powerpc: extern one function for MPC85xx code use

2009-01-22 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/kvm_ppc.c |2 +- target-ppc/kvm_ppc.h |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c index f7ce52b..82c0f42 100644 --- a/target-ppc/kvm_ppc.c +++ b/target-ppc

[PATCH 5/6] kvm/powerpc: Add MPC85xx board support

2009-01-22 Thread Liu Yu
All MPC85xx boards use E500v1/v2 core. This patch add emulation of a virtual MPC85xx board, so that any MPC85xx host could run this emulation. Only tested it on MPC8544DS and MPC8572DS hosts, but it should work on other MPC85xx boards. Signed-off-by: Liu Yu yu@freescale.com

RE: [PATCH 4/5] qemu/kvm: Add MPC85xx support

2009-01-22 Thread Liu Yu
, January 10, 2009 4:36 AM To: Liu Yu-B13201 Cc: kvm-ppc@vger.kernel.org Subject: Re: [PATCH 4/5] qemu/kvm: Add MPC85xx support On Fri, 2009-01-09 at 15:56 +0800, Liu Yu wrote: As E500 exists in various boards such as MPC8544ds, MPC8572ds, MPC8560ads, etc.. So I would like to implement

[PATCH 1/5] kvm/powerpc: Enable MPIC for E500 platform.

2009-02-26 Thread Liu Yu
functions and function pointers for reset and irq raise. Haven't test OpenPIC. Signed-off-by: Liu Yu yu@freescale.com --- v4: 1.register different handlers for different memory areas. 2.increase openpic save version number. 3.register mpic reset handler with qemu_register_reset. hw/openpic.c

[PATCH 3/5] kvm/powerpc: Add irq support for E500 core

2009-02-26 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- hw/ppc.c| 60 +++ hw/ppc.h|1 + target-ppc/cpu.h| 10 +++ target-ppc/translate_init.c |5 ++- 4 files changed, 74 insertions(+), 2 deletions

[PATCH 4/5] kvm/powerpc: Add MPC8544DS board support

2009-02-26 Thread Liu Yu
This patch add an emulation of MPC8544DS board. It can work on All E500 platforms. Signed-off-by: Liu Yu yu@freescale.com --- v4: 1. remove checking return value from qemu_malloc. 2. use qemu_free instead of free. 3. use snprintf instead of sprintf. Makefile.target|2 +- hw

[PATCH 2/5] kvm/powerpc: Add freescale pci controller's support

2009-02-26 Thread Liu Yu
This patch add the emulation of freescale's pci controller for MPC85xx platform. Signed-off-by: Liu Yu yu@freescale.com --- v4: 1. use use pci_config_set_vendor_id and pci_config_set_device_id functions, and add the ID #defines to hw/pci.h. Makefile.target |2 + hw/pci.h

[PATCH 0/2] kvm/e500: fix bugs

2009-03-15 Thread Liu Yu
Hollis, Finally I found the reason for unstable kvm in SMP. do you think the modification is OK? -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/2] kvm/e500: Fix the bug that mas0 update to wrong value when read TLB entry

2009-03-17 Thread Liu Yu
Should clear and then update the next victim area here. Guest kernel only read TLB1 when startup kernel, this bug result in an extra 4K TLB1 mapping in guest from 0x0 to 0x0. As the problem has no impact to bootup a guest, we didn't notice it before. Signed-off-by: Liu Yu yu@freescale.com

[PATCH 2/2] kvm/e500: Fix the bug that KVM is unstable in SMP

2009-03-17 Thread Liu Yu
TLB entry should enable memory coherence in SMP. And like commit 631fba9dd3aca519355322cef035730609e91593, remove guard attribute to enable the prefetch of guest memory. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_tlb.c |4 arch/powerpc/kvm/e500_tlb.h |2

[PATCH 1/2] kvm/e500: Fix the bug that mas0 update to wrong value when read TLB entry

2009-03-17 Thread Liu Yu
Should clear and then update the next victim area here. Guest kernel only read TLB1 when startup kernel, this bug result in an extra 4K TLB1 mapping in guest from 0x0 to 0x0. As the problem has no impact to bootup a guest, we didn't notice it before. Signed-off-by: Liu Yu yu@freescale.com

[PATCH 2/2] kvm/e500: Fix the bug that KVM is unstable in SMP

2009-03-17 Thread Liu Yu
TLB entry should enable memory coherence in SMP. And like commit 631fba9dd3aca519355322cef035730609e91593, remove guard attribute to enable the prefetch of guest memory. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_tlb.c |4 arch/powerpc/kvm/e500_tlb.h |2

[PATCH 1/3] kvm/e500: Do not keep shadow tlb array

2009-04-27 Thread Liu Yu
Shadow tlb array costs a lot memory and incurs potential coherence problem. Remove it and we now translate to shadow mappings directly from guest TLB entries. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |8 +- arch/powerpc/kvm/e500_tlb.c | 277

[PATCH 2/3] kvm/e500: Map (vcpu,as,id) to core's shadow id.

2009-04-27 Thread Liu Yu
The shadow id mappings is based on Hollis's idea. We can benifit a lot from this trick: 1. Support AS=1 in guest. So that OSes other than Linux can be expected to run in the guest. 2. Minimize the frequency of TLB flushes. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include

[PATCH 3/3] kvm/e500: Add tlb0 entry invalidate

2009-04-27 Thread Liu Yu
It's always needed to invalidate the tlb0 entry which is overwritten by new one. It was OK not to do this before is because that we flushed TLB every time when we entered guest's userspace. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_tlb.c | 31

[PATCH 2/5] kvm/e500: Add shadow ID mapping support

2009-05-15 Thread Liu Yu
is created, both vcpu and core need to update their tables. But they can destroy the mapping one-sided. When shadow id get exhausted, a flush is needed for shadow id reference table. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |3 + arch/powerpc/kvm

[PATCH 1/5] kvm/e500: Discard shadow TLB

2009-05-15 Thread Liu Yu
after implement shadow ID there is no tlbia() in vcpu_put(), it's no need to restore hardware TLB any more. 3. Discard shadow TLB saves a lot memory. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |9 +- arch/powerpc/kvm/e500_tlb.c | 275

[PATCH 4/5] kvm/e500: minmize the TLB flush

2009-05-15 Thread Liu Yu
Only flush TLB when a reset to the shadow mappings is needed. For guest tlbia, we can reset vcpu's mappings instead of a real flush. And because different vcpu maps to different IDs, no flush is needed at vcpu_put() and mmu_destroy(). Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc

[PATCH 5/5] kvm/e500: Add tlb0 entry invalidate

2009-05-15 Thread Liu Yu
Invalidate TLB0 hardware entry when the related guest TLB entry is invalidated. It's a bug we didn't do this before. It didn't make problem is because that we flushed TLB every time when we enterred to guest's userspace. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm

[PATCH 0/3] some fix for kvm/e500

2009-06-05 Thread Liu Yu
Avi, This patchset fix the recent damages of e500. Hope it's not late for them to go into 2.6.30. -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/3] kvm/e500: Add MMUCFG and PVR emulation

2009-06-05 Thread Liu Yu
Latest kernel start to use these two register. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_emulate.c |3 +++ arch/powerpc/kvm/emulate.c |2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm

[PATCH 1/5] Fix kvmppc build error

2009-07-25 Thread Liu Yu
like this: /home/liuyu/git/qemu.git/target-ppc/kvm_ppc.c: In function 'kvmppc_read_host_property': /home/liuyu/git/qemu.git/target-ppc/kvm_ppc.c:55: error: label 'out' defined but not used Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/kvm_ppc.c |1 - 1 files changed, 0

[PATCH 0/5]

2009-07-25 Thread Liu Yu
The whole patchset includes: patch 1: fix kvmppc build error patch 2: fix kvmppc init error patch 3~5: add kvmppc guest debug support The guest debug still have some problems I haven't solved. 1. gdb 'next' command uses software breakpoint software breakpoint is implemented via modify guest's

[PATCH 4/5] Add eaddr translator for fsl_booke mmu

2009-07-25 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/helper.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index b7162df..f4af124 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -22,6 +22,7

[PATCH 5/5] guest debug init for 440 and e500 core

2009-07-25 Thread Liu Yu
e500 only support 2 hardware breakpoints, 440(BOOKE) supports 4. Signed-off-by: Liu Yu yu@freescale.com --- hw/ppc440_bamboo.c |1 + hw/ppce500_mpc8544ds.c |1 + target-ppc/kvm_ppc.h |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/ppc440_bamboo.c b

[PATCH] Single step hack for guest debug

2009-07-25 Thread Liu Yu
beginning of guest exit path. Then we need to recognize this kind of single step interrupt and fix the exit_nr to the corret value. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke.c| 82 +++ arch/powerpc/kvm/booke_interrupts.S |9

[PATCH v2 0/5] kvmppc: Add guest debug support

2009-08-03 Thread Liu Yu
This patchset add guest debug support for BOOKE. patch 1: fix current e500 broken patch 2: guest debug definitions patch 3: switch shadow/host debug register on guest enter/exit path patch 4: guest debug support patch 5: exitnr fixup in single step mode [v2] 1. move code from 2.6.30 to current

[PATCH 1/5] Fix the trace broken for e500 kvm

2009-08-03 Thread Liu Yu
Remove the broken trace. Will get them cleanup in future. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_tlb.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index fb1e1dc..a344be6 100644

[PATCH 2/5] kvmppc guest debug definitions

2009-08-03 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm.h | 20 arch/powerpc/include/asm/kvm_host.h | 18 ++ 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm

[PATCH 3/5] Switch shadow/host debug registers on guest enter/exit path

2009-08-03 Thread Liu Yu
So that we don't give any chance for host to trigger the debug event. Also the debug ability in guest can be implemented based on this. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kernel/asm-offsets.c |3 ++ arch/powerpc/kvm/booke_interrupts.S | 58

[PATCH 4/5] kvmppc guest debug support

2009-08-03 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_ppc.h |5 ++ arch/powerpc/kvm/booke.c | 97 ++-- arch/powerpc/kvm/e500.c|8 --- arch/powerpc/kvm/powerpc.c |2 +- 4 files changed, 99 insertions

[PATCH 5/5] kvmppc: exit_nr fixup for guest debug single step

2009-08-03 Thread Liu Yu
to recognize this kind of single step interrupt and fix the exit_nr to the corret value. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke.c| 82 +++ arch/powerpc/kvm/booke_interrupts.S |9 ++-- 2 files changed, 87 insertions

[PATCH v2 0/5] kvmppc: Add guest debug support

2009-08-04 Thread Liu Yu
The whole patchset add guest debug support for kvmppc. patch 1: fix kvmppc build error patch 2: fix kvmppc init error patch 3: add guest debug support patch 4: translate eaddr for fsl_booke mmu patch 5: guest debug init [v2]: 1. use cpu_synchronize_state() instead of kvm_arch_put_registers() 2.

[PATCH 3/5] kvmppc: Guest debug support

2009-08-04 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/kvm.c | 203 ++ 1 files changed, 203 insertions(+), 0 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index b53d6e9..97a0737 100644 --- a/target-ppc/kvm.c +++ b/target-ppc

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

2009-08-04 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/helper.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index 6eca2e5..07e56a4 100644 --- a/target-ppc/helper.c +++ b/target-ppc/helper.c @@ -22,6 +22,7

[PATCH 5/5] kvmppc: guest debug init

2009-08-04 Thread Liu Yu
440(BOOKE) supports 4 hardware breakpoints, while e500 supports 2. Signed-off-by: Liu Yu yu@freescale.com --- target-ppc/kvm.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 97a0737..82e7897 100644 --- a/target-ppc

[PATCH 1/3] kvmppc/e500: Add register l1csr0 emulation

2010-01-20 Thread Liu Yu
Latest kernel start to access l1csr0 to contron L1. We just tell guest no operation is on going. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |1 + arch/powerpc/kvm/e500_emulate.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff

[PATCH 0/3] kvmppc/e500:

2010-01-20 Thread Liu Yu
These patches fix current e500 break. -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/3] kvmppc/e500: fix tlbcfg emulation

2010-01-20 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500_emulate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c index 95f8ec8..97337dd 100644 --- a/arch/powerpc/kvm/e500_emulate.c +++ b

[PATCH v2 2/3] kvmppc/e500: Add PVR/PIR init for E500

2010-01-22 Thread Liu Yu
commit 513579e3a391a3874c478a8493080822069976e8 change the way we emulate PVR/PIR, which left PVR/PIR uninitialized on E500, and make guest puzzled. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/e500.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[PATCH v2 0/3] kvmppc/e500: fix breaks

2010-01-22 Thread Liu Yu
These patches fix current e500 break. v2: patch 2: add comment about PIR patch 3: move tlbcfg code to init -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v2 3/3] kvmppc/e500: fix tlbcfg emulation

2010-01-22 Thread Liu Yu
commit 55fb1027c1cf9797dbdeab48180da530e81b1c39 doesn't update tlbcfg correctly. Fix it and move this part to init code. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |2 ++ arch/powerpc/kvm/e500_emulate.c | 20 ++-- arch/powerpc/kvm

[PATCH v2 1/3] kvmppc/e500: Add register l1csr0 emulation

2010-01-22 Thread Liu Yu
Latest kernel start to access l1csr0 to contron L1. We just tell guest no operation is on going. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |1 + arch/powerpc/kvm/e500_emulate.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff

[PATCH] kvmppc/booke: Set ESR and DEAR when inject interrupt to guest

2010-01-22 Thread Liu Yu
Old method prematurely sets ESR and DEAR. Move this part after we decide to inject interrupt, and make it more like hardware behave. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke.c | 24 ++-- arch/powerpc/kvm/emulate.c |2 -- 2 files changed

[PATCH v3 3/3] kvmppc/e500: fix tlbcfg emulation

2010-01-22 Thread Liu Yu
commit 55fb1027c1cf9797dbdeab48180da530e81b1c39 doesn't update tlbcfg correctly. Fix it. And since guest OS likes 'fixed' hardware, initialize tlbcfg everytime when guest access is useless. So move this part to init code. Signed-off-by: Liu Yu yu@freescale.com --- v3: change the commit

[PATCH v2] kvmppc/booke: Set ESR and DEAR when inject interrupt to guest

2010-02-02 Thread Liu Yu
Old method prematurely sets ESR and DEAR. Move this part after we decide to inject interrupt, which is more like hardware behave. Signed-off-by: Liu Yu yu@freescale.com --- v2: use new fields queued_esr queued_dear to queue flags arch/powerpc/include/asm/kvm_host.h |2 + arch/powerpc

[PATCH v3] kvmppc/booke: Set ESR and DEAR when inject interrupt to guest

2010-02-02 Thread Liu Yu
Old method prematurely sets ESR and DEAR. Move this part after we decide to inject interrupt, which is more like hardware behave. Signed-off-by: Liu Yu yu@freescale.com --- v3: change some functions to static arch/powerpc/include/asm/kvm_host.h |2 + arch/powerpc/kvm/booke.c

[PATCH 1/4] kvmppc: guest debug definitions

2010-02-03 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm.h | 20 arch/powerpc/include/asm/kvm_host.h | 16 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm

[PATCH 2/4] kvmppc/booke: switch shadow/host debug registers on guest enter/exit path

2010-02-03 Thread Liu Yu
This provide a precise way to avoid confounding settings of guest and host. Also the guest hardware emulation about debug can be implemented based on this. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kernel/asm-offsets.c |3 ++ arch/powerpc/kvm/booke_interrupts.S | 58

[PATCH 4/4] kvmppc/booke: exit_nr fixup for guest debug single step

2010-02-03 Thread Liu Yu
. Then we need to recognize this kind of single step interrupt and fix the exit_nr to the original value. So that everything looks like normal. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/booke.c| 82 +++ arch/powerpc/kvm

[PATCH 1/2] kvm/e500v2: Remove shadow tlb

2010-09-08 Thread Liu Yu
to trace the relation between guest tlb entry and page. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/include/asm/kvm_e500.h |7 +- arch/powerpc/kvm/e500_tlb.c | 287 +-- 2 files changed, 108 insertions(+), 186 deletions(-) diff --git

[PATCH 2/2] kvm/e500v2: mapping guest TLB1 to host TLB0

2010-09-08 Thread Liu Yu
. This patch remove the link between pages and guest tlb entry to do the unlink. And keep host_tlb0_ref in each vcpu to trace pages. Then it's easy to map guest TLB1 to host TLB0. In guest ramdisk boot test(guest mainly uses TLB1), with this patch, the tlb miss number get down 90%. Signed-off-by: Liu

[PATCH 0/2] kvm/e500v2: MMU optimization

2010-09-08 Thread Liu Yu
The patchset aims at mapping guest TLB1 to host TLB0. And it includes: [PATCH 1/2] kvm/e500v2: Remove shadow tlb [PATCH 2/2] kvm/e500v2: mapping guest TLB1 to host TLB0 The reason we need patch 1 is because patch 1 make things simple and flexible. Only applying patch 1 aslo make kvm work. -- To

[PATCH] KVM: PPC: Apply paravirt to all vcpu

2011-11-22 Thread Liu Yu
Previously, only primary vcpu get enabled paravirt. Signed-off-by: Liu Yu yu@freescale.com --- arch/powerpc/kvm/powerpc.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 73508e7..a727064 100644

[PATCH v2] KVM: PPC: Avoid patching paravirt template code

2011-12-01 Thread Liu Yu
Currently we patch the whole code include paravirt template code. This isn't safe for scratch area and has impact to performance. Signed-off-by: Liu Yu yu@freescale.com --- v2: exclude the entire template region in the main loop arch/powerpc/kernel/kvm.c |9 - arch/powerpc

  1   2   >