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

Re: [PATCH v2.2 1/6][4.16?] x86/x2APIC: defer probe until after IOMMU ACPI table parsing


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 Nov 2021 17:10:04 +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=YZ2LRa313G6SYGy7AlhOjdMZRKIzHVzHTVxnnFJlevg=; b=QpFh2Qt4f7lYE8mq/xgNF3pPouk9z/edqwFHrZIEZG6dyC70B90X98koYLF6JFO82YNtmawwRI+fSKrx5l3lnOC8xI6GyYV5C50oQ0/EULDqa83NrmuPyKwAr34plEd6bmBpY9H8dnnUQNnuomKQh0ZQ7AqRWibVTY3k7deIGNtSWIhvYH5JHu2ErK45Ck7ga2z0JcXCBLBZLC3pbSrcyNpbKnO68Po6odjdlyWXfilMTK7ic2tqgGqkCzB9VG0E467SAnKYNvVwVf1eWmpgFpPSRoiw5JSnTokW5J6vOZ7GMphqeRfBhV8I8Ei0aSsePwbEppJ+YCZsa1x7XJz3zw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eOnevryD0BMGdz3rfxylIbRtX7TkTtkQWwaFYxq5+JcIEobaXA/emR6a8p6xeoMm/TXBP67lr73jrXMozwOJketpSlesjfSLk7X00aQRHwzbKVIMB14yYQl8fFG8LQ1O0Y4LYwCU8z4seLdWfuG47Wsj2huNZpQRy0DM3N0dFh2t1GSygCPuRw2jxtZ4lhSynNBUuRUVrpsIUgCtOAaYa+vgQpTRIPN1Wd7cL/XqQzGERQn8cqNEiWnmn7J1kM2duBnOskWqSt2sgvSlPiZNRtSm8FqFm3cChv6eId4+czjx7z3QKjubve4gByeYf3hUqPWABAcpgvD2duYauEhpiQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Mon, 15 Nov 2021 16:10:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.11.2021 16:07, Roger Pau Monné wrote:
> On Mon, Nov 15, 2021 at 03:31:39PM +0100, Jan Beulich wrote:
>> While commit 46c4061cd2bf ("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_iommu_init(), such that
>> iommu_intremap getting disabled there can be properly taken into account
>> by apic_x2apic_probe().
>>
>> Note that, for the time being (further cleanup patches following),
>> reversing the order of the calls to generic_apic_probe() and
>> acpi_boot_init() is not an option:
>> - acpi_process_madt() calls clustered_apic_check() and hence relies on
>>   genapic to have got filled before,
>> - generic_bigsmp_probe() (called from acpi_process_madt()) needs to
>>   occur after generic_apic_probe(),
>> - acpi_parse_madt() (called from acpi_process_madt()) calls
>>   acpi_madt_oem_check(), which wants to be after generic_apic_probe().
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

>> --- a/xen/arch/x86/setup.c
>> +++ b/xen/arch/x86/setup.c
>> @@ -1700,15 +1700,30 @@ 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);
>>  
>>      xsm_multiboot_init(module_map, mbi);
>>  
>> +    /*
>> +     * IOMMU-related ACPI table parsing may require some of the system 
>> domains
>> +     * to be usable.
> 
> I would be a bit more specific and likely add "...to be usable in
> order to hide IOMMU PCI devices.".

Hmm, not sure. I did specifically leave out the "why" part, as dom_io
might also become required for something. If you nevertheless think
I should extend the comment, then I'd insist on using "e.g." just
like I did in the comment next to the call to generic_apic_probe().

Jan




 


Rackspace

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