On 18/04/2023 12.01, Pierre Morel wrote:
On 4/18/23 10:53, Nina Schoetterl-Glausch wrote:
On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote:
S390 adds two new SMP levels, drawers and books to the CPU
topology.
The S390 CPU have specific topology features like dedication
and entitlement to give to the guest indications on the host
vCPUs scheduling and help the guest take the best decisions
on the scheduling of threads on the vCPUs.
Let us provide the SMP properties with books and drawers levels
and S390 CPU with dedication and entitlement,
Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>
---
MAINTAINERS | 5 ++++
qapi/machine-common.json | 22 ++++++++++++++
qapi/machine-target.json | 12 ++++++++
qapi/machine.json | 17 +++++++++--
include/hw/boards.h | 10 ++++++-
include/hw/s390x/cpu-topology.h | 15 ++++++++++
Is hw/s390x the right path for cpu-topology?
I haven't understood the difference between hw/s390x and target/s390x
but target/s390x feels more correct, I could be mistaken though.
AFAIK target/s390 is for CPU emulation code while hw/s390 is for other
emulation.
So it depends how we classify the CPU topology, it is related to CPU but it
is no emulation.
Normally I'd say target/ is for everything what happens within a CPU chip,
and hw/ is for everything that happens outside of a CPU chip, i.e. machine
definitions and other devices.
Now CPU topology is borderline - drawers and books are rather a concept of
the machine and not of the CPU, but things like dies and threads rather
happen within a CPU chip.
So I don't mind too much either way, but I think it's certainly ok to keep
it in hw/s390x/ if you prefer that.
Thomas