Hi Narayana,

On 5/20/26 3:24 PM, Narayana Murty N wrote:
Advertise RTAS error injection call support to guests through a new
"ibm,errinjct-tokens" property under the RTAS node in the device tree.

This patch introduces:
   - spapr_get_errinject_tokens(), which retrieves or constructs a blob
     of supported error injection tokens from the host or fallback data.
   - Integration of "ibm,errinjct-tokens" into the RTAS FDT node.
   - Addition of "ibm,open-errinjct" and "ibm,close-errinjct" properties
     to advertise open/close handlers for error injection sessions.

The ibm,errinjct-tokens property allows guests to programmatically
discover supported RTAS error injection facilities, enabling safe and
dynamic usage. The helper routine allocates memory for the token blob,
which the caller must free once it has been added to the FDT.

If the device-tree file (/proc/device-tree/rtas/ibm,errinjct-tokens)
is not available, a static fallback blob is generated internally.

Do we really need to probe the procfs ? This path wont exist when on baremetal.

When on L1, the host compatibility may not be assured between different L1s

and I see no specific handling of compatibilities between L1s.

Why not advertise all tokens and let the errinjct return invalid argument

if the host doesn't have support the given function? The use case is anyway

an error injection which is mostly for development and testing.


Thanks,

Shivaprasad


Signed-off-by: Narayana Murty N <[email protected]>
---
  hw/ppc/spapr.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 104 insertions(+)
<snip/>

Reply via email to