[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] x86/domain: adjust limitation on shared_info allocation below 4G
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Wed, 4 Feb 2026 16:10:42 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aiK9Y4xg807NRiJ+NHSuUeP+ElmW5fHLySjR3BU7rbw=; b=fDeRXXp71bi7c6iPUAIAkUz1APP5f4y5LG1Z83+UET+lzhZt0117i5MUczDKTEq9x1UhD2DliI7A9e23kC8gTSrz11SEE7+BpmovRIPCJpNiuKmLo2vfV6XJz/FKGmdZsDSnh8jvv+jmcF2z4/PJVsANS/lfD9B/8t8NELTkGa+y3mqknYK2kTboBKlgDYWl4uZDiyl589681zbSirjldW0iqlhy3STg7vv0NtS3+Y7bqg9tA1ut5UFrZPmE26NuzWW0Fi0iFm9NyKZZPX+OEt9eWlAyKH+9u6hPdY/HCQx/ip/eqGTvrHsCCerL9PGshS2u2qfy2QKr2JuvamP59A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tU8Wr3FuhmuXp9zwslHS3tVkGBypYYk46lcfdmfOxCdtQAqEARXjNQTSjJ0RavwGm9XlqLYuzBS9Tg5xGI6Ded3Q2YFVmLuDCbYFr8tPQK6nAh41Onri3+bBzZM0hk8ecwi4FH33bio3E3BPkvbl3UP64mrxc4I9POl1PgLh5uYTd63dKKd1rwV4jynqi7dJy713/FGTdXTn1VUGCKprH16GMIvKKRDBDm7ucPky1DzOKPYsoQPNck1RAADuvRazx/jWHMTiwOFGl0DTkqxrMOmdTyVzZyMkIlFMRU/FBem86mqrw30os8c6onkmm0jK0NjZuSdtqg9p360C3FUBEw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 04 Feb 2026 15:11:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|