[PATCH makedumpfile] Add confidential VM unaccepted free pages support on Linux 6.16 and later
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Tue Jul 1 17:03:30 PDT 2025
On 2025/06/30 15:24, HAGIO KAZUHITO(萩尾 一仁) wrote:
> On 2025/06/30 15:30, Zhiquan Li wrote:
>>
>> On 2025/6/30 12:05, HAGIO KAZUHITO(萩尾 一仁) wrote:
>>> Hi,
>>>
>>> thank you for the patch, and sorry for the long delay..
>>>
>>
>> Thanks for your time to review this patch. There is a lot of background
>> knowledge behind this feature, it really needs a long time to digest them.
>>
>>>> @@ -6630,6 +6633,17 @@ check_order:
>>>> nr_pages = 1 << private;
>>>> pfn_counter = &pfn_free;
>>>> }
>>>> + /*
>>>> + * Exclude the unaccepted free pages not managed by buddy.
>>>> + * By convention, pages can be added to the zone.unaccepted_pages list
>>>> + * only when the order is MAX_ORDER_NR_PAGES. Otherwise, the page is
>>>> + * accepted immediately without being on the list.
>>>> + */
>>>> + else if ((info->dump_level & DL_EXCLUDE_FREE)
>>>> + && isUnaccepted(_mapcount)) {
>>>
>>>> + nr_pages = 1 << (ARRAY_LENGTH(zone.free_area) - 1);
>>>
>>> just to clarify, does this mean that the order of unaccepted pages is
>>> MAX_PAGE_ORDER but it's not set in struct page, so we need to set the
>>> order here?
>>>
>>
>> Yes, the unit of operations on the buddy system for unaccepted pages is
>> MAX_PAGE_ORDER, and the type PGTY_unaccepted is only applied on the
>> first of struct page, not each struct page of MAX_PAGE_ORDER unaccepted
>> pages need the type. Therefore, if we see one struct page with the
>> PGTY_unaccepted type, that means the next MAX_PAGE_ORDER-1 unaccepted
>> pages are added to zone.unaccepted_pages list.
>
> Thank you Zhiquan for the detailed explanation, which made me understand
> more clearly. And the patch looks good to me, so ack.
>
> (There is no need to add my acked-by tag to the patch, we will merge
> this when Masa sends his ack.)
The patch got 2 acks, applied.
https://github.com/makedumpfile/makedumpfile/commit/c1a930185482a72b290099a4f814c5f32b6e4cc8
Thanks!
Kazu
More information about the kexec
mailing list