[PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs

Alejandro Vallejo posted 2 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250204173120.56598-1-alejandro.vallejo@cloud.com
tools/firmware/hvmloader/config.h    |  3 +-
tools/firmware/hvmloader/hvmloader.c |  6 ++--
tools/firmware/hvmloader/mp_tables.c |  2 +-
tools/firmware/hvmloader/smp.c       | 43 +++++++++++++++++++++++++++-
tools/firmware/hvmloader/util.c      |  2 +-
5 files changed, 49 insertions(+), 7 deletions(-)
[PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs
Posted by Alejandro Vallejo 1 month ago
v2->v3:
  * Moved "extern uint32_t *cpu_to_apicid;" to patch1

v2: https://lore.kernel.org/xen-devel/20250204144542.7399-1-alejandro.vallejo@cloud.com/T/#t
v1->v2:
  * Dropped patch to skip writing the MP Tables if apicid >= 255

v1: https://lore.kernel.org/xen-devel/20250128163342.1491-1-alejandro.vallejo@cloud.com/
source series: https://lore.kernel.org/xen-devel/20241021154600.11745-5-alejandro.vallejo@cloud.com/

The hypervisor, hvmloader and the toolstack currently engage in a shared
assumption that for every vCPU apicid == 2 * vcpuid. This series removes such
assumption from hvmloader, by making it read the APIC ID of each vCPU and
storing it for later use.

Alejandro Vallejo (2):
  tools/hvmloader: Retrieve APIC IDs from the APs themselves
  tools/hvmloader: Replace LAPIC_ID() with cpu_to_apicid[]

 tools/firmware/hvmloader/config.h    |  3 +-
 tools/firmware/hvmloader/hvmloader.c |  6 ++--
 tools/firmware/hvmloader/mp_tables.c |  2 +-
 tools/firmware/hvmloader/smp.c       | 43 +++++++++++++++++++++++++++-
 tools/firmware/hvmloader/util.c      |  2 +-
 5 files changed, 49 insertions(+), 7 deletions(-)

-- 
2.48.1
Re: [PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs
Posted by Jan Beulich 3 days, 8 hours ago
On 04.02.2025 18:31, Alejandro Vallejo wrote:
> v2->v3:
>   * Moved "extern uint32_t *cpu_to_apicid;" to patch1
> 
> v2: https://lore.kernel.org/xen-devel/20250204144542.7399-1-alejandro.vallejo@cloud.com/T/#t
> v1->v2:
>   * Dropped patch to skip writing the MP Tables if apicid >= 255
> 
> v1: https://lore.kernel.org/xen-devel/20250128163342.1491-1-alejandro.vallejo@cloud.com/
> source series: https://lore.kernel.org/xen-devel/20241021154600.11745-5-alejandro.vallejo@cloud.com/
> 
> The hypervisor, hvmloader and the toolstack currently engage in a shared
> assumption that for every vCPU apicid == 2 * vcpuid. This series removes such
> assumption from hvmloader, by making it read the APIC ID of each vCPU and
> storing it for later use.
> 
> Alejandro Vallejo (2):
>   tools/hvmloader: Retrieve APIC IDs from the APs themselves
>   tools/hvmloader: Replace LAPIC_ID() with cpu_to_apicid[]

Acked-by: Jan Beulich <jbeulich@suse.com>
Re: [PATCH v3 0/2] tools/hvmloader: Decouple APIC IDs from vCPU IDs
Posted by Alejandro Vallejo 3 days, 5 hours ago
On Mon Mar 10, 2025 at 8:33 AM GMT, Jan Beulich wrote:
> On 04.02.2025 18:31, Alejandro Vallejo wrote:
> > v2->v3:
> >   * Moved "extern uint32_t *cpu_to_apicid;" to patch1
> > 
> > v2: https://lore.kernel.org/xen-devel/20250204144542.7399-1-alejandro.vallejo@cloud.com/T/#t
> > v1->v2:
> >   * Dropped patch to skip writing the MP Tables if apicid >= 255
> > 
> > v1: https://lore.kernel.org/xen-devel/20250128163342.1491-1-alejandro.vallejo@cloud.com/
> > source series: https://lore.kernel.org/xen-devel/20241021154600.11745-5-alejandro.vallejo@cloud.com/
> > 
> > The hypervisor, hvmloader and the toolstack currently engage in a shared
> > assumption that for every vCPU apicid == 2 * vcpuid. This series removes such
> > assumption from hvmloader, by making it read the APIC ID of each vCPU and
> > storing it for later use.
> > 
> > Alejandro Vallejo (2):
> >   tools/hvmloader: Retrieve APIC IDs from the APs themselves
> >   tools/hvmloader: Replace LAPIC_ID() with cpu_to_apicid[]
>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Cheers!

Alejandro