Blame SOURCES/kvm-spapr-Add-ibm-max-associativity-domains-property.patch

357786
From 5a7d9ce549b777d52cd680327e4dc17921ab882c Mon Sep 17 00:00:00 2001
357786
From: Serhii Popovych <spopovyc@redhat.com>
357786
Date: Wed, 2 May 2018 18:52:27 +0200
357786
Subject: [PATCH 04/13] spapr: Add ibm, max-associativity-domains property
357786
357786
RH-Author: Serhii Popovych <spopovyc@redhat.com>
357786
Message-id: <1525287148-92715-2-git-send-email-spopovyc@redhat.com>
357786
Patchwork-id: 80013
357786
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/2] spapr: Add ibm, max-associativity-domains property
357786
Bugzilla: 1570525
357786
RH-Acked-by: David Gibson <dgibson@redhat.com>
357786
RH-Acked-by: Thomas Huth <thuth@redhat.com>
357786
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
357786
357786
Now recent kernels (i.e. since linux-stable commit a346137e9142
357786
("powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes")
357786
support this property to mark initially memory-less NUMA nodes as "possible"
357786
to allow further memory hot-add to them.
357786
357786
Advertise this property for pSeries machines to let guest kernels detect
357786
maximum supported node configuration and benefit from kernel side change
357786
when hot-add memory to specific, possibly empty before, NUMA node.
357786
357786
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
357786
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
357786
(cherry picked from commit da9f80fbad21319194e73355dea8a1cff6a574e4)
357786
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 hw/ppc/spapr.c | 10 ++++++++++
357786
 1 file changed, 10 insertions(+)
357786
357786
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
357786
index 360a258..c9561e1 100644
357786
--- a/hw/ppc/spapr.c
357786
+++ b/hw/ppc/spapr.c
357786
@@ -910,6 +910,13 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)
357786
         0, cpu_to_be32(SPAPR_MEMORY_BLOCK_SIZE),
357786
         cpu_to_be32(max_cpus / smp_threads),
357786
     };
357786
+    uint32_t maxdomains[] = {
357786
+        cpu_to_be32(4),
357786
+        cpu_to_be32(0),
357786
+        cpu_to_be32(0),
357786
+        cpu_to_be32(0),
357786
+        cpu_to_be32(nb_numa_nodes ? nb_numa_nodes - 1 : 0),
357786
+    };
357786
 
357786
     _FDT(rtas = fdt_add_subnode(fdt, 0, "rtas"));
357786
 
357786
@@ -946,6 +953,9 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)
357786
     _FDT(fdt_setprop(fdt, rtas, "ibm,associativity-reference-points",
357786
                      refpoints, sizeof(refpoints)));
357786
 
357786
+    _FDT(fdt_setprop(fdt, rtas, "ibm,max-associativity-domains",
357786
+                     maxdomains, sizeof(maxdomains)));
357786
+
357786
     _FDT(fdt_setprop_cell(fdt, rtas, "rtas-error-log-max",
357786
                           RTAS_ERROR_LOG_MAX));
357786
     _FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate",
357786
-- 
357786
1.8.3.1
357786