From: "Roger Pau Monné" <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] x86/domain: adjust limitation on shared_info allocation below 4G
Date: Tue, 3 Feb 2026 11:20:00 +0100 [thread overview]
Message-ID: <aYHL0CChPShMUtHw@Mac.lan> (raw)
In-Reply-To: <20260203101017.56962-1-roger.pau@citrix.com>
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@citrix.com>
> ---
> 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.
next prev parent reply other threads:[~2026-02-03 10:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 10:10 [PATCH] x86/domain: adjust limitation on shared_info allocation below 4G Roger Pau Monne
2026-02-03 10:20 ` Roger Pau Monné [this message]
2026-02-04 8:41 ` Andrew Cooper
2026-02-04 8:52 ` Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYHL0CChPShMUtHw@Mac.lan \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.