[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 06/11] tools/libacpi: Use LUT of APIC IDs rather than function pointer
On Wed Oct 9, 2024 at 3:25 PM BST, Jan Beulich wrote: > On 01.10.2024 14:38, Alejandro Vallejo wrote: > > @@ -148,7 +148,7 @@ static struct acpi_20_madt *construct_madt(struct > > acpi_ctxt *ctxt, > > lapic->length = sizeof(*lapic); > > /* Processor ID must match processor-object IDs in the DSDT. */ > > lapic->acpi_processor_id = i; > > - lapic->apic_id = config->lapic_id(i); > > + lapic->apic_id = config->cpu_to_apicid[i]; > > Perhaps assert (like you do in an earlier patch) that the ID is small > enough? > > > --- a/tools/libacpi/libacpi.h > > +++ b/tools/libacpi/libacpi.h > > @@ -84,7 +84,7 @@ struct acpi_config { > > unsigned long rsdp; > > > > /* x86-specific parameters */ > > - uint32_t (*lapic_id)(unsigned cpu); > > + uint32_t *cpu_to_apicid; /* LUT mapping cpu id to (x2)APIC ID */ > > const uint32_t *? > > > --- a/tools/libs/light/libxl_dom.c > > +++ b/tools/libs/light/libxl_dom.c > > @@ -1082,6 +1082,11 @@ int libxl__build_hvm(libxl__gc *gc, uint32_t domid, > > > > dom->container_type = XC_DOM_HVM_CONTAINER; > > > > +#if defined(__i386__) || defined(__x86_64__) > > + for ( uint32_t i = 0; i < info->max_vcpus; i++ ) > > Plain unsigned int? > > Jan Sure to all three. Cheers, Alejandro
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |