Skip to contentSkip to conversation

Add mp-affinity property for ARM CPU class

PATCH Superseded Pavel Fedin 3 participants 6 messages Oct 9, 2015 – Oct 14, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add mp-affinity property for ARM CPU class

This allows to override default affinity IDs on a per-machine basis, and possibility to retrieve IDs will be used by vGICv3 live migration code.

---
Since this popped up several times on the mailing list, i decided to publish this early.

---
 target-arm/cpu.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/cpu.c +1 -0
index b48da33..3ebcebe 100644
@@ -1379,6 +1379,7 @@ static Property arm_cpu_properties[] = {
     DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
     DEFINE_PROP_UINT32("psci-conduit", ARMCPU, psci_conduit, 0),
     DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
+    DEFINE_PROP_UINT64("mp-affinity", ARMCPU, mp_affinity, 0),
     DEFINE_PROP_END_OF_LIST()
 };
 
Signature · 1 line
1.9.5.msysgit.0
#1 lore raw
Quoted 15 lines · Pavel Fedin

This allows to override default affinity IDs on a per-machine basis, and possibility to retrieve IDs will be used by vGICv3 live migration code.

---
Since this popped up several times on the mailing list, i decided to publish this early.

---
 target-arm/cpu.c | 1 +
 1 file changed, 1 insertion(+)
target-arm/cpu.c +0 -0
index b48da33..3ebcebe 100644

target-arm/cpu.c static Property arm_cpu_properties[] = { · line 1384

Quoted 6 lines
target-arm/cpu.c +1 -0
@@ -1379,6 +1379,7 @@ static Property arm_cpu_properties[] = {
     DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
     DEFINE_PROP_UINT32("psci-conduit", ARMCPU, psci_conduit, 0),
     DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
+    DEFINE_PROP_UINT64("mp-affinity", ARMCPU, mp_affinity, 0),
     DEFINE_PROP_END_OF_LIST()
 };

Nothing wrong with this patch, but I'd rather add it as part of the series which actually uses it. (I see you have it in one of your GICv3 patchsets.)

thanks
-- PMM

#2 lore raw
Quoted 11 lines · Peter Maydell
Quoted 10 lines · Pavel Fedin

This allows to override default affinity IDs on a per-machine basis, and possibility to retrieve IDs will be used by vGICv3 live migration code.

---
Since this popped up several times on the mailing list, i decided to publish this early.

---
 target-arm/cpu.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 9 lines

target-arm/cpu.c static Property arm_cpu_properties[] = { · line 1382

Quoted 9 lines
target-arm/cpu.c +1 -0
index b48da33..3ebcebe 100644
@@ -1379,6 +1379,7 @@ static Property arm_cpu_properties[] = {
     DEFINE_PROP_BOOL("start-powered-off", ARMCPU, start_powered_off, false),
     DEFINE_PROP_UINT32("psci-conduit", ARMCPU, psci_conduit, 0),
     DEFINE_PROP_UINT32("midr", ARMCPU, midr, 0),
+    DEFINE_PROP_UINT64("mp-affinity", ARMCPU, mp_affinity, 0),

Can we have separate props for each affinity level? Are you assuming MPIDR format for this?

Regards,
Peter

Quoted 10 lines

target-arm/cpu.c static Property arm_cpu_properties[] = { · line 1384

Quoted 2 lines
target-arm/cpu.c +0 -0
     DEFINE_PROP_END_OF_LIST()
 };

Nothing wrong with this patch, but I'd rather add it as part of the series which actually uses it. (I see you have it in one of your GICv3 patchsets.)

thanks
-- PMM

#3 lore raw

Hello!

Quoted 1 line

Can we have separate props for each affinity level?

Yes, we can, but i don't see any use for them in this form. Except merging back into full MPIDR value. :)

Quoted 1 line

Are you assuming MPIDR format for this?

Yes. This is convenient because everything else (KVM, GICv3, etc) also uses MPIDR format. Check out GICv3 live migration RFC v2 for one possible use case.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

#4 lore raw
In reply to Peter Maydell

Hello!

Quoted 2 lines

Nothing wrong with this patch, but I'd rather add it as part of the series which actually uses it.

Ok, as you wish, i just tried to decrease amount of out-of-tree stuff. Additionally, i remember Andrew also wanted to do something with affinities, he thought about adding emulation of some HW with particular affinity layout, so he might also want it.

Quoted 1 line

(I see you have it in one of your GICv3 patchsets.)

Yes, i decided to copy it there because some people might want to test the patchset, and they would not have to dig out this small piece.

P.S. By the way, what about GICv3 data format? Are you going to review this part and do something with it? This would also advance Shlomo's work i think.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

#5 lore raw
Quoted 3 lines · Pavel Fedin

P.S. By the way, what about GICv3 data format? Are you going to
review this part and do something with it? This would also advance Shlomo's work i think.

It's in my queue of things to look at at some point, but so are a great many other things, so I'm prioritising things that are going to be going into 2.5 first.

thanks
-- PMM