On 04/02/2026 2:40 pm, Jan Beulich wrote:
>>> +    if ( virt_to_maddr(d->shared_info) >> 32 )
>>> +    {
>>> +        shared_info_t *prev = d->shared_info;
>>> +
>>> +        d->shared_info = alloc_xenheap_pages(0, MEMF_bits(32));
>>> +        if ( !d->shared_info )
>>> +        {
>>> +            d->shared_info = prev;
>>> +            rc = -ENOMEM;
>>> +            goto undo_and_fail;
>>> +        }
>>> +        put_page(virt_to_page(prev));
>>> +        clear_page(d->shared_info);
>> I think copy_page() would be more appropriate.  That way there are fewer
>> implicit ordering dependencies.
> I'd strongly recommend against copy_page() here. If there was any data in
> there that would need copying, it would need to be done field-wise, using
> the compat xlat machinery. The layouts are different. It may be prudent to
> assert that the original page is still completely zeroed.

Oh, yes.  The layouts will be different.  Fine.

~Andrew

Reply via email to