Skip to content

Commit 6f98266

Browse files
author
Mamatha Inamdar
committed
powerpc/pseries: Define papr-hvpipe ioctl
JIRA: https://issues.redhat.com/browse/RHEL-101849 Conflicts: backport upstream commit 043439a - 44bdcff ("Documentation: ioctl-number: Correct full path to papr-physical-attestation.h") needs more column width to include full path in the "Include file" column which affects the complete table format. - 15afd5d ("Documentation: ioctl-number: Extend "Include File" column width") changes the table width which needs so many patches that affect other source files. - Backport changes: powerpc/include/uapi/asm/papr-physical-attestation.h instead of arch/powerpc/include/uapi/asm/papr-physical-attestation.h commit 043439a Author: Haren Myneni <haren@linux.ibm.com> Date: Tue Sep 9 01:43:53 2025 -0700 powerpc/pseries: Define papr-hvpipe ioctl PowerPC FW introduced HVPIPE RTAS calls such as ibm,send-hvpipe-msg and ibm,receive-hvpipe-msg for the user space to exchange information with different sources such as Hardware Management Consoles (HMC). HVPIPE_IOC_CREATE_HANDLE is defined to use /dev/papr-hvpipe interface for ibm,send-hvpipe-msg and ibm,receive-hvpipe-msg RTAS calls. Also defined papr_hvpipe_hdr which will added in the payload that is passed between the kernel and the user space. 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-2-haren@linux.ibm.com Signed-off-by: Mamatha Inamdar <minamdar@redhat.com>
1 parent 048d3d9 commit 6f98266

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Documentation/userspace-api/ioctl/ioctl-number.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ Code Seq# Include File Comments
356356
<mailto:linuxppc-dev@lists.ozlabs.org>
357357
0xB2 08 powerpc/include/uapi/asm/papr-physical-attestation.h powerpc/pseries Physical Attestation API
358358
<mailto:linuxppc-dev@lists.ozlabs.org>
359+
0xB2 09 arch/powerpc/include/uapi/asm/papr-hvpipe.h powerpc/pseries HVPIPE API
360+
<mailto:linuxppc-dev@lists.ozlabs.org>
359361
0xB3 00 linux/mmc/ioctl.h
360362
0xB4 00-0F linux/gpio.h <mailto:linux-gpio@vger.kernel.org>
361363
0xB5 00-0F uapi/linux/rpmsg.h <mailto:linux-remoteproc@vger.kernel.org>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
#ifndef _UAPI_PAPR_HVPIPE_H_
3+
#define _UAPI_PAPR_HVPIPE_H_
4+
5+
#include <linux/types.h>
6+
#include <asm/ioctl.h>
7+
#include <asm/papr-miscdev.h>
8+
9+
/*
10+
* This header is included in payload between OS and the user
11+
* space.
12+
* flags: OS notifies the user space whether the hvpipe is
13+
* closed or the buffer has the payload.
14+
*/
15+
struct papr_hvpipe_hdr {
16+
u8 version;
17+
u8 reserved[3];
18+
u32 flags;
19+
u8 reserved2[40];
20+
};
21+
22+
/*
23+
* ioctl for /dev/papr-hvpipe
24+
*/
25+
#define PAPR_HVPIPE_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 9, __u32)
26+
27+
/*
28+
* hvpipe_hdr flags used for read()
29+
*/
30+
#define HVPIPE_MSG_AVAILABLE 0x01 /* Payload is available */
31+
#define HVPIPE_LOST_CONNECTION 0x02 /* Pipe connection is closed/unavailable */
32+
33+
#endif /* _UAPI_PAPR_HVPIPE_H_ */

0 commit comments

Comments
 (0)