Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s_64.h | 146 ++- arch/powerpc/kvm/book3s_hv.c | 7 ++ 2 files changed, 130 insertions(+), 23

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Benjamin Herrenschmidt
On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: So if I understand this patch correctly, it simply introduces logic to handle page sizes other than 4k, 64k, 16M by analyzing the actual page size field in the HPTE. Mind to explain why exactly that enables us to use THP? What

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: So if I understand this patch correctly, it simply introduces logic to handle page sizes other than 4k, 64k, 16M by analyzing the actual page size field in the HPTE. Mind to explain

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com static inline unsigned long hpte_page_size(unsigned long h, unsigned long l) { +int size, a_size; +/* Look at the 8

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Paul Mackerras pau...@samba.org writes: On Mon, May 05, 2014 at 08:17:00PM +0530, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com No patch description, no

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: . I updated the commit message as below. Let me know if this is ok. KVM: PPC: BOOK3S: HV: THP support for guest On recent IBM

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: . I updated the commit message as below. Let me know if this is ok. KVM: PPC:

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: . I updated the commit message as below. Let me

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/06/2014 06:08 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: .

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Benjamin Herrenschmidt
On Tue, 2014-05-06 at 21:38 +0530, Aneesh Kumar K.V wrote: I updated the commit message as below. Let me know if this is ok. KVM: PPC: BOOK3S: HV: THP support for guest This has nothing to do with THP. THP support in guest depend on KVM advertising MPSS feature. We already have

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s_64.h | 146 ++- arch/powerpc/kvm/book3s_hv.c | 7 ++ 2 files changed, 130 insertions(+), 23

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Benjamin Herrenschmidt
On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: So if I understand this patch correctly, it simply introduces logic to handle page sizes other than 4k, 64k, 16M by analyzing the actual page size field in the HPTE. Mind to explain why exactly that enables us to use THP? What

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com static inline unsigned long hpte_page_size(unsigned long h, unsigned long l) { +int size, a_size; +/* Look at the 8

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: . I updated the commit message as below. Let me know if this is ok. KVM: PPC: BOOK3S: HV: THP support for guest On recent IBM

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: . I updated the commit message as below. Let me know if this is ok. KVM: PPC:

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Alexander Graf
On 05/06/2014 06:08 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 05:06 PM, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/06/2014 11:26 AM, Benjamin Herrenschmidt wrote: On Tue, 2014-05-06 at 11:12 +0200, Alexander Graf wrote: .

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-06 Thread Benjamin Herrenschmidt
On Tue, 2014-05-06 at 21:38 +0530, Aneesh Kumar K.V wrote: I updated the commit message as below. Let me know if this is ok. KVM: PPC: BOOK3S: HV: THP support for guest This has nothing to do with THP. THP support in guest depend on KVM advertising MPSS feature. We already have

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-05 Thread Alexander Graf
On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com No patch description, no proper explanations anywhere why you're doing what. All of that in a pretty sensitive piece of code. There's no way this patch can go upstream in its

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-05 Thread Aneesh Kumar K.V
Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com No patch description, no proper explanations anywhere why you're doing what. All of that in a pretty sensitive piece of code. There's no way

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-05 Thread Paul Mackerras
On Mon, May 05, 2014 at 08:17:00PM +0530, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com No patch description, no proper explanations anywhere why you're doing

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-05 Thread Paul Mackerras
On Mon, May 05, 2014 at 08:17:00PM +0530, Aneesh Kumar K.V wrote: Alexander Graf ag...@suse.de writes: On 05/04/2014 07:30 PM, Aneesh Kumar K.V wrote: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com No patch description, no proper explanations anywhere why you're doing

[RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-04 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s_64.h | 146 ++- arch/powerpc/kvm/book3s_hv.c | 7 ++ 2 files changed, 130 insertions(+), 23 deletions(-) diff --git

Re: [RFC PATCH] KVM: PPC: BOOK3S: HV: THP support for guest

2014-05-04 Thread Aneesh Kumar K.V
Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_book3s_64.h | 146 ++- arch/powerpc/kvm/book3s_hv.c | 7 ++ 2 files changed, 130