Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D285CCA101F for ; Mon, 8 Sep 2025 03:05:24 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4cKsJZ2PhHz30Pl; Mon, 8 Sep 2025 13:05:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1757300718; cv=none; b=l6RoqKqGuWO771qWmdgtbphlo/XctYjh2+qLIfXyudFjtEFz/6HBOt6dBtsJ7pWreO3MflvsWy0O4ii7m8x4k71B6jwvSOHQ9MDW7aG2uMqPurOiEywvaBJdUJUI6XSvbZu+uI7SMJ0IwscaHfwWPDs7E82jCPnnX8b/sEqOjTq2e/eJVq6I66MnDtILU+J+SyM/b5eG7xh3Yb2Lud1q06bWamTjHvbuW+2CXAIY9AnLEuBH6QWIlKmQpLMND/fS5TSfDtUOkK9W9Ly1ps4PZbHKhpGtW4069zAk08CCWTTV2gm2JFj73J/u9che5AWM9oh9ZjT4TkugGzFLKt5D+Q== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1757300718; c=relaxed/relaxed; bh=TSf4LdcuccY15AWDqLOy/deU51v50DfUIpULSVx41Mc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FP+2xoTenwjRLhMDphQQdVouR3FugDfFpuTpyNs1m6Ei4lGJp92dGuSV7JNRtM/Kgz3DBRWMTv24Pc4PYxolx4guGQR1PAf8AWoD+51pWM+zeLvngyGBoXeFayvrdGatbMPEfq9JRwmdVpoiqOVG4T1/MkkAGbPr3jtzv4MYDE1WjwKjhkdmvGamEoe/r3ZjW8GfQ77rPNcBdYoagbiWh4HWTpKHUepScCfLkahe1Dy30qLI4GG4jDvVhhOe66DOhd8Kd/Go5aIWpbucVGIL/3Cks+1ynrnmFpr++ZraQkVLAIWDZT7nDcyQWrL71oj9lNDBer/T91vSwHz7Jt7YcQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=jy1mY9f4; dkim-atps=neutral; spf=pass (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=haren@linux.ibm.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=jy1mY9f4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=haren@linux.ibm.com; receiver=lists.ozlabs.org) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4cKsJY3G8gz3054 for ; Mon, 8 Sep 2025 13:05:17 +1000 (AEST) Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 587MUAkx005342; Mon, 8 Sep 2025 03:05:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=TSf4LdcuccY15AWDq LOy/deU51v50DfUIpULSVx41Mc=; b=jy1mY9f4WMk6dZW7Pm5A46Ur9lRA+kSFl IbPe4JG+xwx9N12F1dt2XoXj708ay7p/ZU/0v8d6J+kq7PJThj5M39n92p7ma0IN IkTnPktnA96n+666c9QqSagWfR3HRm/qYh48l1FvACn+LZJJmIsSwOK5vDstYRHd sLa1jrcRRp5hvFC2mjwIry2QJNE+4045qmOnwEWPSm1rILl6JV01C6/aRrGdFGwB G8hHHOkYPgLCjYFcPB+gp7TXsU8KRxcIhSjzSwWt2VqPNFsSr3rWMSupKRBUpNMD mpU/K1Ze4ZkEm3hzdHcnnIyBSJPw4JMA+pNMpNPUOBN/o48NSwiOw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 490uke48bs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Sep 2025 03:05:07 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 58831BfU013873; Mon, 8 Sep 2025 03:05:07 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 490uke48bq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Sep 2025 03:05:07 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5881TZEB001198; Mon, 8 Sep 2025 03:05:06 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4912033r1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Sep 2025 03:05:06 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 588354PC1639130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Sep 2025 03:05:04 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5086758055; Mon, 8 Sep 2025 03:05:04 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 286515805B; Mon, 8 Sep 2025 03:05:03 +0000 (GMT) Received: from li-4c4c4544-0038-3410-8038-c4c04f423534.ibm.com (unknown [9.61.139.105]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 8 Sep 2025 03:05:03 +0000 (GMT) From: Haren Myneni To: linuxppc-dev@lists.ozlabs.org Cc: maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, msuchanek@suse.de, mahesh@linux.ibm.com, tyreld@linux.ibm.com, hbabu@us.ibm.com, haren@linux.ibm.com, shashank.gowda@in.ibm.com, bjking1@linux.ibm.com Subject: [PATCH v6 1/9] powerpc/pseries: Define papr-hvpipe ioctl Date: Sun, 7 Sep 2025 20:04:49 -0700 Message-ID: <20250908030458.1139163-2-haren@linux.ibm.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250908030458.1139163-1-haren@linux.ibm.com> References: <20250908030458.1139163-1-haren@linux.ibm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTA2MDE5NSBTYWx0ZWRfX5lSHYMgRdLfH nepD+D2CQqffkgzdLR9NElZnFJlryINlVQ5RqyB26rSDbleTw+7PvgfUJqrb7D+rhRuUNL9R9ut SnWbycKwS5jtlyHqGAsiIdqIRcW9fK7RmX3H797Ucd8K+PqEedM8F3Nuwc822B6sfjcTeEl/Tiy fBMFzzRcve7FIDqTBS6q4qXTvc+/IFIAfknFqENRv3+6e9uIO79YzAyl9sFqBNwJ0sAilN5ZPL0 HW1BwxTQhhzXBjfNN7r7yHhIaRcsrxrA9JvzkC0X6puaIvJDaxi1n6M0xtkFipVY9injwoaTEfJ C6TTAcInTDcmjfbkAPkeURoRPwJh3xXr9yuQR4DpdvG0Zegy5XKKku3hGghNXyu4aQSnhOFyQKT PQMMlOJl X-Proofpoint-ORIG-GUID: VZ9fRo5Rbh2ZWo4_P0tdzB4lBRvzZ8Vg X-Proofpoint-GUID: m5fRw5UX0z-MUoUszbemlzRitxpQHwHN X-Authority-Analysis: v=2.4 cv=StCQ6OO0 c=1 sm=1 tr=0 ts=68be47e4 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=yJojWOMRYYMA:10 a=VnNF1IyMAAAA:8 a=voM4FWlXAAAA:8 a=VwQbUJbxAAAA:8 a=GD8v1-097_rLXb-cXwoA:9 a=IC2XNlieTeVoXbcui8wp:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-07_10,2025-09-04_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509060195 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 Reviewed-by: Mahesh Salgaonkar Reviewed-by: Tyrel Datwyler Tested-by: Shashank MS --- .../userspace-api/ioctl/ioctl-number.rst | 2 ++ arch/powerpc/include/uapi/asm/papr-hvpipe.h | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 arch/powerpc/include/uapi/asm/papr-hvpipe.h diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index 406a9f4d0869..7c527a01d1cf 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -374,6 +374,8 @@ Code Seq# Include File Comments 0xB2 08 arch/powerpc/include/uapi/asm/papr-physical-attestation.h powerpc/pseries Physical Attestation API +0xB2 09 arch/powerpc/include/uapi/asm/papr-hvpipe.h powerpc/pseries HVPIPE API + 0xB3 00 linux/mmc/ioctl.h 0xB4 00-0F linux/gpio.h 0xB5 00-0F uapi/linux/rpmsg.h diff --git a/arch/powerpc/include/uapi/asm/papr-hvpipe.h b/arch/powerpc/include/uapi/asm/papr-hvpipe.h new file mode 100644 index 000000000000..459a7bb0e6c9 --- /dev/null +++ b/arch/powerpc/include/uapi/asm/papr-hvpipe.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI_PAPR_HVPIPE_H_ +#define _UAPI_PAPR_HVPIPE_H_ + +#include +#include +#include + +/* + * This header is included in payload between OS and the user + * space. + * flags: OS notifies the user space whether the hvpipe is + * closed or the buffer has the payload. + */ +struct papr_hvpipe_hdr { + u8 version; + u8 reserved[3]; + u32 flags; + u8 reserved2[40]; +}; + +/* + * ioctl for /dev/papr-hvpipe + */ +#define PAPR_HVPIPE_IOC_CREATE_HANDLE _IOW(PAPR_MISCDEV_IOC_ID, 9, __u32) + +/* + * hvpipe_hdr flags used for read() + */ +#define HVPIPE_MSG_AVAILABLE 0x01 /* Payload is available */ +#define HVPIPE_LOST_CONNECTION 0x02 /* Pipe connection is closed/unavailable */ + +#endif /* _UAPI_PAPR_HVPIPE_H_ */ -- 2.50.1