All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29  8:02 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 15+ messages in thread
From: Aneesh Kumar K.V @ 2014-09-29  8:02 UTC (permalink / raw)
  To: agraf, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm, Aneesh Kumar K.V

We use cma reserved area for creating guest hash page table.
Don't do the reservation in non-hypervisor mode. This avoids unnecessary
CMA reservation when booting with limited memory configs like
fadump and kdump.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv_builtin.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index b9615ba5b083..4fdc27c80f4c 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -163,6 +163,12 @@ void __init kvm_cma_reserve(void)
 	unsigned long align_size;
 	struct memblock_region *reg;
 	phys_addr_t selected_size = 0;
+
+	/*
+	 * We need CMA reservation only when we are in HV mode
+	 */
+	if (!cpu_has_feature(CPU_FTR_HVMODE))
+		return;
 	/*
 	 * We cannot use memblock_phys_mem_size() here, because
 	 * memblock_analyze() has not been called yet.
-- 
1.9.1

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

* [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29  8:02 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 15+ messages in thread
From: Aneesh Kumar K.V @ 2014-09-29  8:02 UTC (permalink / raw)
  To: agraf, benh, paulus; +Cc: linuxppc-dev, kvm, kvm-ppc, Aneesh Kumar K.V

We use cma reserved area for creating guest hash page table.
Don't do the reservation in non-hypervisor mode. This avoids unnecessary
CMA reservation when booting with limited memory configs like
fadump and kdump.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv_builtin.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index b9615ba5b083..4fdc27c80f4c 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -163,6 +163,12 @@ void __init kvm_cma_reserve(void)
 	unsigned long align_size;
 	struct memblock_region *reg;
 	phys_addr_t selected_size = 0;
+
+	/*
+	 * We need CMA reservation only when we are in HV mode
+	 */
+	if (!cpu_has_feature(CPU_FTR_HVMODE))
+		return;
 	/*
 	 * We cannot use memblock_phys_mem_size() here, because
 	 * memblock_analyze() has not been called yet.
-- 
1.9.1

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

* [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29  8:02 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 15+ messages in thread
From: Aneesh Kumar K.V @ 2014-09-29  8:14 UTC (permalink / raw)
  To: agraf, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm, Aneesh Kumar K.V

We use cma reserved area for creating guest hash page table.
Don't do the reservation in non-hypervisor mode. This avoids unnecessary
CMA reservation when booting with limited memory configs like
fadump and kdump.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv_builtin.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c
index b9615ba5b083..4fdc27c80f4c 100644
--- a/arch/powerpc/kvm/book3s_hv_builtin.c
+++ b/arch/powerpc/kvm/book3s_hv_builtin.c
@@ -163,6 +163,12 @@ void __init kvm_cma_reserve(void)
 	unsigned long align_size;
 	struct memblock_region *reg;
 	phys_addr_t selected_size = 0;
+
+	/*
+	 * We need CMA reservation only when we are in HV mode
+	 */
+	if (!cpu_has_feature(CPU_FTR_HVMODE))
+		return;
 	/*
 	 * We cannot use memblock_phys_mem_size() here, because
 	 * memblock_analyze() has not been called yet.
-- 
1.9.1


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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
  2014-09-29  8:02 ` Aneesh Kumar K.V
  (?)
@ 2014-09-29  8:28   ` Alexander Graf
  -1 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29  8:28 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm



On 29.09.14 10:02, Aneesh Kumar K.V wrote:
> We use cma reserved area for creating guest hash page table.
> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
> CMA reservation when booting with limited memory configs like
> fadump and kdump.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Thanks, applied to kvm-ppc-queue.


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29  8:28   ` Alexander Graf
  0 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29  8:28 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm, kvm-ppc



On 29.09.14 10:02, Aneesh Kumar K.V wrote:
> We use cma reserved area for creating guest hash page table.
> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
> CMA reservation when booting with limited memory configs like
> fadump and kdump.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Thanks, applied to kvm-ppc-queue.


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29  8:28   ` Alexander Graf
  0 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29  8:28 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm



On 29.09.14 10:02, Aneesh Kumar K.V wrote:
> We use cma reserved area for creating guest hash page table.
> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
> CMA reservation when booting with limited memory configs like
> fadump and kdump.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Thanks, applied to kvm-ppc-queue.


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
  2014-09-29  8:28   ` Alexander Graf
  (?)
@ 2014-09-29 11:48     ` Paolo Bonzini
  -1 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 11:48 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm

Il 29/09/2014 10:28, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>> We use cma reserved area for creating guest hash page table.
>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>> CMA reservation when booting with limited memory configs like
>> fadump and kdump.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> 
> Thanks, applied to kvm-ppc-queue.

Would you like this in 3.18?

Paolo

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 11:48     ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 11:48 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm, kvm-ppc

Il 29/09/2014 10:28, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>> We use cma reserved area for creating guest hash page table.
>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>> CMA reservation when booting with limited memory configs like
>> fadump and kdump.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> 
> Thanks, applied to kvm-ppc-queue.

Would you like this in 3.18?

Paolo

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 11:48     ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 11:48 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm

Il 29/09/2014 10:28, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>> We use cma reserved area for creating guest hash page table.
>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>> CMA reservation when booting with limited memory configs like
>> fadump and kdump.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> 
> Thanks, applied to kvm-ppc-queue.

Would you like this in 3.18?

Paolo


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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
  2014-09-29 11:48     ` Paolo Bonzini
  (?)
@ 2014-09-29 11:57       ` Alexander Graf
  -1 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29 11:57 UTC (permalink / raw)
  To: Paolo Bonzini, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm



On 29.09.14 13:48, Paolo Bonzini wrote:
> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>
>>
>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>> We use cma reserved area for creating guest hash page table.
>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>> CMA reservation when booting with limited memory configs like
>>> fadump and kdump.
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>
>> Thanks, applied to kvm-ppc-queue.
> 
> Would you like this in 3.18?

Yes, can you please directly apply it with my SoB (or Reviewed-by if you
prefer)?


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 11:57       ` Alexander Graf
  0 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29 11:57 UTC (permalink / raw)
  To: Paolo Bonzini, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm, kvm-ppc



On 29.09.14 13:48, Paolo Bonzini wrote:
> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>
>>
>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>> We use cma reserved area for creating guest hash page table.
>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>> CMA reservation when booting with limited memory configs like
>>> fadump and kdump.
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>
>> Thanks, applied to kvm-ppc-queue.
> 
> Would you like this in 3.18?

Yes, can you please directly apply it with my SoB (or Reviewed-by if you
prefer)?


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 11:57       ` Alexander Graf
  0 siblings, 0 replies; 15+ messages in thread
From: Alexander Graf @ 2014-09-29 11:57 UTC (permalink / raw)
  To: Paolo Bonzini, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm



On 29.09.14 13:48, Paolo Bonzini wrote:
> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>
>>
>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>> We use cma reserved area for creating guest hash page table.
>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>> CMA reservation when booting with limited memory configs like
>>> fadump and kdump.
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>
>> Thanks, applied to kvm-ppc-queue.
> 
> Would you like this in 3.18?

Yes, can you please directly apply it with my SoB (or Reviewed-by if you
prefer)?


Alex

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
  2014-09-29 11:57       ` Alexander Graf
  (?)
@ 2014-09-29 12:22         ` Paolo Bonzini
  -1 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 12:22 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm

Il 29/09/2014 13:57, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 13:48, Paolo Bonzini wrote:
>> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>>
>>>
>>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>>> We use cma reserved area for creating guest hash page table.
>>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>>> CMA reservation when booting with limited memory configs like
>>>> fadump and kdump.
>>>>
>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> Thanks, applied to kvm-ppc-queue.
>>
>> Would you like this in 3.18?
> 
> Yes, can you please directly apply it with my SoB (or Reviewed-by if you
> prefer)?

Ok, will do.

Paolo

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 12:22         ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 12:22 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm, kvm-ppc

Il 29/09/2014 13:57, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 13:48, Paolo Bonzini wrote:
>> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>>
>>>
>>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>>> We use cma reserved area for creating guest hash page table.
>>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>>> CMA reservation when booting with limited memory configs like
>>>> fadump and kdump.
>>>>
>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> Thanks, applied to kvm-ppc-queue.
>>
>> Would you like this in 3.18?
> 
> Yes, can you please directly apply it with my SoB (or Reviewed-by if you
> prefer)?

Ok, will do.

Paolo

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

* Re: [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode
@ 2014-09-29 12:22         ` Paolo Bonzini
  0 siblings, 0 replies; 15+ messages in thread
From: Paolo Bonzini @ 2014-09-29 12:22 UTC (permalink / raw)
  To: Alexander Graf, Aneesh Kumar K.V, benh, paulus; +Cc: linuxppc-dev, kvm-ppc, kvm

Il 29/09/2014 13:57, Alexander Graf ha scritto:
> 
> 
> On 29.09.14 13:48, Paolo Bonzini wrote:
>> Il 29/09/2014 10:28, Alexander Graf ha scritto:
>>>
>>>
>>> On 29.09.14 10:02, Aneesh Kumar K.V wrote:
>>>> We use cma reserved area for creating guest hash page table.
>>>> Don't do the reservation in non-hypervisor mode. This avoids unnecessary
>>>> CMA reservation when booting with limited memory configs like
>>>> fadump and kdump.
>>>>
>>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> Thanks, applied to kvm-ppc-queue.
>>
>> Would you like this in 3.18?
> 
> Yes, can you please directly apply it with my SoB (or Reviewed-by if you
> prefer)?

Ok, will do.

Paolo


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

end of thread, other threads:[~2014-09-29 12:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29  8:02 [PATCH] KVM: PPC: BOOK3S: HV: CMA: Reserve cma region only in hypervisor mode Aneesh Kumar K.V
2014-09-29  8:14 ` Aneesh Kumar K.V
2014-09-29  8:02 ` Aneesh Kumar K.V
2014-09-29  8:28 ` Alexander Graf
2014-09-29  8:28   ` Alexander Graf
2014-09-29  8:28   ` Alexander Graf
2014-09-29 11:48   ` Paolo Bonzini
2014-09-29 11:48     ` Paolo Bonzini
2014-09-29 11:48     ` Paolo Bonzini
2014-09-29 11:57     ` Alexander Graf
2014-09-29 11:57       ` Alexander Graf
2014-09-29 11:57       ` Alexander Graf
2014-09-29 12:22       ` Paolo Bonzini
2014-09-29 12:22         ` Paolo Bonzini
2014-09-29 12:22         ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.