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

Re: [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT


  • To: Simon Gaiser <simon@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 12 Sep 2023 10:45:45 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vWkRdfk+IPrLOBxE49LOH31J+dIxCYNC+1KTgN3kBS0=; b=c5kyEiZalSO6mKKpjkOBPJgSjJRkHOzvKSg96KY+N88arDYtxeHOo8zSFUzkLHM1lKUY+4U/SrE5ikTNWymbuvnJdGreH/F1L9plF9UVXh4tlydYApRRMKuV/KMux6NuaUTmYWD0Y70fkWv1SW2GMcoCWrCRsVoTTPxpap5sbcArfTIoJfvPl+P0N9bo6kUb5e4NaoPK/ld0Kly97AKgpIR35wlO7SmqAZwHR6d15VCw0QV5g0IoqvWwWLF0tJmWOlHas93ffRP770mfgVgKgkVC3Kr7zuDRnAHngcPMpDA/msnPPA8lezZMEg3jpLphtjrM0i1PKlAqw1Sp4SSKSw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vc39y5ZxBtY0qrgDJIWL2cwN59KSlUo2fR56mg0CXFIQB4jwimtU8ribwcNYZUUSIj1gfbLQGqzVhEJbebY72PZj/GNVyKeW0qcN7F3ak/TroBYpRpw9X5uKAVxzsq8G+2HthQAxjj8G3kCWBD8tr2d+ZC66SxVDm/RdvaIhHmkwcnsUoMKqG99DjDoluw+ekDHR3Id05K2Vf3FQL7Ij/uk5KpqibQxlJr7isETaIR16GKxmm2+WKKiaP/+v8Oeq8ZjShTlLO6ACDPEsnyp8r8upTIsmquhC5HAHSuYMq/CjmjGhCeKvMo6tTSwGL0OPErrGAcNOA9M16wJkXUOZ6A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, "committers@xxxxxxxxxxxxxx" <committers@xxxxxxxxxxxxxx>
  • Delivery-date: Tue, 12 Sep 2023 08:45:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.09.2023 10:41, Jan Beulich wrote:
> On 11.09.2023 20:05, Simon Gaiser wrote:
>> You also commented about not logging the ignored entries. Until it's
>> clear if the change in general is accepted in the end, I considered it
>> pointless to address that detail. If you disagree and want a follow up
>> for that, just let me know.
> 
> I take a different perspective here: The patch shouldn't have been
> committed without this aspect addressed, either verbally or by sending
> a v2. I continue to think that an incremental change is warranted to
> make sure logging of entries, at least with "cpuinfo" in use, remains
> consistent with what we had before. Otherwise debugging of possible
> issues becomes yet more difficult.

Oh, and just to add to this: Because of excess verbosity resulting from
such ambiguous MADT entries, for many years I have been carrying a
private patch (reproduced below, just fyi). But since those entries are
still in line with the spec, it didn't seem appropriate to me to
propose this change for upstream inclusion.

Jan

--- unstable.orig/xen/arch/x86/mpparse.c
+++ unstable/xen/arch/x86/mpparse.c
@@ -809,8 +809,13 @@ int mp_register_lapic(u32 id, bool enabl
        };
        
        if (MAX_APICS <= id) {
-               printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
-                       id, MAX_APICS);
+               static uint32_t max_warn = -1;
+
+               if (id <= max_warn) {
+                       printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
+                              id, MAX_APICS);
+                       max_warn = id - 1;
+               }
                return -EINVAL;
        }
 





 


Rackspace

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