x86: Expose consistent topology to guests
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest10 patches 16 repliesIn review
- v611 patches 25 repliesSuperseded
- v510 patches 2 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 10 patches | 6 replies | Superseded | |
| v3 | 6 patches | 8 replies | Superseded | |
| v2 | 8 patches | 31 replies | Superseded | |
| v1 | 6 patches | 25 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | lib/x86: Bump max basic leaf in {pv,hvm}_max_policyxen/ | +6 | 1 reply | |
| 2/10 | xen/x86: Add initial x2APIC ID to the per-vLAPIC save areaxen/ xen/ xen/ +1 more | +30 | 6 replies | |
| 3/10 | xen/x86: Add supporting code for uploading LAPIC contexts during domain createxen/ | +20 | 1 reply | |
| 4/10 | tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselvestools/ tools/ tools/ +3 more | +63 | 5 replies | |
| 5/10 | tools/libacpi: Use LUT of APIC IDs rather than function pointertools/ tools/ tools/ +3 more | +16 | 2 replies | |
| 6/10 | tools/libguest: Always set vCPU context in vcpu_hvm()tools/ | +44 | 0 replies | |
| 7/10 | xen/lib: Add topology generator for x86tools/ xen/ xen/ +1 more | +246 | 0 replies | |
| 8/10 | xen/x86: Derive topologically correct x2APIC IDs from the policytools/ xen/ xen/ | +155 | 0 replies | |
| 9/10 | tools/libguest: Set distinct x2APIC IDs for each vCPUtools/ | +18 | 0 replies | |
| 10/10 | tools/x86: Synthesise domain topologiestools/ tools/ tools/ +1 more | +58 | 1 reply |
Reviews trailers per patch
1 of 10 patches has a Reviewed-by or Acked-by.
| Patch | Jan Beulich |
|---|---|
| 1/10 | |
| 2/10 | |
| 3/10 | R-b |
| 4/10 | |
| 5/10 | |
| 6/10 | |
| 7/10 | |
| 8/10 | |
| 9/10 | |
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v7 00/10] x86: Expose consistent topology to guests
Current topology handling is close to non-existent. As things stand, APIC IDs are allocated through the apic_id=vcpu_id*2 relation without giving any hints to the OS on how to parse the x2APIC ID of a given CPU and assuming the guest will assume 2 threads per core.
This series involves bringing x2APIC IDs into the migration stream, so older guests keep operating as they used to and enhancing Xen+toolstack so new guests get topology information consistent with their x2APIC IDs. As a side effect of this, x2APIC IDs are now packed and don't have (unless under a pathological case) gaps.
Further work ought to allow combining this topology configurations with gang-scheduling of guest hyperthreads into affine physical hyperthreads. For the time being it purposefully keeps the configuration of "1 socket" + "1 thread per core" + "1 core per vCPU".
===
Other minor changes highlighted in each individual patch.
Hypervisor prerequisites:
patch 1: lib/x86: Bump max basic leaf in {pv,hvm}_max_policy
* Conceptually similar to v6/patch1 ("Relax checks about policy compatibility"), but operates on the max policies instead.
patch 2: xen/x86: Add initial x2APIC ID to the per-vLAPIC save area patch 3: xen/x86: Add supporting code for uploading LAPIC contexts during
domain create
hvmloader prerequisites
patch 4: tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves
Toolstack prerequisites:
patch 5: tools/libacpi: Use LUT of APIC IDs rather than function pointer patch 6: tools/libguest: Always set vCPU context in vcpu_hvm()
No functional changes:
patch 7: xen/lib: Add topology generator for x86
* Tweaked the behaviour of the cache leaves on overflow and added stronger checks.
patch 8: xen/x86: Derive topologically correct x2APIC IDs from the policy
Final toolstack/xen stitching:
patch 9: tools/libguest: Set distinct x2APIC IDs for each vCPU patch 10: xen/x86: Synthesise domain topologies
v6: https://lore.kernel.org/xen-devel/[email protected]
v5: https://lore.kernel.org/xen-devel/[email protected]/
v4: https://lore.kernel.org/xen-devel/[email protected]/
v3: https://lore.kernel.org/xen-devel/[email protected]/
v2: https://lore.kernel.org/xen-devel/[email protected]/
v1: https://lore.kernel.org/xen-devel/[email protected]/
Alejandro Vallejo (10):
lib/x86: Bump max basic leaf in {pv,hvm}_max_policy xen/x86: Add initial x2APIC ID to the per-vLAPIC save area xen/x86: Add supporting code for uploading LAPIC contexts during
domain create
tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves tools/libacpi: Use LUT of APIC IDs rather than function pointer tools/libguest: Always set vCPU context in vcpu_hvm() xen/lib: Add topology generator for x86
xen/x86: Derive topologically correct x2APIC IDs from the policy tools/libguest: Set distinct x2APIC IDs for each vCPU tools/x86: Synthesise domain topologies
tools/firmware/hvmloader/config.h | 5 +- tools/firmware/hvmloader/hvmloader.c | 6 +- tools/firmware/hvmloader/mp_tables.c | 4 +- tools/firmware/hvmloader/smp.c | 57 +++++-- tools/firmware/hvmloader/util.c | 7 +- tools/include/xen-tools/common-macros.h | 5 + tools/include/xenguest.h | 8 + tools/libacpi/build.c | 6 +- tools/libacpi/libacpi.h | 2 +- tools/libs/guest/xg_cpuid_x86.c | 29 +++- tools/libs/guest/xg_dom_x86.c | 93 +++++++---- tools/libs/light/libxl_dom.c | 25 +++ tools/libs/light/libxl_x86_acpi.c | 7 +- tools/tests/cpu-policy/test-cpu-policy.c | 201 +++++++++++++++++++++++ xen/arch/x86/cpu-policy.c | 15 +- xen/arch/x86/cpuid.c | 18 +- xen/arch/x86/hvm/vlapic.c | 42 ++++- xen/arch/x86/include/asm/hvm/vlapic.h | 1 + xen/include/public/arch-x86/hvm/save.h | 2 + xen/include/xen/lib/x86/cpu-policy.h | 27 +++ xen/lib/x86/policy.c | 169 +++++++++++++++++++ xen/lib/x86/private.h | 4 + 22 files changed, 649 insertions(+), 84 deletions(-)
base-commit: 081683ea578da56dd20b9dc22a64d03c893b47ba
Signature · 1 line
2.47.0