Skip to content

s390x: smp: use CPU indexes instead of addresses

Claudio Imbrenda kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest6 patches 16 repliesIn review

Changes in v2 from the cover letter

* refactored the smp_* functions to accept indexes instead of addresses
* also fixed uv-host test

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6lib: s390x: smp: guarantee that boot CPU has index 0lib/s390x/smp.c+19 -82 replies
2/6lib: s390x: smp: refactor smp functions to accept indexeslib/s390x/smp.c lib/s390x/smp.h+99 -696 replies
3/6s390x: smp: use CPU indexes instead of addressess390x/smp.c+11 -112 replies
4/6s390x: firq: use CPU indexes instead of addressess390x/firq.c+6 -202 replies
5/6s390x: skrf: use CPU indexes instead of addressess390x/skrf.c+1 -12 replies
6/6s390x: uv-host: use CPU indexes instead of addressess390x/uv-host.c+2 -22 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchNico BoehrSteffen Eiden
1/6R-b R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b
5/6R-b R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [kvm-unit-tests PATCH v2 0/6] s390x: smp: use CPU indexes instead of addresses

On s390x there are no guarantees about the CPU addresses, except that they shall be unique. This means that in some environments, it is theoretically possible that there is no match between the CPU address and its position (index) in the list of available CPUs returned by the system. Moreover, there are no guarantees about the ordering of the list, or even that it is consistent each time it is returned.

This series fixes a small bug in the SMP initialization code, adds a guarantee that the boot CPU will always have index 0, changes the existing smp_* functions to take indexes instead of addresses, and introduces some functions to allow tests to use CPU indexes instead of using hardcoded CPU addresses. This will allow the tests to run successfully in more environments (e.g. z/VM, LPAR).

Some existing tests are adapted to take advantage of the new functionalities.

v1->v2
* refactored the smp_* functions to accept indexes instead of addresses
* also fixed uv-host test

Claudio Imbrenda (6):
lib: s390x: smp: guarantee that boot CPU has index 0
lib: s390x: smp: refactor smp functions to accept indexes
s390x: smp: use CPU indexes instead of addresses
s390x: firq: use CPU indexes instead of addresses
s390x: skrf: use CPU indexes instead of addresses
s390x: uv-host: use CPU indexes instead of addresses

 lib/s390x/smp.h |  20 +++---
 lib/s390x/smp.c | 173 +++++++++++++++++++++++++++++-------------------
 s390x/firq.c    |  26 ++------
 s390x/skrf.c    |   2 +-
 s390x/smp.c     |  22 +++---
 s390x/uv-host.c |   4 +-
 6 files changed, 137 insertions(+), 110 deletions(-)
Signature · 1 line
2.34.1