On 18/01/2024 15.48, Zhao Liu wrote:
From: Zhao Liu <zhao1....@intel.com>

Currently, -smp supports up to 7-levels topology hierarchy:
   -drawers/books/sockets/dies/clusters/cores/threads.

Though no machine supports all these 7 levels yet, these 7 levels have
the strict containment relationship and together form the generic CPU
topology representation of QEMU.

Also, note that the maxcpus is calculated by multiplying all 7 levels:

   maxcpus = drawers * books * sockets * dies * clusters *
             cores * threads.

To cover this code path, it is necessary to test the full topology case
(with all 7 levels). This also helps to avoid introducing new issues by
further expanding the CPU topology in the future.

Signed-off-by: Zhao Liu <zhao1....@intel.com>
---
  tests/unit/test-smp-parse.c | 143 ++++++++++++++++++++++++++++++++++++
  1 file changed, 143 insertions(+)

FWIW:
Acked-by: Thomas Huth <th...@redhat.com>


Reply via email to