linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file
@ 2008-12-19  2:34 Liu Yu
  2009-01-04  6:57 ` Liu Yu
  2009-01-07 15:09 ` [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Kumar Gala
  0 siblings, 2 replies; 6+ messages in thread
From: Liu Yu @ 2008-12-19  2:34 UTC (permalink / raw)
  To: kvm-ppc, linuxppc-dev; +Cc: scottwood, kumar.gala, Liu Yu, tpiepho, hollisb

KVM on E500 platform currently utilize TLB1 entries without bothering host,
that is using unused TLB1 entries.

So, KVM needs to read tlbcam_index to know exactly
which TLB1 entry is unused by host.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
[v2]
Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG in KVM instead.

 arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h b/arch/powerpc/include/asm/mmu-fsl-booke.h
index 925d93c..c86af6c 100644
--- a/arch/powerpc/include/asm/mmu-fsl-booke.h
+++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
@@ -73,6 +73,8 @@
 
 #ifndef __ASSEMBLY__
 
+extern unsigned int tlbcam_index;
+
 typedef struct {
 	unsigned long id;
 	unsigned long vdso_base;
-- 
1.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file
  2008-12-19  2:34 [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Liu Yu
@ 2009-01-04  6:57 ` Liu Yu
  2009-01-05 16:26   ` Kumar Gala
  2009-01-07 15:09 ` [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Kumar Gala
  1 sibling, 1 reply; 6+ messages in thread
From: Liu Yu @ 2009-01-04  6:57 UTC (permalink / raw)
  To: Liu Yu-B13201, kvm-ppc, linuxppc-dev
  Cc: Wood Scott-B07421, Gala Kumar-B11780, Piepho Trent-B16872,
	hollisb

Hi Kumar,

Can I get your ack?
So that I can submit this patch through KVM tree.


> -----Original Message-----
> From: Liu Yu-B13201=20
> Sent: Friday, December 19, 2008 10:35 AM
> To: kvm-ppc@vger.kernel.org; linuxppc-dev@ozlabs.org
> Cc: hollisb@us.ibm.com; Gala Kumar-B11780; Piepho=20
> Trent-B16872; Wood Scott-B07421; Liu Yu-B13201
> Subject: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index=20
> for use in c file
>=20
> KVM on E500 platform currently utilize TLB1 entries without=20
> bothering host,
> that is using unused TLB1 entries.
>=20
> So, KVM needs to read tlbcam_index to know exactly
> which TLB1 entry is unused by host.
>=20
> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> ---
> [v2]
> Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG=20
> in KVM instead.
>=20
>  arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>=20
> diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h=20
> b/arch/powerpc/include/asm/mmu-fsl-booke.h
> index 925d93c..c86af6c 100644
> --- a/arch/powerpc/include/asm/mmu-fsl-booke.h
> +++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
> @@ -73,6 +73,8 @@
> =20
>  #ifndef __ASSEMBLY__
> =20
> +extern unsigned int tlbcam_index;
> +
>  typedef struct {
>  	unsigned long id;
>  	unsigned long vdso_base;
> --=20
> 1.5.4
>=20
>=20

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file
  2009-01-04  6:57 ` Liu Yu
@ 2009-01-05 16:26   ` Kumar Gala
  2009-01-05 16:52     ` Hollis Blanchard
  0 siblings, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2009-01-05 16:26 UTC (permalink / raw)
  To: Liu Yu
  Cc: Wood Scott-B07421, linuxppc-dev, hollisb, kvm-ppc,
	Piepho Trent-B16872

I'll pick this up, but wondering about this patch vs Trent's changes  
to remove this.

How is KVM on fsl-booke using this value?

- k

On Jan 4, 2009, at 12:57 AM, Liu Yu wrote:

> Hi Kumar,
>
> Can I get your ack?
> So that I can submit this patch through KVM tree.
>
>
>> -----Original Message-----
>> From: Liu Yu-B13201
>> Sent: Friday, December 19, 2008 10:35 AM
>> To: kvm-ppc@vger.kernel.org; linuxppc-dev@ozlabs.org
>> Cc: hollisb@us.ibm.com; Gala Kumar-B11780; Piepho
>> Trent-B16872; Wood Scott-B07421; Liu Yu-B13201
>> Subject: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index
>> for use in c file
>>
>> KVM on E500 platform currently utilize TLB1 entries without
>> bothering host,
>> that is using unused TLB1 entries.
>>
>> So, KVM needs to read tlbcam_index to know exactly
>> which TLB1 entry is unused by host.
>>
>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>> ---
>> [v2]
>> Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG
>> in KVM instead.
>>
>> arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h
>> b/arch/powerpc/include/asm/mmu-fsl-booke.h
>> index 925d93c..c86af6c 100644
>> --- a/arch/powerpc/include/asm/mmu-fsl-booke.h
>> +++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
>> @@ -73,6 +73,8 @@
>>
>> #ifndef __ASSEMBLY__
>>
>> +extern unsigned int tlbcam_index;
>> +
>> typedef struct {
>> 	unsigned long id;
>> 	unsigned long vdso_base;
>> -- 
>> 1.5.4
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file
  2009-01-05 16:26   ` Kumar Gala
@ 2009-01-05 16:52     ` Hollis Blanchard
  2009-01-06  4:55       ` [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use inc file Liu Yu
  0 siblings, 1 reply; 6+ messages in thread
From: Hollis Blanchard @ 2009-01-05 16:52 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Wood Scott-B07421, linuxppc-dev, Liu Yu, Piepho Trent-B16872,
	kvm-ppc

On Mon, 2009-01-05 at 10:26 -0600, Kumar Gala wrote:
> I'll pick this up, but wondering about this patch vs Trent's changes  
> to remove this.

Please do not pick up this patch; if you ack it, let us push it through
kvm.git. Otherwise we need to wait for it to travel from kumar.git ->
benh.git -> linus.git -> kvm.git before KVM will build.

If you're referring to http://patchwork.ozlabs.org/patch/12882/, that
patch removes a different variable (num_tlbcam_entries). tlbcam_index,
referenced below, still exists.

> How is KVM on fsl-booke using this value?

I'll let Yu answer that in more detail, but in
http://git.kernel.org/?p=linux/kernel/git/avi/kvm.git;a=blob_plain;f=arch/powerpc/kvm/e500_tlb.c;hb=HEAD it looks like he's storing guest TLB1 mappings in the real TLB1, alongside the host TLB1 mappings. Accordingly, he needs to know where the host mappings are to avoid clobbering them.

> On Jan 4, 2009, at 12:57 AM, Liu Yu wrote:
> 
> > Hi Kumar,
> >
> > Can I get your ack?
> > So that I can submit this patch through KVM tree.
> >
> >
> >> -----Original Message-----
> >> From: Liu Yu-B13201
> >> Sent: Friday, December 19, 2008 10:35 AM
> >> To: kvm-ppc@vger.kernel.org; linuxppc-dev@ozlabs.org
> >> Cc: hollisb@us.ibm.com; Gala Kumar-B11780; Piepho
> >> Trent-B16872; Wood Scott-B07421; Liu Yu-B13201
> >> Subject: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index
> >> for use in c file
> >>
> >> KVM on E500 platform currently utilize TLB1 entries without
> >> bothering host,
> >> that is using unused TLB1 entries.
> >>
> >> So, KVM needs to read tlbcam_index to know exactly
> >> which TLB1 entry is unused by host.
> >>
> >> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> >> ---
> >> [v2]
> >> Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG
> >> in KVM instead.
> >>
> >> arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
> >> 1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h
> >> b/arch/powerpc/include/asm/mmu-fsl-booke.h
> >> index 925d93c..c86af6c 100644
> >> --- a/arch/powerpc/include/asm/mmu-fsl-booke.h
> >> +++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
> >> @@ -73,6 +73,8 @@
> >>
> >> #ifndef __ASSEMBLY__
> >>
> >> +extern unsigned int tlbcam_index;
> >> +
> >> typedef struct {
> >> 	unsigned long id;
> >> 	unsigned long vdso_base;
> >> -- 
> >> 1.5.4
> >>
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-- 
Hollis Blanchard
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use inc file
  2009-01-05 16:52     ` Hollis Blanchard
@ 2009-01-06  4:55       ` Liu Yu
  0 siblings, 0 replies; 6+ messages in thread
From: Liu Yu @ 2009-01-06  4:55 UTC (permalink / raw)
  To: Hollis Blanchard, Gala Kumar-B11780
  Cc: Wood Scott-B07421, linuxppc-dev, Piepho Trent-B16872, kvm-ppc


> -----Original Message-----
> From: kvm-ppc-owner@vger.kernel.org=20
> [mailto:kvm-ppc-owner@vger.kernel.org] On Behalf Of Hollis Blanchard
> Sent: Tuesday, January 06, 2009 12:52 AM
> To: Gala Kumar-B11780
> Cc: Liu Yu-B13201; kvm-ppc@vger.kernel.org;=20
> linuxppc-dev@ozlabs.org; Piepho Trent-B16872; Wood Scott-B07421
> Subject: Re: [PATCH v2] powerpc/fsl-booke: declare=20
> tlbcam_index for use inc file
>=20
> On Mon, 2009-01-05 at 10:26 -0600, Kumar Gala wrote:
> > I'll pick this up, but wondering about this patch vs=20
> Trent's changes =20
> > to remove this.
>=20
> Please do not pick up this patch; if you ack it, let us push=20
> it through
> kvm.git. Otherwise we need to wait for it to travel from kumar.git ->
> benh.git -> linus.git -> kvm.git before KVM will build.
>=20
> If you're referring to http://patchwork.ozlabs.org/patch/12882/, that
> patch removes a different variable (num_tlbcam_entries). tlbcam_index,
> referenced below, still exists.

Since v2 has removed the num_tlbcam_entries declare, this patch has no
conflict with Trent's changes.

>=20
> > How is KVM on fsl-booke using this value?
>=20
> I'll let Yu answer that in more detail, but in
> http://git.kernel.org/?p=3Dlinux/kernel/git/avi/kvm.git;a=3Dblob_p
lain;f=3Darch/powerpc/kvm/e500_tlb.c;hb=3DHEAD it looks like he's =
storing >
guest TLB1 mappings in the real TLB1, alongside the host TLB1=20
> mappings. Accordingly, he needs to know where the host=20
> mappings are to avoid clobbering them.

Yes, just like Hollis described.
KVM only read tlbcam_index to know which entries are used by host.
And kvm assumes the value is fixed and will never change it.

>=20
> > On Jan 4, 2009, at 12:57 AM, Liu Yu wrote:
> >=20
> > > Hi Kumar,
> > >
> > > Can I get your ack?
> > > So that I can submit this patch through KVM tree.
> > >
> > >
> > >> -----Original Message-----
> > >> From: Liu Yu-B13201
> > >> Sent: Friday, December 19, 2008 10:35 AM
> > >> To: kvm-ppc@vger.kernel.org; linuxppc-dev@ozlabs.org
> > >> Cc: hollisb@us.ibm.com; Gala Kumar-B11780; Piepho
> > >> Trent-B16872; Wood Scott-B07421; Liu Yu-B13201
> > >> Subject: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index
> > >> for use in c file
> > >>
> > >> KVM on E500 platform currently utilize TLB1 entries without
> > >> bothering host,
> > >> that is using unused TLB1 entries.
> > >>
> > >> So, KVM needs to read tlbcam_index to know exactly
> > >> which TLB1 entry is unused by host.
> > >>
> > >> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> > >> ---
> > >> [v2]
> > >> Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG
> > >> in KVM instead.
> > >>
> > >> arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
> > >> 1 files changed, 2 insertions(+), 0 deletions(-)
> > >>
> > >> diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h
> > >> b/arch/powerpc/include/asm/mmu-fsl-booke.h
> > >> index 925d93c..c86af6c 100644
> > >> --- a/arch/powerpc/include/asm/mmu-fsl-booke.h
> > >> +++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
> > >> @@ -73,6 +73,8 @@
> > >>
> > >> #ifndef __ASSEMBLY__
> > >>
> > >> +extern unsigned int tlbcam_index;
> > >> +
> > >> typedef struct {
> > >> 	unsigned long id;
> > >> 	unsigned long vdso_base;
> > >> --=20
> > >> 1.5.4
> > >>
> > >>
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe=20
> kvm-ppc" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >=20
> --=20
> Hollis Blanchard
> IBM Linux Technology Center
>=20
> --
> To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>=20

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file
  2008-12-19  2:34 [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Liu Yu
  2009-01-04  6:57 ` Liu Yu
@ 2009-01-07 15:09 ` Kumar Gala
  1 sibling, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2009-01-07 15:09 UTC (permalink / raw)
  To: Liu Yu, Hollis Blanchard
  Cc: Scott Wood, linuxppc-dev list, Trent Piepho, kvm-ppc


On Dec 18, 2008, at 8:34 PM, Liu Yu wrote:

> KVM on E500 platform currently utilize TLB1 entries without  
> bothering host,
> that is using unused TLB1 entries.
>
> So, KVM needs to read tlbcam_index to know exactly
> which TLB1 entry is unused by host.
>
> Signed-off-by: Liu Yu <yu.liu@freescale.com>
> ---
> [v2]
> Remove num_tlbcam_entries declare and read from SPRN_TLB1CFG in KVM  
> instead.
>
> arch/powerpc/include/asm/mmu-fsl-booke.h |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/mmu-fsl-booke.h b/arch/powerpc/ 
> include/asm/mmu-fsl-booke.h
> index 925d93c..c86af6c 100644
> --- a/arch/powerpc/include/asm/mmu-fsl-booke.h
> +++ b/arch/powerpc/include/asm/mmu-fsl-booke.h
> @@ -73,6 +73,8 @@
>
> #ifndef __ASSEMBLY__
>
> +extern unsigned int tlbcam_index;
> +
> typedef struct {
> 	unsigned long id;
> 	unsigned long vdso_base;
> -- 
> 1.5.4

Acked-by: Kumar Gala <galak@kernel.crashing.org>

(Hollis will you deal with sending this via the KVM tree?)

- k

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-07 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19  2:34 [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Liu Yu
2009-01-04  6:57 ` Liu Yu
2009-01-05 16:26   ` Kumar Gala
2009-01-05 16:52     ` Hollis Blanchard
2009-01-06  4:55       ` [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use inc file Liu Yu
2009-01-07 15:09 ` [PATCH v2] powerpc/fsl-booke: declare tlbcam_index for use in c file Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).