All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: "Orzel, Michal" <michal.orzel@amd.com>, xen-devel@lists.xenproject.org
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v1 1/3] xen/dom0less: introduce free_phandle in struct kernel_info
Date: Tue, 21 Apr 2026 12:47:56 +0200	[thread overview]
Message-ID: <120bdb84-4f1d-4e26-aff7-2832fde245a1@gmail.com> (raw)
In-Reply-To: <6188df37-47f1-4b46-8b4a-56316221b86c@amd.com>



On 4/20/26 9:26 AM, Orzel, Michal wrote:
> On 16/04/2026 16:20, Oleksii Kurochko wrote:
>> There are cases where it is necessary to know the next available phandle
>> number in order to generate phandles for guest device nodes.
>>
>> When a partial FDT (pfdt) is provided, special care is needed during
>> initialization of free_phandle, as the pfdt may already contain a dummy
>> interrupt controller node with a phandle assigned to it.  free_phandle
>> must therefore be initialized to one past the highest phandle already
>> present in the pfdt, to avoid collisions.
>>
>> Since free_phandle may be needed for the very first guest node generated,
> I would prefer next_phandle rather than free_phandle given that it always holds
> the *next* phandle to be allocated. Free is implied.

I am okay with such naming as I had it before and decided to change at 
last minute.

> 
>> domain_handle_dtb_boot_module() is moved earlier in prepare_dtb_domU().
>> The new call site also aligns better with the existing comment stating
>> that domain_handle_dtb_boot_module() must be called before the rest of
>> the device tree is generated.
>>
>> Introduce get_next_free_phandle() to ensure that phandles allocated for
> The name is a bit confusing. It reads as "get the next one after the current
> free phandle" but it actually returns the current value of free_phandle and post
> increments it. Let's call it alloc_phandle(). This will also make it clear to
> use the return value of this function instead of directly kinfo value.

alloc_phandle() sounds good to me.

Thanks.

~ Oleksii


  reply	other threads:[~2026-04-21 10:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 14:20 [PATCH v1 0/3] dom0less: various updates Oleksii Kurochko
2026-04-16 14:20 ` [PATCH v1 1/3] xen/dom0less: introduce free_phandle in struct kernel_info Oleksii Kurochko
2026-04-20  7:26   ` Orzel, Michal
2026-04-21 10:47     ` Oleksii Kurochko [this message]
2026-04-16 14:20 ` [PATCH v1 2/3] xen/dom0less: pass kernel_info struct instead of fdt to make_cpus_node() Oleksii Kurochko
2026-04-20  7:29   ` Orzel, Michal
2026-04-21 10:48     ` Oleksii Kurochko
2026-04-16 14:21 ` [PATCH v1 3/3] xen: introduce CONFIG_HAS_DOMAIN_TYPE Oleksii Kurochko
2026-04-20  8:03   ` Orzel, Michal
2026-04-21 11:06     ` Oleksii Kurochko
2026-04-21 11:55       ` Orzel, Michal
2026-04-20  8:22   ` Jan Beulich
2026-04-21 11:53     ` Oleksii Kurochko
2026-04-21 13:12       ` 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=120bdb84-4f1d-4e26-aff7-2832fde245a1@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --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.