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

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



Forgot something on the previous reply.

On Tue, Sep 19, 2017 at 02:41:39PM +0100, Roger Pau Monné wrote:
> On Wed, Sep 13, 2017 at 12:52:49AM -0400, Lan Tianyu wrote:
> > @@ -88,7 +88,14 @@ static struct acpi_20_madt *construct_madt(struct 
> > acpi_ctxt *ctxt,
> >      for ( i = 0; i < hvminfo->nr_vcpus; i++ )
> >      {
> > -        memset(lapic, 0, sizeof(*lapic));
> > -        lapic->type    = ACPI_PROCESSOR_LOCAL_APIC;
> > -        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->flags = (test_bit(i, hvminfo->vcpu_online)
> > -                        ? ACPI_LOCAL_APIC_ENABLED : 0);
> > -        lapic++;
> > +        unsigned int apic_id = config->lapic_id(i);
> > +
> > +        if ( apic_id < 255 ) {
> > +            struct acpi_20_madt_lapic *lapic = end;
> > +
> > +            memset(lapic, 0, sizeof(*lapic));
> > +            lapic->type    = ACPI_PROCESSOR_LOCAL_APIC;
> > +            lapic->length  = sizeof(*lapic);
> > +            /* Processor ID must match processor-object IDs in the DSDT. */
> > +            lapic->acpi_processor_id = i;

An assert(lapic->acpi_processor_id < 255) would be nice to have here.

Thanks, Roger.

_______________________________________________
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®.