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

[PATCH][4.16] x86/x2APIC: defer probe until after IOMMU ACPI table parsing


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 3 Nov 2021 15:40:55 +0100
  • 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=2g7NxanR3qs4lX5FJNF/0A0KESJLCj6zkSIIirdrJS0=; b=K6GbMOH2KOawnWksnBw+skHux0itJVDKOI8Z1S9x2ch0Himmfr81BDx0Muyokeytmlw2dJyLKIkA643H3P9a/Bnege35UUqenA0PPB1cTsuPz14sGaIuUbZ7mw/aDQc9MTXlNO9FidDHiqgEW4mEecOG6WLn29S+e2C7qsqUK2rScOnUvcT+24fA2WX1LpIinjdnXs2m/+dY9IlC1IDMe6vzhYuSM3BUdAuMPsaSW8AH4rd/BvQl8AbQXi2NFYXjhkXUXE9OG5A7dGBJVxjFD67geo5HoKkUF+Tr6vfc7CbEPHB+1HU6JUQgemhk6efz1C1xjuELDy/Jj2N0H+7Qqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rp+dQndmuNxshdKMsRB0h1jJks3N8oJU6dDK5Y85EH/9gdcNxpZXLFanHUDRdalDYWG2emGyw6LB00iBj9zeQKI78/SW2iv89MGFP8Sh5AQGG5Krq/ci7izW+1fQyeoZcl1cWxVBOTyLJmV06p8Zz4NJbp0bb27WXz+2nuTFuVISkm7x2AnI2fRFCuOwmhP7BffHvVgqJORtpzBO0dfnWR0474nyzRf75KitRcY7iQyqLcWUGKqAMEOyyksmubSGVRKHuYZFdOr+wn+WN+tcj+OHtp2VQ3VRsDE9JO2WAd+SMRLz01xKuRKV7QMoIEG4Pg34JuuOUc0oXBn6wBvCgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Delivery-date: Wed, 03 Nov 2021 14:41:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

While commit XXXXXXXXXXXX ("x86/IOMMU: mark IOMMU / intremap not in use
when ACPI tables are missing") deals with apic_x2apic_probe() as called
from x2apic_bsp_setup(), the check_x2apic_preenabled() path is similarly
affected: The call needs to occur after acpi_boot_init() (which is what
calls acpi_iommu_init()), such that iommu_intremap getting disabled
there can be properly taken into account by apic_x2apic_probe().

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Based on code inspection only - I have no affected system and hence no
way to actually test the case.

--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1694,8 +1694,6 @@ void __init noreturn __start_xen(unsigne
 
     dmi_scan_machine();
 
-    generic_apic_probe();
-
     mmio_ro_ranges = rangeset_new(NULL, "r/o mmio ranges",
                                   RANGESETF_prettyprint_hex);
 
@@ -1705,6 +1703,13 @@ void __init noreturn __start_xen(unsigne
 
     acpi_boot_init();
 
+    /*
+     * Requires initial ACPI table parsing to have happened, such that
+     * check_x2apic_preenabled() would be able to observe acpi_iommu_init()'s
+     * findings, in particular it turning off iommu_intremap.
+     */
+    generic_apic_probe();
+
     if ( smp_found_config )
         get_smp_config();
 




 


Rackspace

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