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

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


  • To: Roger Pau Monné <royger@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 8 Nov 2021 10:54:28 +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=kqwVs/5fGqS3lDILpvrsk+5eS7mZXtzUWMNzPFbpLb4=; b=K1eJfeZz1DgjxOzru0LeIGq/lwuACf9qqp2HNuUS05pQas/bauZU95ySLlZ/mDSnk2TrFPG3/QQlFGrhSHNUjqLIl/WuWXjDF5rlw8V3FN/8R76vxxGZ4qAMaBGDjO1dDVeoIdSlwUQwECsQwPOziNcuLSzSz/TrMeXjDw1sEkuM/e1ABgXupbnsLMdPBuBn/FhTwf3zDgmJI9iHXynFk8Gr83kZhmk59F9sNbupS2nNQHsdyCxsi6y0MGahcZzPK2e1iIxZZ5YXVQ6D0EoLoEsVC/AUkr4M4ahvn5XzgHZWGKRgHf0zH885NfUUhqAmcPOpcyWJRgbPCif4YH5Lmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T/vA1xDm2lYE/M8sGh8KmDV1JmOWHX0NFk87p0tWVQOHAadsNNCAXfxkBBH9rAVNKnuX7dOgzf5ZNkAXFR1pIIg30QZYE1epQkrhn3Zzf9Wp35ZZGvXjB5h9McQYfzuPiObmaeF4bV/0fMaKdGQ71GQWouLfeZDpw5ECMhciDCvq32G3POQXSXjkaz6P1y+Zjwi2LkGjo8koTgk4s/KePddMw30EnuYaZwD9s6NPQuf2ZQDvKaxiAA5sUL2eLUVkR0mHaN8nh8ereSxSQ1Tq+T1cbl+x/daUnXD8JOIsQgWyqWZtSgkJr8A9A423uS4Nzq+qXhEUHGd4mb63gtrnYw==
  • 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>
  • Delivery-date: Mon, 08 Nov 2021 09:54:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.11.2021 10:36, Roger Pau Monné wrote:
> On Mon, Nov 08, 2021 at 08:40:59AM +0100, Jan Beulich wrote:
>> On 05.11.2021 16:38, Roger Pau Monné wrote:
>>> On Fri, Nov 05, 2021 at 01:32:18PM +0100, Jan Beulich wrote:
>>>> --- a/xen/arch/x86/setup.c
>>>> +++ b/xen/arch/x86/setup.c
>>>> @@ -1699,6 +1699,13 @@ void __init noreturn __start_xen(unsigne
>>>>  
>>>>      dmi_scan_machine();
>>>>  
>>>> +    /*
>>>> +     * IOMMU-related ACPI table parsing has to happen before APIC 
>>>> probing, for
>>>> +     * check_x2apic_preenabled() to be able to observe respective 
>>>> findings, in
>>>> +     * particular iommu_intremap having got turned off.
>>>> +     */
>>>> +    acpi_iommu_init();
>>>
>>> If we pull this out I think we should add a check for acpi_disabled
>>> and if set turn off iommu_intremap and iommu_enable?
>>
>> Hmm, I should have added a note regarding this. If we want to exactly
>> retain prior behavior, acpi_ht would also need checking. Yet that has
>> gone wrong long ago: We parse way too many tables when acpi_disabled
>> && acpi_ht, and hence while correct wrt to prior behavior I'd consider
>> it wrong to (re)add a "!acpi_ht" check.
>>
>> As a result I'm of the opinion that checking acpi_disabled here also
>> isn't necessarily appropriate, and instead IOMMU disabling would
>> better be solely under the control of "iommu=".
> 
> I haven't looked very deeply, but will the acpi helpers work correctly
> in that case? As acpi_boot_table_init will be short-circuited if
>  `acpi_disabled && !acpi_ht`.

Oh, that's a good point you make.

Jan




 


Rackspace

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