From: Harsh Prateek Bora <harshpb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: Showta Ishizaki <zakinko@snowrabbit.org>,
Amit Machhiwal <amachhiw@linux.ibm.com>
Subject: [PULL 5/6] hw/ppc/spapr: Add the "rtas-version" property to /rtas
Date: Wed, 28 Oct 2026 10:50:23 +0530 [thread overview]
Message-ID: <20261028052024.38377-6-harshpb@linux.ibm.com> (raw)
In-Reply-To: <20261028052024.38377-1-harshpb@linux.ibm.com>
From: Showta Ishizaki <zakinko@snowrabbit.org>
PAPR requires every property listed in its table of /rtas device tree
properties to be present before the OS is booted (R-7.2.6-3 and Table
20 in PAPR v10.60; the same requirement is in LoPAR 2.9 and LoPAPR
1.1). One of them is "rtas-version", an integer encoding of the RTAS
interface version, and PAPR says it describes version 1 of that
interface.
spapr_dt_rtas() sets "rtas-size", "rtas-error-log-max" and
"rtas-event-scan-rate" but never "rtas-version", so a client that reads
it finds no RTAS: NetBSD's RTAS driver fails to attach when the
property is absent.
Set it to 1, the version PAPR describes.
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Tested-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Signed-off-by: Showta Ishizaki <zakinko@snowrabbit.org>
Link: https://lore.kernel.org/qemu-devel/20261005161859.3119EC92F0@bambi.snowrabbit.org
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
---
include/hw/ppc/spapr.h | 3 +++
hw/ppc/spapr.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 9acda15d4f..98a9099b8a 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -830,6 +830,9 @@ void spapr_load_rtas(SpaprMachineState *spapr, void *fdt, hwaddr addr);
#define RTAS_EVENT_SCAN_RATE 1
+/* RTAS interface version, as defined by PAPR v10.60 Table 20 */
+#define RTAS_VERSION 1
+
/* This helper should be used to encode interrupt specifiers when the related
* "interrupt-controller" node has its "#interrupt-cells" property set to 2 (ie,
* VIO devices, RTAS event sources and PHBs).
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 6d99464486..8a1b5b37b6 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1068,6 +1068,7 @@ static void spapr_dt_rtas(SpaprMachineState *spapr, void *fdt)
RTAS_ERROR_LOG_MAX));
_FDT(fdt_setprop_cell(fdt, rtas, "rtas-event-scan-rate",
RTAS_EVENT_SCAN_RATE));
+ _FDT(fdt_setprop_cell(fdt, rtas, "rtas-version", RTAS_VERSION));
g_assert(msi_nonbroken);
_FDT(fdt_setprop(fdt, rtas, "ibm,change-msix-capable", NULL, 0));
--
2.52.0
next prev parent reply other threads:[~2026-10-28 5:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 5:20 [PULL 0/6] ppc queue for 2026-10-28 Harsh Prateek Bora
2026-10-28 5:20 ` [PULL 1/6] hw/pci-host/pnv_phb4: fix guest-triggerable abort on 8-byte config access Harsh Prateek Bora
2026-10-28 5:20 ` [PULL 2/6] tests/functional/ppc64: extend pseries migration tests Harsh Prateek Bora
2026-10-28 5:20 ` [PULL 3/6] tests/functional/ppc64: extend ppc64 powernv net device tests Harsh Prateek Bora
2026-10-28 5:20 ` [PULL 4/6] hw/net/spapr_llan: validate RxBufPool fields on migration load Harsh Prateek Bora
2026-10-28 5:20 ` Harsh Prateek Bora [this message]
2026-10-28 5:20 ` [PULL 6/6] spapr-vscsi: clamp adapter info DMA write length to struct size Harsh Prateek Bora
2026-10-28 11:20 ` [PULL 0/6] ppc queue for 2026-10-28 Richard Henderson
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=20261028052024.38377-6-harshpb@linux.ibm.com \
--to=harshpb@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=zakinko@snowrabbit.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.