Re: [PATCH 1/3 v9] x86/mm: Change the examination condition to avoid confusion

From: lijiang
Date: Mon Mar 25 2019 - 05:21:02 EST


å 2019å03æ25æ 14:40, Borislav Petkov åé:
> On Mon, Mar 25, 2019 at 11:11:45AM +0800, lijiang wrote:
>> I mean it needs to find all the value of the 'IORES_DESC_ACPI_*' type.
>
> A function called __ioremap_check_desc_other() needs to find
> IORES_DESC_ACPI_* types...
>
> No, still don't know what you're trying to do.

Let's look at the discussion in patch v8, please refer to this link:
https://lkml.org/lkml/2019/3/16/15

I did a test according to Tom's reply, and the test indicated his suggestion was
correct, we should change this to check for IORES_DESC_ACPI_* values.

>
>> As above mentioned, it needs to find all the value of the 'IORES_DESC_ACPI_*'
>> type, so we should explicitly use the 'IORES_DESC_ACPI_*' type as the check
>> condition instead of the 'IORES_DESC_NONE'.
>
> And now the same question I'm asking you each time: WHY does it need to find
> the ACPI types?
>

When SEV is enabled and the page being mapped is in memory, need to ensure the
memory encryption attribute is also enabled in the resulting mapping.

I believe Tom knows better than me. :-)

Thanks.
Lianbo