]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/pseries: Wakeup hvpipe FD when the payload is pending
authorHaren Myneni <haren@linux.ibm.com>
Tue, 9 Sep 2025 08:43:58 +0000 (01:43 -0700)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Mon, 15 Sep 2025 08:08:40 +0000 (13:38 +0530)
commitda24fb99a1b5cc842b9446f67f6bcda36b49817f
tree8c8b3e3c20dcbd30707aac4062a150641aafbfc2
parentcebdb522fd3edd1fe05f7b4a74a27da7dd0f8d86
powerpc/pseries: Wakeup hvpipe FD when the payload is pending

The user space polls on the wait_queue for the payload from the
specific source. The hypervisor interrupts the OS when the pipe
status for the specific source is changed such as payload is
available for the partition or pipe to the source is closed. The
OS retrieves the HVPIPE event message with check-exception RTAS
and event message contains the source ID and the pipe status.
Then wakes up all FDs waiting on the wait_queue so that the user
space can read the payload or close the FD if the pipe to source
in the hypervisor is closed.

The hypervisor assigns one pipe per partition for all sources.
Hence issue  ibm,receive-hvpipe-msg() to read the pending
payload during release() before closing FD so that pipe to the
partition will not be blocked.

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