All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony@xenproject.org>
To: "Petr Beneš" <w1benny@gmail.com>
Cc: xen-devel@lists.xenproject.org, Nick Rosbrook <enr0n@ubuntu.com>,
	George Dunlap <gwd@xenproject.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH v7 2/7] tools/xl: Add altp2m_count parameter
Date: Mon, 7 Jul 2025 15:35:14 +0200	[thread overview]
Message-ID: <aGvNEsyTkFLJAWqA@l14> (raw)
In-Reply-To: <090b27895506d78055d1bab9c2b3617e85f389c6.1751397919.git.w1benny@gmail.com>

On Tue, Jul 01, 2025 at 07:54:24PM +0000, Petr Beneš wrote:
> diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
> index 8a85fba1cf..acf7fd9837 100644
> --- a/tools/libs/light/libxl_create.c
> +++ b/tools/libs/light/libxl_create.c
> @@ -421,6 +421,15 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
>          return -ERROR_INVAL;
>      }
>  
> +    if (b_info->altp2m_count == LIBXL_ALTP2M_COUNT_DEFAULT) {
> +        if ((libxl_defbool_val(b_info->u.hvm.altp2m) ||

This access turned out to be an issue. "hvm.altp2m" is only set to a
default value for hvm guests on x86, in
libxl__arch_domain_build_info_setdefault() in ibxl_x86.c. So trying to
create a PV guest will fail here.

It seems that altp2m_count is going to be used for the creation of all
guest, right? That is in addition to HVM, it will be also used for PV
guest and on Arm, and any other architectures that could be added. What
should be the value of altp2m_count in all this case, if altp2m is only
set on x86 HVM guest?


> +            b_info->altp2m != LIBXL_ALTP2M_MODE_DISABLED))
> +            /* Reflect the default legacy count */
> +            b_info->altp2m_count = 10;
> +        else
> +            b_info->altp2m_count = 0;

Cheers,

-- 
Anthony PERARD


  parent reply	other threads:[~2025-07-07 13:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 19:54 [PATCH v7 0/7] x86: Make MAX_ALTP2M configurable Petr Beneš
2025-07-01 19:54 ` [PATCH v7 1/7] xen: Refactor altp2m options into a structured format Petr Beneš
2025-07-01 19:54 ` [PATCH v7 2/7] tools/xl: Add altp2m_count parameter Petr Beneš
2025-07-02 13:29   ` Nick Rosbrook
2025-07-07 12:43   ` Jan Beulich
2025-07-07 13:35   ` Anthony PERARD [this message]
2025-07-07 14:52     ` Petr Beneš
2025-07-09 15:30       ` Anthony PERARD
2025-07-01 19:54 ` [PATCH v7 3/7] docs/man: Add altp2m_count parameter to the xl.cfg manual Petr Beneš
2025-07-01 19:54 ` [PATCH v7 4/7] xen: Make the maximum number of altp2m views configurable for x86 Petr Beneš
2025-07-02 14:11   ` Jan Beulich
2025-07-05  0:21     ` Petr Beneš
2025-07-07  6:53       ` Jan Beulich
2025-07-01 19:54 ` [PATCH v7 5/7] tools/libxl: Activate the altp2m_count feature Petr Beneš
2025-07-01 19:54 ` [PATCH v7 6/7] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0 Petr Beneš
2025-07-01 19:54 ` [PATCH v7 7/7] tools/ocaml: Add altp2m_count parameter Petr Beneš
2025-07-02  7:31 ` [PATCH v7 0/7] x86: Make MAX_ALTP2M configurable Jan Beulich

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=aGvNEsyTkFLJAWqA@l14 \
    --to=anthony@xenproject.org \
    --cc=anthony.perard@vates.tech \
    --cc=enr0n@ubuntu.com \
    --cc=gwd@xenproject.org \
    --cc=jgross@suse.com \
    --cc=w1benny@gmail.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.