[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] x86/domain: adjust limitation on shared_info allocation below 4G


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 3 Feb 2026 11:20:00 +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=8t4lTy+HnryL6HZIgCoaTVCisKyPk1JgemeOHDe9gGA=; b=S6vsrfgt00QhOTKEAIYGjaNm/fBayKqXaiT3E/3l1/MWtVdXyo6yyqlMKAfxotYstrLhhJf2R4NIDkLJTfU7clAhcNgObsxhZWFYNsvsY0PJUTzyiaRWxXeEkR/JQKcoEc1QFxE8f6hMMgN13d7XeiAj73WwvZNYKtTDb8T6/ChwVJgh9Bi9UjzDkzFlC+d/BaZJJZuw2L9jWdFChsHSNUxKRHvB5sOslfRDR9x93yY3mweQpmmzTGdRN/1AJP9gUTg07cfbo8evmyQZ2Mg8okEjrzvcP83jKjmOrlvfgmsIxKaEwcFy1SvAfkmWQNroE037CsA/2KuLX0WLamC1OQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wMTs3eujFQGYEh67J2W4onqAPoHbf2fX+LeneIJdShHirS7jhS4pxOCvi4VrFQxB94c+yZWFkvFhzXV0QlS7lycgJy+SHHEdtxNoNnIJ6WljX4JGLaJz09mrjA3j59QXc/79d2nMQ/WlSbBGVHO/Lq3t20gIZLYbbVhsdWELAZPsmHIGjGtSbeiMRmK5n8cFfFrrC/RkAL5HxKd8dJw6E1t8waj4Ge9e+h2ZbZnwM1q++0XQXwgegdz35kRkEZviWHBQ2C4aW+Dc8yOrTH7PMiAxHNUSsJ+NvJ9mNuyUehWgmGh0D8e4S9bTMMvmTSsJ3gLeRrU3l1SRA9JWEQH3Cg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 03 Feb 2026 10:20:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 03, 2026 at 11:10:17AM +0100, Roger Pau Monne wrote:
> The limitation of shared_info being allocated below 4G to fit in the
> start_info field only applies to 32bit PV guests.  On 64bit PV guests the
> start_info field is 64bits wide.  HVM guests don't use start_info at all.
> 
> Limit the allocation address restriction to 32bit PV guests only.
> 
> Fixes: 3cadc0469d5c ("x86_64: shared_info must be allocated below 4GB as it 
> is advertised to 32-bit guests via a 32-bit machine address field in 
> start_info.")
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
>  xen/arch/x86/domain.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index edb76366b596..4163568043b1 100644
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -882,10 +882,13 @@ int arch_domain_create(struct domain *d,
>          goto fail;
>  
>      /*
> -     * The shared_info machine address must fit in a 32-bit field within a
> -     * 32-bit guest's start_info structure. Hence we specify MEMF_bits(32).
> +     * For 32bit PV guests the shared_info machine address must fit in a 
> 32-bit
> +     * field within the guest's start_info structure. Hence we specify
> +     * MEMF_bits(32).
>       */
> -    if ( (d->shared_info = alloc_xenheap_pages(0, MEMF_bits(32))) == NULL )
> +    if ( (d->shared_info =
> +          alloc_xenheap_pages(0, is_pv_32bit_domain(d) ? MEMF_bits(32)
> +                                                       : 0)) == NULL )

Sorry, this is wrong, it's too early to know whether the domain is 32
or 64bit.

Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.