[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 4 Feb 2026 17:54:58 +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=NPs1UsyYwqrcOYex/6CBegJGgSPDcAjpSGEErJFK69E=; b=YervUzv90KqdiJnIVqBf7tO71yYWTztHKQEqJlzHHiqleyfIgMrzv+75/AEIVmQrFgYsHBjtWqMIDiH+dDTg4XnKbiAuJjK8Y+xHzo9RyXkVya6iEqHagCrH1OPKAP8FrSCEkq9H/aCj4j4N/cHfKnb8cIIZW9/pJNo41NzWAuob5HIBi/VVbZQxSIYPTrgq1z6RX/qAVBoF0/WIBPidX5uFiMc5R13akKsh/4R5DFyJ1D8bJnJ+vczqtpWF6jvCsHIMFj9p54DwKvMe9VMMcXc5xkzk1S1pIrKwBcvJ2rD2c24JyAYPaAksO6ruu2Tt/hsza2F0Bklmlr4drPsEHQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oC3+cq1ZdbSrGfuFEHiNTnuiTJHB6lrKRNEe5YU8lhBj4pSC9lvhLP6zl4PYssZYcEKN1ZvrP4Rt0sdkpBV7tIGZ5MxNCH3S642lc4SoKH0R6uBmwdpo+l9LgWLbqaakNXBZr4WS24XWn0ZXeZlSTucGh/t0DwiaX15iBtlbsN8VOUxftOZNeBQKb+bbuujJDF6gVAYWSNfMI87yqjBZUGFQDRYBsQzhvmdARSv/x/i3CS/FvpFFzsjR7TUfVCNnFoZjALI2nu0TNTIhXdmk8VW1zjq28X8n5qx2AbHbzN/WaXh6np7Bi1UnM511+JqE2/NLZuYf78t3gk6ZGeWd5A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Wed, 04 Feb 2026 16:55:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Feb 04, 2026 at 04:32:25PM +0100, Jan Beulich wrote:
> On 04.02.2026 16:12, Andrew Cooper wrote:
> > On 04/02/2026 3:01 pm, Roger Pau Monné wrote:
> >>>> + share_xen_page_with_guest(virt_to_page(d->shared_info), d,
> >>>> SHARE_rw);
> >>>> + /* Ensure all references to the old shared_info page are
> >>>> dropped. */
> >>>> + for_each_vcpu( d, v )
> >>>> + vcpu_info_reset(v);
> >>> switch_compat() can only occur on a domain with no memory. How can we
> >>> have outstanding references?
> >> As Jan pointed out, it's not references, but stashed pointers to the
> >> previous shared_info page. I've used the wrong wording here.
> >
> > Yes, I saw that thread, but my question still stands.
> >
> > How can there be any this early in the domain's lifecycle?
>
> Can't (aren't) vCPU-s added ahead of adding memory?
At least on x86 when using xl/libxl the call to
XEN_DOMCTL_set_address_size happens after the call to
XEN_DOMCTL_max_vcpus, and the later calls vcpu_create() which sets the
pointer into the shared_info page for legacy (< 32) vCPUs.
Even if we could invert those two calls, it's impossible to know what
other toolstacks might do. I think we need to keep the
vcpu_info_reset() call.
Thanks, Roger.
|