[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: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 16 Nov 2021 12:44:28 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=L7SFpqRZCed6/tGh+vkUj1va6T0HaykI1rE/ny4lvvs=; b=Gldu34KMzeUhqeCxyQgkbOC/5TMVhhULERby1XDRge4x5ErIiSCSWY7A2NRjFwANi0X0BYQVhaqb6mKS1xyKVvsIB01UiHJ7kxcY2cqgioeCzNI4U52ItkfEFQyf2ETZqfRbhhWfz4VBdWsxaahPupoGvAYCHVnnfCZiD+G01mq9oVRnDJGeItkciAX8IuawPROcdTqhMknb//uUByhHLKC2+KCyY5x7KdJoQUksvrKNr8CH/NzG41oquQmQVbj1qW9I6hOXP4SBshBPt8Fi/nkOtQ/8nemH9mQPHo0sAUeRrj3GkMSO73DgWpXeXkL1jcpTmogKr32BIveIxEQj+A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZFIwFQYSFVeLczC0nymvbWcfH7zBnQ+8sGoy7i/RwfYlRvn+ANUyoMGblRfz2NPoewLCCHsupDvX3v5FHEQlWXc2vMkYpPZOzyxEf3TQg4/G8gDe3/YuPEJ61a+Iyuvb9R6SCpMm5OLsjR3ugwC+rD3k7ppo/B5c85XkHnLGLSz5dHIuyHXVJg++86knrwA4MPsX9irMuVASAmkTZ7nxQQ/Z2WPFiZNsE0S8xuUWwxCiAj1zgDMa3dbuzk4g3O8WPWPp5zjduUAIljB4RbeZHIaZ+wYy3vMZVoeLr4JKlAc8arbA3/T75Jn7+HB620sRR5Jz1KBMox7lWK/JCHXCXw==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.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: Tue, 16 Nov 2021 11:45:03 +0000
- Ironport-data: A9a23:+q5+Q6y2c2i0K93jiPp6t+fOwSrEfRIJ4+MujC+fZmUNrF6WrkVVn zdLDGDXPv6Ka2Wmfdt2Po6woENVv5HVzdZiHQVvqiAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAuLeNYYH1500s6wrdn2tQAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt9Vvi /xpp4yVdT4sPoj2p70FYzJzThgraMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVort4kI8TxepsWp1lrzC3DDOZgSpfGK0nPzYIHjW1s3pATdRrYT 8woaAcsZUXgWQJeEUwSV9Ewn8brpnaqJlW0r3rK/PFqsgA/1jdZ0afvGMrYfMSQQsdYlVreo XjJl0zhCwweHMySz3yC6H3ErvDLtTP2XsQVDrLQ3vxgjUCXx2cTIAYLTlb9qv684mauVtQaJ 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KrPxsOskLtp133Aq2lEZdPULSKKlfp GV88jziyWZtN9wYhEdcdDpAtjnfZr5z+8J3WB3B8bfYOCGghrTEGgG1+rfKlLbakjDH4JmpM Ndmu1FeaLN5DtB/LbHCWuDYq4dKbC8mcjC74qurAYOPHJXguNbnnxE426gYzxLrWJ9dOME/f Snl616T23KQwVoUi33PAhJY8Hz4/nw0L72ax8PABAqrCGIkDOT8bb/VzyVxA0XXT9jyaortT GtqX232oyT99WAjjPM3W7a6Jpb3PPn19t4HcSJzuwYMC/lhAqEbJloH5eCoDc2iuey70tCqq iBnz4Qe+BIr1/BdGC8phXgnyHmzTYV8nfnjWSVhHPyyPaJDA4SOo5kv8Z0YxHZ400vsJVXy6 RQxV+UsJJREFfpgDn9z8KgbWArqmOE5V4Z1cIDhX1WVoUTLJVLq5YEwU9TGJAcWArn9YEcFv V0Bs203ocWTbqjVQGagoBT+q3oYpxqdS32BnTq+/blnQS+pUoJjHfxn6ck7zA9HJFUcegM2w 2LCNUvqFh0dL5iUUtKPpZ2fSKGMB2+ffvyChPnHb3GLtBNB5ufke+83F0KjNvaD6DgiqFCwa j8bA==
- Ironport-sdr: /1GN+UlrSeg74z2YhxylJ0t2h15GGq//EmMvDai57FY+Zen8AEjet9V14SkVgAGTJXXVyrR6eG +KK0peDGpEfcascnhdrTMKyynFsJ48JdFC+sKP3DdeTFb9vJiI8VCtZDjTTHrskacJvsGM2imc j+kVsWTnFwQqQ81k1q9Eu3JmWcPsfHjqNitVR0++xFAzomtI+0oTt3tMLg5RfM27EeQ5CJusxd L4FTwUEdyamTCefRohGszxR/GujovHuo6XbY5mkGp/jblDhnA8CfWyUufB7oezE+Z076zFFLbE 4lkB7cN0HgicfG0kgjdCteu6
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 15, 2021 at 05:10:04PM +0100, Jan Beulich wrote:
> 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().
My request was mostly to make it clear where dom_io is used, it's IMO
not trivial to spot that pci_ro_device requires the dom_io to be
setup. I'm fine if you want to use 'e.g.', or if you think this is not
helpful.
Thanks, Roger.
|