]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc/pseries: Send payload with ibm,send-hvpipe-msg RTAS
authorHaren Myneni <haren@linux.ibm.com>
Tue, 9 Sep 2025 08:43:56 +0000 (01:43 -0700)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 15 Sep 2025 08:08:40 +0000 (13:38 +0530)
commit56dbc6678bbb9c011bea91c4a0774a9464ab99a7
treed4bfb8ccc8c0f1839aae0d78c0618439e9cceba6
parent814ef095f12c9fa142043ee689500f3a41bb6dab
powerpc/pseries: Send payload with ibm,send-hvpipe-msg RTAS

ibm,send-hvpipe-msg RTAS call is used to send data to the source
(Ex: Hardware Management Console) over the hypervisor pipe. The
maximum data length of 4048 bytes is supported with this RTAS call
right now. The user space uses write() to send this payload which
invokes this RTAS. Then the write returns the buffer length
(including papr_hvpipe_hdr length) to the user space for success
or RTAS failure error.

ibm,send-hvpipe-msg call takes source ID as target and the buffer
in the form of buffer list. The buffer list format consists of
work area of size 4K to hold buffer list and number of 4K work
areas depends on buffers is as follows:

Length of Buffer List in bytes
Address of 4K buffer 1
Length of 4K buffer 1 used
...
Address of 4K buffer n
Length of 4K buffer n used

Only one buffer is used right now because of max payload size is
4048 bytes. writev() can be used in future when supported more
than one buffer.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Tested-by: Shashank MS <shashank.gowda@in.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250909084402.1488456-5-haren@linux.ibm.com
arch/powerpc/platforms/pseries/papr-hvpipe.c
arch/powerpc/platforms/pseries/papr-hvpipe.h