From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [Patch 2/4] x86/hpet: Sanitise HPET ACPI table and warn about multiple tables Date: Mon, 7 Oct 2013 14:55:10 +0100 Message-ID: <5252BD3E.9090202@citrix.com> References: <1381152381-19744-1-git-send-email-andrew.cooper3@citrix.com> <1381152381-19744-3-git-send-email-andrew.cooper3@citrix.com> <5252D71202000078000F9445@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VTBHH-0000IV-Fh for xen-devel@lists.xenproject.org; Mon, 07 Oct 2013 13:55:15 +0000 In-Reply-To: <5252D71202000078000F9445@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 07/10/13 14:45, Jan Beulich wrote: >>>> On 07.10.13 at 15:26, Andrew Cooper wrote: >> --- a/xen/arch/x86/acpi/boot.c >> +++ b/xen/arch/x86/acpi/boot.c >> @@ -276,6 +276,21 @@ static int __init acpi_parse_hpet(struct >> acpi_table_header *table) >> return -1; >> } >> >> + if ( !hpet_tbl->address.address || !(hpet_tbl->address.address + 1) ) >> + { >> + printk(KERN_WARNING PREFIX "Bad HPET address %#lx\n", >> + hpet_tbl->address.address); >> + return -1; >> + } > Did you really encounter a system where this would trigger? > >> + >> + /* >> + * Hopefully someone might implement multiple HPET support in Xen. >> + * Until then, warn the user if multiple HPET tables are found. >> + */ >> + if ( hpet_address ) >> + printk(KERN_WARNING PREFIX >> + "Xen only supports one HPET - Using latest table\n"); >> + > You perhaps miunderstood how multiple HPETs would be surfaced > by firmware: Not via multiple HPET tables, but via objects in the > ACPI object namespace. With that, a similar question to the above > arises: Have you seen a system where multiple HPET tables get > surfaced? > > Jan > We had a system which had two HPET tables. A BIOS update fixed the issue, but the fact remains that in the case of multiple HPET tables, we blindly go with the latest table. Perhaps the message could change to "Multiple tables found (BIOS BUG?). Using information from latest" ? ~Andrew