From: "Jan Beulich" Subject: Re: [PATCH v2 13/41] arm/acpi : parse MADT to map logical cpu to MPIDR and get cpu_possible_map Date: Wed, 20 May 2015 17:08:44 +0100 Message-ID: <555CCDAC020000780007C5DB@mail.emea.novell.com> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> <1431893048-5214-14-git-send-email-parth.dixit@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431893048-5214-14-git-send-email-parth.dixit@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Parth Dixit Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 17.05.15 at 22:03, wrote: > --- a/xen/include/xen/acpi.h > +++ b/xen/include/xen/acpi.h > @@ -40,6 +40,10 @@ > #define ACPI_MADT_GET_POLARITY(inti) ACPI_MADT_GET_(POLARITY, inti) > #define ACPI_MADT_GET_TRIGGER(inti) ACPI_MADT_GET_(TRIGGER, inti) > > +#define BAD_MADT_ENTRY(entry, end) ( \ > + (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ > + ((struct acpi_subtable_header *)entry)->length < sizeof(*entry)) This shouldn't be added here without the original getting removed from xen/arch/x86/acpi/boot.c. And the latest when moving this to a global header it needs to be properly parenthesized. Jan