[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC PATCH v0 2/2] spapr: Increase max memslots to 512
From: |
Bharata B Rao |
Subject: |
[Qemu-ppc] [RFC PATCH v0 2/2] spapr: Increase max memslots to 512 |
Date: |
Wed, 1 Jun 2016 15:21:25 +0530 |
KVM now supports 512 memslots on PowerPC (earlier it was 32). Hence allow
user to specify a max of 512 hotpluggable memory slots.
Instead of hard coding the max value, use the KVM supplied value if KVM
is enabled. Otherwise resort to the default value of 32.
Signed-off-by: Bharata B Rao <address@hidden>
---
hw/ppc/spapr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 44e401a..3de426e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1816,11 +1816,13 @@ static void ppc_spapr_init(MachineState *machine)
/* initialize hotplug memory address space */
if (machine->ram_size < machine->maxram_size) {
ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size;
+ int max_memslots = kvm_enabled() ? kvm_get_max_memslots() :
+ SPAPR_MAX_RAM_SLOTS;
- if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) {
+ if (machine->ram_slots > max_memslots) {
error_report("Specified number of memory slots %"
PRIu64" exceeds max supported %d",
- machine->ram_slots, SPAPR_MAX_RAM_SLOTS);
+ machine->ram_slots, max_memslots);
exit(1);
}
--
2.1.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-ppc] [RFC PATCH v0 2/2] spapr: Increase max memslots to 512,
Bharata B Rao <=