ppc patch queue for 2017-03-23
Just a single bugfix in this batch. It's not strictly in ppc code, though it's for the pseries machine's benefit. Eduardo suggested it go through my tree however. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJY057NAAoJEGw4ysog2bOSllYP/1OCzuR3f8vFuAB18i2a+kzC Bw4zD9j/3BlbJ36G6NQg53LXaFsK0w9qjIXSi3Xni+UCvat5ktXYrhgKb4nGOwaq bYmB+GDm1573MxxeSBPE5nfuM3Zg4gG9osWryZCEJr3eDMxezdIWFaaZEWDEkywz N5F1e1KX7NTObGuugoH/XRoUatWVYAzUqnlIVDhSta2hUKnYQJFRtU1YZqBKME/W USRxTq57zEl3TcV0gi+eWqfnTTlcCR4+Xp2FYDg/pOReDQaO8dhPZxueiZCi4wlL aqH8nmUuaiPOP5JAS2I7ds978PTe6HwsIn7cIpsEnRsafYZoFHzL1wlGZWMlGf/1 ReNe25opOD1FC/hfDIYFkeCcW6g2Jm75BJGqBX8VDAlkyR7V/8Iqnu1/v24X8J1l nNNrBeQrRXx5tPORARazS8mA9LYZpY5MOh2zQ9GuXxM9aqg//KrkM+i0GFLhIIsv /P5lcpt4m+bA2sve9PU4uFdkST7dYyEdPqFoHEVx2Y5V4+XUjPSyvkCjrM8ljhtI ELpRxynW4s9B3SX1HeFbY1LM66emSmBtk+3gAce1wBAGxIE9TZCPfXpcfOxGIrAx /xnwbARx+7BRPgVHSz3YAYSsvejISoBeFutnv2OhwyUJBbGoWkdaSgGbiUKX1K+Z /orW1eJ11ASuwfe+atza =jFKm -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170323' into staging ppc patch queue for 2017-03-23 Just a single bugfix in this batch. It's not strictly in ppc code, though it's for the pseries machine's benefit. Eduardo suggested it go through my tree however. # gpg: Signature made Thu 23 Mar 2017 10:09:17 GMT # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.9-20170323: numa,spapr: align default numa node memory size to 256MB Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
032e95af53
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -135,6 +135,7 @@ struct MachineClass {
|
||||
bool rom_file_has_mr;
|
||||
int minimum_page_bits;
|
||||
bool has_hotpluggable_cpus;
|
||||
int numa_mem_align_shift;
|
||||
|
||||
HotplugHandler *(*get_hotplug_handler)(MachineState *machine,
|
||||
DeviceState *dev);
|
||||
|
6
numa.c
6
numa.c
@ -338,12 +338,12 @@ void parse_numa_opts(MachineClass *mc)
|
||||
if (i == nb_numa_nodes) {
|
||||
uint64_t usedmem = 0;
|
||||
|
||||
/* On Linux, each node's border has to be 8MB aligned,
|
||||
* the final node gets the rest.
|
||||
/* Align each node according to the alignment
|
||||
* requirements of the machine class
|
||||
*/
|
||||
for (i = 0; i < nb_numa_nodes - 1; i++) {
|
||||
numa_info[i].node_mem = (ram_size / nb_numa_nodes) &
|
||||
~((1 << 23UL) - 1);
|
||||
~((1 << mc->numa_mem_align_shift) - 1);
|
||||
usedmem += numa_info[i].node_mem;
|
||||
}
|
||||
numa_info[i].node_mem = ram_size - usedmem;
|
||||
|
Loading…
Reference in New Issue
Block a user