[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH V2 3/4] hvmload: Add x2apic entry support in the MADT build



>>> On 04.09.17 at 13:12, <roger.pau@xxxxxxxxxx> wrote:
> On Mon, Sep 04, 2017 at 06:59:24PM +0800, Lan Tianyu wrote:
>> On 2017年09月01日 17:57, Roger Pau Monné wrote:
>> > On Thu, Aug 31, 2017 at 01:01:48AM -0400, Lan Tianyu wrote:
>> >> @@ -92,7 +92,12 @@ static struct acpi_20_madt *construct_madt(struct 
>> >> acpi_ctxt *ctxt,
>> >>      sz  = sizeof(struct acpi_20_madt);
>> >>      sz += sizeof(struct acpi_20_madt_intsrcovr) * 16;
>> >>      sz += sizeof(struct acpi_20_madt_ioapic);
>> >> -    sz += sizeof(struct acpi_20_madt_lapic) * hvminfo->nr_vcpus;
>> >> +
>> >> +    if (hvminfo->nr_vcpus < 128)
>> > 
>> > This should be done based on APIC ID.
>> 
>> There will be a problem how to get max apic id. Should we use the max
>> vcpu index to get max APIC id?
> 
> IMHO, this should become a loop that iterates over each vCPU getting
> it's APIC ID, and add either a lapic or x2apic struct size to sz.

Indeed.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.