]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/pseries: Receive payload with ibm,receive-hvpipe-msg RTAS
authorHaren Myneni <haren@linux.ibm.com>
Tue, 9 Sep 2025 08:43:57 +0000 (01:43 -0700)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 15 Sep 2025 08:08:40 +0000 (13:38 +0530)
commitcebdb522fd3edd1fe05f7b4a74a27da7dd0f8d86
treed7c8190cff561ec84756d9a6bd0868f0269dc738
parent56dbc6678bbb9c011bea91c4a0774a9464ab99a7
powerpc/pseries: Receive payload with ibm,receive-hvpipe-msg RTAS

ibm,receive-hvpipe-msg RTAS call is used to receive data from the
source (Ex: Hardware Management Console) over the hypervisor
pipe. The hypervisor will signal the OS via a Hypervisor Pipe
Event external interrupt when data is available to be received
from the pipe and the event message has the source ID and the
message type such as payload or closed pipe to the specific
source. The hypervisor will not generate another interrupt for
the next payload until the partition reads the previous payload.
It means the hvpipe is blocked and will not deliver other events
for any source. The maximum data length of 4048 bytes is
supported with this RTAS call right now.

The user space uses read() to receive data from HMC which issues
ibm,receive-hvpipe-msg RTAS and the kernel returns the buffer
length (including papr_hvpipe_hdr length) to the user space for
success or RTAS failure error. If the message is regarding the
pipe closed, kernel just returns the  papr_hvpipe_hdr with
flags = HVPIPE_LOST_CONNECTION and expects the user space to
close FD for the corresponding source.

ibm,receive-hvpipe-msg RTAS call passes the buffer and returns
the source ID from where this payload is received and the
payload length.

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-6-haren@linux.ibm.com
arch/powerpc/platforms/pseries/papr-hvpipe.c
arch/powerpc/platforms/pseries/papr-hvpipe.h