On 28.07.2025 17:01, Jürgen Groß wrote:
> On 28.07.25 16:09, Jan Beulich wrote:
>> On 08.07.2025 08:37, Juergen Gross wrote:
>>> @@ -664,7 +669,16 @@ static int need_pgt_func(unsigned long va, unsigned 
>>> int lvl, bool is_leaf,
>>>       }
>>>   
>>>       pt_mfn = virt_to_mfn(pte);
>>> -    pt_pfn = virt_to_pfn(alloc_page());
>>> +    if ( n_early_pt )
>>> +    {
>>> +        n_early_pt--;
>>> +        pt_addr = (unsigned long)&early_pt[n_early_pt * PAGE_SIZE];
>>> +    }
>>> +    else
>>> +    {
>>> +        pt_addr = alloc_page();
>>> +    }
>>
>> The failure pattern when one fails to increase early_pt[] is likely going
>> to be problematic. Wouldn't it be better to check for failure here?
> 
> Hmm, not sure this is true. I tried the shared info mapping without adding
> the special early alloc code first and finding the bug was quite easy.

Feel free to ignore my comment then.

Jan

Reply via email to