spapr: Correct max associativity domains value for non-NUMA configs
PATCH 1/1 spapr: Correct max associativity domains value for non-NUMA configs
In non-NUMA configurations nb_numa_nodes is zero and we set 5th cell in ibm,max-associativity-domains to -1. That causes to stall Linux guests during boot after following line:
[ 0.000000] NUMA associativity depth for CPU/Memory: 4
Make last possible NUMA in property zero to correct support for non-NUMA guests.
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -914,7 +914,7 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)cpu_to_be32 (0 ),cpu_to_be32 (0 ),cpu_to_be32 (0 ), -cpu_to_be32 (nb_numa_nodes -1 ), +cpu_to_be32 (nb_numa_nodes ? nb_numa_nodes -1 :0 ), };_FDT (rtas =fdt_add_subnode (fdt,0 ,"rtas" ));
Signature · 1 line
1.8.3.1
Cc'ing David who should always be in the recipient list when posting ppc related patches :)
Quoted 9 lines · On Tue, 17 Apr 2018 12:21:35 -0400 Serhii Popovych <[email protected]> wrote:
In non-NUMA configurations
nb_numa_nodesis zero and we set 5th cell in ibm,max-associativity-domains to -1. That causes to stall Linux guests during boot after following line:[ 0.000000] NUMA associativity depth for CPU/Memory: 4Make last possible NUMA in property zero to correct support for non-NUMA guests.
Alternatively, as suggested by David in some other mail, you could drop the property in this case. I've checked it fixes the hang too, and it probably makes more sense than exposing only zeroes.
Quoted 1 line
Fixes c1df49a670ef ("spapr: Add ibm,max-associativity-domains property")
Since c1df49a670ef hasn't hit master yet, I guess we should squash this patch (or any alternative) there to preserve bisect, ie, either David does it for you or you post a v4 of your previous series.
Quoted 18 lines
Signed-off-by Serhii Popovych <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -914,7 +914,7 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)cpu_to_be32 (0 ),cpu_to_be32 (0 ),cpu_to_be32 (0 ), -cpu_to_be32 (nb_numa_nodes -1 ), +cpu_to_be32 (nb_numa_nodes ? nb_numa_nodes -1 :0 ), };_FDT (rtas =fdt_add_subnode (fdt,0 ,"rtas" ));
Quoted 12 lines · Greg Kurz
Cc'ing David who should always be in the recipient list when posting ppc related patches :)
Quoted 6 lines · On Tue, 17 Apr 2018 12:21:35 -0400 Serhii Popovych <[email protected]> wrote:
In non-NUMA configurations
nb_numa_nodesis zero and we set 5th cell in ibm,max-associativity-domains to -1. That causes to stall Linux guests during boot after following line:[ 0.000000] NUMA associativity depth for CPU/Memory: 4
Quoted 7 lines
Quoted 3 lines
Make last possible NUMA in property zero to correct support for non-NUMA guests.
Alternatively, as suggested by David in some other mail, you could drop the property in this case. I've checked it fixes the hang too, and it probably makes more sense than exposing only zeroes.
Actually, I think this is the better solution. qemu treats "not NUMA" and "exactly one NUMA node" differently for historical reasons, but I don't think that actually makes a whole lot of sense. I think advertising them identically so we don't generate more special cases on the guest side is a better idea.
Quoted 5 lines
Quoted 1 line
Fixes c1df49a670ef ("spapr: Add ibm,max-associativity-domains property")Since
c1df49a670efhasn't hit master yet, I guess we should squash this patch (or any alternative) there to preserve bisect, ie, either David does it for you or you post a v4 of your previous series.
Right, I've folded these together in my tree so we don't get an interval of broken commits.
Quoted 21 lines
Quoted 19 lines
Signed-off-by Serhii Popovych <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -914,7 +914,7 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)cpu_to_be32 (0 ),cpu_to_be32 (0 ),cpu_to_be32 (0 ), -cpu_to_be32 (nb_numa_nodes -1 ), +cpu_to_be32 (nb_numa_nodes ? nb_numa_nodes -1 :0 ), };_FDT (rtas =fdt_add_subnode (fdt,0 ,"rtas" ));
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 21 lines · On Wed, 18 Apr 2018 11:49:08 +1000 David Gibson <[email protected]>…
Quoted 12 lines · Greg Kurz
Cc'ing David who should always be in the recipient list when posting ppc related patches :)
Quoted 6 lines · On Tue, 17 Apr 2018 12:21:35 -0400 Serhii Popovych <[email protected]> wrote:
In non-NUMA configurations
nb_numa_nodesis zero and we set 5th cell in ibm,max-associativity-domains to -1. That causes to stall Linux guests during boot after following line:[ 0.000000] NUMA associativity depth for CPU/Memory: 4Quoted 7 lines
Quoted 3 lines
Make last possible NUMA in property zero to correct support for non-NUMA guests.
Alternatively, as suggested by David in some other mail, you could drop the property in this case. I've checked it fixes the hang too, and it probably makes more sense than exposing only zeroes.
Quoted 6 lines
Actually, I think this is the better solution. qemu treats "not NUMA" and "exactly one NUMA node" differently for historical reasons, but I don't think that actually makes a whole lot of sense. I think advertising them identically so we don't generate more special cases on the guest side is a better idea.
Fair enough. Thanks for the explanation.
Quoted 31 lines
Quoted 5 lines
Quoted 1 line
Fixes c1df49a670ef ("spapr: Add ibm,max-associativity-domains property")Since
c1df49a670efhasn't hit master yet, I guess we should squash this patch (or any alternative) there to preserve bisect, ie, either David does it for you or you post a v4 of your previous series.Right, I've folded these together in my tree so we don't get an interval of broken commits.
Quoted 21 lines
Quoted 19 lines
Signed-off-by Serhii Popovych <[email protected]>--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -914,7 +914,7 @@ static void spapr_dt_rtas(sPAPRMachineState *spapr, void *fdt)cpu_to_be32 (0 ),cpu_to_be32 (0 ),cpu_to_be32 (0 ), -cpu_to_be32 (nb_numa_nodes -1 ), +cpu_to_be32 (nb_numa_nodes ? nb_numa_nodes -1 :0 ), };_FDT (rtas =fdt_add_subnode (fdt,0 ,"rtas" ));