On 02.12.2024 13:51, Andrea Bastoni wrote:
> The proposal would be to go back to v9, which reduces (for the PGC)
> the management to colored only:
>
>> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
> ...
>> @@ -2382,7 +2556,7 @@ int assign_pages(
>>
>> for ( i = 0; i < nr; i++ )
>> {
>> - ASSERT(!(pg[i].count_info & ~(PGC_extra | PGC_static)));
>> + ASSERT(!(pg[i].count_info & ~(PGC_extra | PGC_static |
>> PGC_colored)));
>> if ( pg[i].count_info & PGC_extra )
>> extra_pages++;
>> }
>> @@ -2442,7 +2616,8 @@ int assign_pages(
>> page_set_owner(&pg[i], d);
>> smp_wmb(); /* Domain pointer must be visible before updating
>> refcnt. */
>> pg[i].count_info =
>> - (pg[i].count_info & (PGC_extra | PGC_static)) | PGC_allocated |
>> 1;
>> + (pg[i].count_info & (PGC_extra | PGC_static | PGC_colored)) |
>> + PGC_allocated | 1;
>>
>> page_list_add_tail(&pg[i], page_to_list(d, &pg[i]));
So what's wrong with having PGC_preserved _just_ for these two instances?
Jan