Re: [Patch v2] x86/head/64: remove redundant check on level2_kernel_pgt's _PAGE_PRESENT bit

From: Wei Yang
Date: Thu May 23 2024 - 08:26:33 EST


Thanks for comment.

On Thu, May 23, 2024 at 01:33:28PM +0300, Kirill A . Shutemov wrote:
>On Thu, May 23, 2024 at 08:37:52AM +0000, Wei Yang wrote:
>> This patch tries to remove a redundant check on kernel code's PMD
>> _PAGE_PRESENT attribute before fix up.
>
>Tries? s/This patch tries to r/R/

Will use this one.

>
>> Current process looks like this:
>>
>> pmd in [0, _text)
>> unset _PAGE_PRESENT
>> pmd in [_text, _end]
>> if (_PAGE_PRESENT)
>> fix up delta
>> pmd in (_end, 512)
>> unset _PAGE_PRESENT
>>
>> Since we have compiled in _PAGE_PRESENT in this page table, it is not
>> necessary to check _PAGE_PRESENT again before fixing up delta
>
>level2_kernel_pgt compiled with _PAGE_PRESENT set. The check is
>redundant.
>

Will use this one, thanks

>
>--
> Kiryl Shutsemau / Kirill A. Shutemov

--
Wei Yang
Help you, Help me