RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: Bhushan Bharat-R65777 Sent: Tuesday, August 06, 2013 6:42 AM To: Wood Scott-B07421 Cc: Benjamin Herrenschmidt; ag...@suse.de; kvm-ppc@vger.kernel.org; k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add

[PATCH 2/2] KVM: PPC: Book3E HV: call SOFT_DISABLE_INTS to sync the software state

2013-08-06 Thread Tiejun Chen
We enter with interrupts disabled in hardware, but we need to call SOFT_DISABLE_INTS anyway to ensure that the software state is kept in sync. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/bookehv_interrupts.S | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH 0/2] KVM: PPC: Book3E HV: Rework to sync the software state

2013-08-06 Thread Tiejun Chen
For more detail please have a look at this :) http://patchwork.ozlabs.org/patch/257974/ http://ns1.yosemitephotos.net/lists/kvm-ppc/msg07430.html Tiejun Chen (2): Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit() KVM: PPC: Book3E HV: call SOFT_DISABLE_INTS to sync

[PATCH 1/2] Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-08-06 Thread Tiejun Chen
We should revert this commit to rework. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com --- arch/powerpc/kvm/booke.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 17722d8..7653c9c 100644 ---

[PATCH 4/6 v3] powerpc: move linux pte/hugepte search to more generic file

2013-08-06 Thread Bharat Bhushan
Linux pte search functions find_linux_pte_or_hugepte() and find_linux_pte() have nothing specific to 64bit anymore. So they are move from pgtable-ppc64.h to asm/pgtable.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - This is a new change in this

[PATCH 6/6 v3] kvm: powerpc: use caching attributes as per linux pte

2013-08-06 Thread Bharat Bhushan
KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - setting pgdir before

[PATCH 2/6 v3] kvm: powerpc: allow guest control E attribute in mas2

2013-08-06 Thread Bharat Bhushan
E bit in MAS2 bit indicates whether the page is accessed in Little-Endian or Big-Endian byte order. There is no reason to stop guest setting E, so allow him. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - no change arch/powerpc/kvm/e500.h |2 +- 1

[PATCH 3/6 v3] kvm: powerpc: allow guest control G attribute in mas2

2013-08-06 Thread Bharat Bhushan
G bit in MAS2 indicates whether the page is Guarded. There is no reason to stop guest setting G, so allow him. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - no change arch/powerpc/kvm/e500.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 06, 2013 12:49 AM To: Bhushan Bharat-R65777 Cc: Benjamin Herrenschmidt; Wood Scott-B07421; ag...@suse.de; kvm- p...@vger.kernel.org; k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH 5/6 v2]

Re: [PATCH 1/2] Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-08-06 Thread Scott Wood
On Tue, 2013-08-06 at 17:31 +0800, Tiejun Chen wrote: We should revert this commit to rework. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com This breaks bisect. -Scott -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to

Re: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Paul Mackerras
On Tue, Aug 06, 2013 at 07:02:48AM +, Bhushan Bharat-R65777 wrote: I am trying to me the Linux pte search and update generic so that this can be used for powerpc as well. I am not sure which of the below two should be ok, please help Given that the BookE code uses gfn_to_pfn_memslot()

Re: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Scott Wood
On Wed, 2013-08-07 at 10:24 +1000, Paul Mackerras wrote: On Tue, Aug 06, 2013 at 07:02:48AM +, Bhushan Bharat-R65777 wrote: I am trying to me the Linux pte search and update generic so that this can be used for powerpc as well. I am not sure which of the below two should be ok,

Re: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Paul Mackerras
On Tue, Aug 06, 2013 at 08:11:34PM -0500, Scott Wood wrote: On Wed, 2013-08-07 at 10:24 +1000, Paul Mackerras wrote: On Tue, Aug 06, 2013 at 07:02:48AM +, Bhushan Bharat-R65777 wrote: I am trying to me the Linux pte search and update generic so that this can be used for powerpc

Re: [PATCH 1/2] Revert kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-08-06 Thread “tiejun.chen”
On 08/07/2013 04:50 AM, Scott Wood wrote: On Tue, 2013-08-06 at 17:31 +0800, Tiejun Chen wrote: We should revert this commit to rework. Signed-off-by: Tiejun Chen tiejun.c...@windriver.com This breaks bisect. Hmm... Maybe I can squash these two patches into one. Tiejun -- To unsubscribe

RE: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page()

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Paul Mackerras Sent: Tuesday, August 06, 2013 9:58 AM To: Alexander Graf; Benjamin Herrenschmidt Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: [PATCH 21/23] KVM: PPC:

Re: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page()

2013-08-06 Thread Paul Mackerras
On Wed, Aug 07, 2013 at 04:13:34AM +, Bhushan Bharat-R65777 wrote: + /* used to check for invalidations in progress */ + mmu_seq = kvm-mmu_notifier_seq; + smp_rmb(); Should not the smp_rmb() come before reading kvm-mmu_notifier_seq. No, it should come after, because it is

RE: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page()

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Paul Mackerras Sent: Tuesday, August 06, 2013 9:58 AM To: Alexander Graf; Benjamin Herrenschmidt Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: [PATCH 21/23] KVM: PPC:

RE: [PATCH 21/23] KVM: PPC: Book3S PR: Use mmu_notifier_retry() in kvmppc_mmu_map_page()

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: Paul Mackerras [mailto:pau...@samba.org] Sent: Wednesday, August 07, 2013 9:59 AM To: Bhushan Bharat-R65777 Cc: Alexander Graf; Benjamin Herrenschmidt; kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: Re: [PATCH 21/23] KVM: PPC: Book3S PR: Use