diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/machine.c | 5 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index 0d92672203..ada9eea483 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -396,6 +396,11 @@ static void machine_class_init(ObjectClass *oc, void *data) mc->default_ram_size = 128 * M_BYTE; mc->rom_file_has_mr = true; + /* numa node memory size aligned on 8MB by default. + * On Linux, each node's border has to be 8MB aligned + */ + mc->numa_mem_align_shift = 23; + object_class_property_add_str(oc, "accel", machine_get_accel, machine_set_accel, &error_abort); object_class_property_set_description(oc, "accel", diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6ee566d658..8aecea3dd1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3096,6 +3096,11 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) xic->ics_resend = spapr_ics_resend; xic->icp_get = spapr_icp_get; ispc->print_info = spapr_pic_print_info; + /* Force NUMA node memory size to be a multiple of + * SPAPR_MEMORY_BLOCK_SIZE (256M) since that's the granularity + * in which LMBs are represented and hot-added + */ + mc->numa_mem_align_shift = 28; } static const TypeInfo spapr_machine_info = { @@ -3180,6 +3185,7 @@ static void spapr_machine_2_8_class_options(MachineClass *mc) { spapr_machine_2_9_class_options(mc); SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_8); + mc->numa_mem_align_shift = 23; } DEFINE_SPAPR_MACHINE(2_8, "2.8", false); |