From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: uverma@linux.ibm.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
aik@ozlabs.ru
Cc: pbonzini@redhat.com, th.huth@posteo.eu, sbhat@linux.ibm.com,
harshpb@linux.ibm.com, amachhiw@linux.ibm.com,
rathc@linux.ibm.com, balaton@eik.bme.hu, philmd@oss.qualcomm.com,
npiggin@gmail.com, marcandre.lureau@redhat.com, fam@euphon.net,
avnish@linux.ibm.com
Subject: Re: [RFC PATCH 7/8] ppc/spapr: strip OF path argument suffix in path_offset
Date: Fri, 18 Sep 2026 10:55:02 +0530 [thread overview]
Message-ID: <faa52670-30fb-480d-bad5-d2962aec9f0d@linux.ibm.com> (raw)
In-Reply-To: <20260817102733.605346-8-uverma@linux.ibm.com>
Hi Utkarsh,
On 17/08/26 3:57 PM, uverma@linux.ibm.com wrote:
> From: Utkarsh Verma <uverma@linux.ibm.com>
>
> OF paths can include a ":argument" suffix on the last component (e.g.
> "disk@8000000000000000:0"), which is an OF path argument such as a
> partition number. This is not part of the FDT node name and causes
> fdt_path_offset() to fail.
>
> Strip any ":<suffix>" from the last path component only, leaving
> intermediate components untouched.
>
> AI-used-for: code
> Signed-off-by: Utkarsh Verma <uverma@linux.ibm.com>
> ---
> hw/ppc/vof.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
> index b1c574aabf..d3b0df30e4 100644
> --- a/hw/ppc/vof.c
> +++ b/hw/ppc/vof.c
> @@ -142,6 +142,8 @@ static int path_offset(const void *fdt, const char *path)
> {
> g_autofree char *p = NULL;
> char *at;
> + char *last_slash;
> + char *colon;
>
> /*
> * https://www.devicetree.org/open-firmware/bindings/ppc/release/ppc-2_1.html#HDR16
> @@ -151,6 +153,20 @@ static int path_offset(const void *fdt, const char *path)
> * suppressing leading zeros".
> */
> p = g_strdup(path);
> +
> + /*
> + * Strip any ":argument" suffix from the last path component (e.g.
> + * "disk@8000000000000000:0") — it is an OF path argument, not part of
> + * the FDT node name.
> + */
> + last_slash = strrchr(p, '/');
> + if (last_slash) {
> + colon = strchr(last_slash, ':');
> + if (colon) {
> + *colon = '\0';
> + }
> + }
Is path_offset() guaranteed to always receive an absolute path?
If not, paths without /, such as disk@8000000000000000:0, won't have the
suffix stripped. Either document the absolute-path requirement or handle
the no-slash case as well.
Thanks,
Narayana Murty N
> +
> for (at = strchr(p, '@'); at && *at; ) {
> if (*at == '/') {
> at = strchr(at, '@');
next prev parent reply other threads:[~2026-09-18 5:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 10:27 [RFC PATCH 0/8] ppc/spapr: VOF disk image (qcow2) boot support uverma
2026-08-17 10:27 ` [RFC PATCH 1/8] ppc/spapr: add PReP boot partition detection uverma
2026-09-17 17:14 ` Narayana Murty N
2026-09-25 6:19 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 2/8] hw/loader: add load_elf_ram_sym_buf() for in-memory ELF loading uverma
2026-09-17 17:14 ` Narayana Murty N
2026-09-25 6:24 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 3/8] ppc/spapr: add baseline VOF disk boot support uverma
2026-09-17 17:33 ` Narayana Murty N
2026-09-25 6:28 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 4/8] ppc/spapr: add VTY backend support to OF read/write/open services uverma
2026-08-17 10:27 ` [RFC PATCH 5/8] ppc/spapr: add block device backend to VOF open/read/write/seek services uverma
2026-09-18 5:23 ` Narayana Murty N
2026-09-25 6:33 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 6/8] spapr_vscsi: add VOF disk nodes to the device tree uverma
2026-09-18 5:24 ` Narayana Murty N
2026-09-25 6:41 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 7/8] ppc/spapr: strip OF path argument suffix in path_offset uverma
2026-09-18 5:25 ` Narayana Murty N [this message]
2026-09-25 6:45 ` Utkarsh Verma
2026-08-17 10:27 ` [RFC PATCH 8/8] ppc/spapr: implement vscsi-report-luns call-method for PAPR vSCSI uverma
2026-09-18 5:18 ` Narayana Murty N
2026-09-25 6:49 ` Utkarsh Verma
2026-09-18 5:26 ` Narayana Murty N
2026-08-19 6:55 ` [RFC PATCH 0/8] ppc/spapr: VOF disk image (qcow2) boot support Utkarsh Verma
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=faa52670-30fb-480d-bad5-d2962aec9f0d@linux.ibm.com \
--to=nnmlinux@linux.ibm.com \
--cc=aik@ozlabs.ru \
--cc=amachhiw@linux.ibm.com \
--cc=avnish@linux.ibm.com \
--cc=balaton@eik.bme.hu \
--cc=fam@euphon.net \
--cc=harshpb@linux.ibm.com \
--cc=marcandre.lureau@redhat.com \
--cc=npiggin@gmail.com \
--cc=pbonzini@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=sbhat@linux.ibm.com \
--cc=th.huth@posteo.eu \
--cc=uverma@linux.ibm.com \
/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.