* [PATCH] KVM: PPC: Implement extension to report number of memslots
@ 2015-10-16 4:57 Nikunj A Dadhania
2015-10-16 6:41 ` Thomas Huth
0 siblings, 1 reply; 5+ messages in thread
From: Nikunj A Dadhania @ 2015-10-16 4:57 UTC (permalink / raw)
To: kvm-ppc, agraf; +Cc: kvm, paulus, Nikunj A Dadhania
QEMU assumes 32 memslots if this extension is not implemented. Although,
current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS
changes QEMU would take a wrong value.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
arch/powerpc/kvm/powerpc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 2e51289..6fd2405 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -559,6 +559,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
else
r = num_online_cpus();
break;
+ case KVM_CAP_NR_MEMSLOTS:
+ r = KVM_USER_MEM_SLOTS;
+ break;
case KVM_CAP_MAX_VCPUS:
r = KVM_MAX_VCPUS;
break;
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Implement extension to report number of memslots
2015-10-16 4:57 [PATCH] KVM: PPC: Implement extension to report number of memslots Nikunj A Dadhania
@ 2015-10-16 6:41 ` Thomas Huth
2015-10-26 5:15 ` Paul Mackerras
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2015-10-16 6:41 UTC (permalink / raw)
To: Nikunj A Dadhania, kvm-ppc, agraf; +Cc: kvm, paulus
On 16/10/15 06:57, Nikunj A Dadhania wrote:
> QEMU assumes 32 memslots if this extension is not implemented. Although,
> current value of KVM_USER_MEM_SLOTS is 32, once KVM_USER_MEM_SLOTS
> changes QEMU would take a wrong value.
>
> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
> ---
> arch/powerpc/kvm/powerpc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 2e51289..6fd2405 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -559,6 +559,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> else
> r = num_online_cpus();
> break;
> + case KVM_CAP_NR_MEMSLOTS:
> + r = KVM_USER_MEM_SLOTS;
> + break;
> case KVM_CAP_MAX_VCPUS:
> r = KVM_MAX_VCPUS;
> break;
Yes, we'll likely need this soon! 32 slots are not enough...
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Implement extension to report number of memslots
2015-10-16 6:41 ` Thomas Huth
@ 2015-10-26 5:15 ` Paul Mackerras
2015-10-26 23:47 ` Scott Wood
2015-10-27 13:22 ` Thomas Huth
0 siblings, 2 replies; 5+ messages in thread
From: Paul Mackerras @ 2015-10-26 5:15 UTC (permalink / raw)
To: kvm-ppc, kvm; +Cc: agraf, Scott Wood
On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote:
> Yes, we'll likely need this soon! 32 slots are not enough...
Would anyone object if I raised the limit for PPC to 512 slots?
Would that cause problems on embedded PPC, for instance?
Paul.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Implement extension to report number of memslots
2015-10-26 5:15 ` Paul Mackerras
@ 2015-10-26 23:47 ` Scott Wood
2015-10-27 13:22 ` Thomas Huth
1 sibling, 0 replies; 5+ messages in thread
From: Scott Wood @ 2015-10-26 23:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: kvm-ppc, kvm, agraf
On Mon, 2015-10-26 at 16:15 +1100, Paul Mackerras wrote:
> On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote:
> > Yes, we'll likely need this soon! 32 slots are not enough...
>
> Would anyone object if I raised the limit for PPC to 512 slots?
> Would that cause problems on embedded PPC, for instance?
I can't think of any reason why it would cause problems.
-Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Implement extension to report number of memslots
2015-10-26 5:15 ` Paul Mackerras
2015-10-26 23:47 ` Scott Wood
@ 2015-10-27 13:22 ` Thomas Huth
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2015-10-27 13:22 UTC (permalink / raw)
To: Paul Mackerras, kvm-ppc, kvm; +Cc: agraf, Scott Wood
On 26/10/15 06:15, Paul Mackerras wrote:
> On Fri, Oct 16, 2015 at 08:41:31AM +0200, Thomas Huth wrote:
>> Yes, we'll likely need this soon! 32 slots are not enough...
>
> Would anyone object if I raised the limit for PPC to 512 slots?
In the long run we should really make this somehow dynamically instead.
But as a first step, that should IMHO be fine. Question is whether we
immediately need 512 on PPC, too? QEMU for x86 features 256 pluggable
memory DIMM slots ("#define ACPI_MAX_RAM_SLOTS 256"), while PPC only has
32 ("#define SPAPR_MAX_RAM_SLOTS 32"). So maybe we are fine with less
memory slots on PPC, e.g. 300 or so?
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-27 13:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 4:57 [PATCH] KVM: PPC: Implement extension to report number of memslots Nikunj A Dadhania
2015-10-16 6:41 ` Thomas Huth
2015-10-26 5:15 ` Paul Mackerras
2015-10-26 23:47 ` Scott Wood
2015-10-27 13:22 ` Thomas Huth
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).