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 3F68ACA0FF6 for ; Thu, 28 Aug 2025 23:09:23 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4cCcXf1r1Jz2yqc; Fri, 29 Aug 2025 09:09:06 +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=1756422546; cv=none; b=JMPJ4/WFa/ou5wmAPUBMnd9FZhunmwByYXjVV61Muw3H7DRvCmgWC2WX7Oi0qlOA49k3frcBRsIoO+Rq9lYrFsnx6SV99lAN45smqNHRWR2dSOObjjl4MWp6PfunIPjJmmQSFG8Diju+YW5bUuwdMC+lIz956QttlaGzCd/B8346Vn1qXTIb7jxfK763rDCXPlkF088OIV0AIw4D73ezx3Tx7nizDRzZEqa0U2i2kFK1/Wxb2bWFpoqVXBPxjFZFfLmMzbDptugbmBa7moygIYNGZSkrKJnbRyCaiveVupwYL2z/LuabT2q6hoGk8MMeJs93+4QFmcjMyPQfwV6WFw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1756422546; c=relaxed/relaxed; bh=LmpKCiyTpw3h0rvBMDvAdViCfZ70EtsGlXfuYZG8rVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QqVPi655afcla+PYB06khqk67sWKEt4AUhivTNMfPulYJnTjRJud+mdSXVzqBTo4RfP+ICXEKtFNCbJEOzUlNNruvv8ql+jeyr5U6hJ64o4HdCZ/CSlZiS/0eitdtzvmAo4Jr+p5uWw1TITnDUrmkBLEVMbmiEU+lUFVNEy+eGENdAex7wIcDvqj9rOkhDq7CrYM01SgvSX2MNsY0ivw1KghBll7oNKJADG2DhawDuv0CaK303jD/HH4ZhTgorOlpj8tPCaRf8l1kJAnAdrcn0YnKtrRdywtfiyMk6brWXsJYlTIxO8KAOY/S3OmwCB4VP18YZ+8aV9RgYNy+8bHOA== 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=PcG+OMEE; 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=PcG+OMEE; 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 4cCcXc42dmz2yqd for ; Fri, 29 Aug 2025 09:09:04 +1000 (AEST) Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 57SHDBEF001950; Thu, 28 Aug 2025 23:08:54 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=LmpKCiyTpw3h0rvBM DvAdViCfZ70EtsGlXfuYZG8rVc=; b=PcG+OMEEnUsLUi7l61hiiA5EuhsWSEjRt WkUSUNVyKGqmz6UsStfHtl1FR14iUnO2W3rKFRhyRAJPmFwwyNqRYWOZf/9d9tm3 KnMqTbNhGjiYQYvLZWxnm/Jp0z32PBrsgueJQXtx609eadMV7g3/wdS0QqzTCkhj NIyB33KjVhH9jHfV/Ne7qFnkzj3SFfeZtX2EPxIAZRJoXW07WHARFqlB8oHZccY9 /oqnOQuRumy/BaI7Dg/0CNnAJajOL7f6W+KAi+pSyiy9TmRAZ8sBlK2mOK7d653V hfaOJ1KGGvyg4n/1L3f3W77pvmFAi6GrZ1JMcfhQG9gfFGCKOIzVg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 48tuaj1bv7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Aug 2025 23:08:53 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.0.8) with ESMTP id 57SN6Wpm014876; Thu, 28 Aug 2025 23:08:53 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 48tuaj1bv5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Aug 2025 23:08:53 +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 57SMsI7e018021; Thu, 28 Aug 2025 23:08:52 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([172.16.1.6]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 48qtp3pxq1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Aug 2025 23:08:52 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 57SN8nQR29622916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Aug 2025 23:08:50 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD74158061; Thu, 28 Aug 2025 23:08:49 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C83B58068; Thu, 28 Aug 2025 23:08:49 +0000 (GMT) Received: from li-4c4c4544-0038-3410-8038-c4c04f423534.ibm.com (unknown [9.61.165.221]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 28 Aug 2025 23:08:48 +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 v3 1/9] powerpc/pseries: Define papr-hvpipe ioctl Date: Thu, 28 Aug 2025 16:08:35 -0700 Message-ID: <20250828230845.2291249-2-haren@linux.ibm.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250828230845.2291249-1-haren@linux.ibm.com> References: <20250828230845.2291249-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-GUID: gP6Nq2LDk06HMGWLWrP9HhY32uVfNVNm X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwODI4MDE0MCBTYWx0ZWRfXyfFPBZ35QegS F7n7u6zGZF9OFElMgUgxpAKaG/dNB/Bi9T5WaW9Cf8OKNsqK74j1MvDC8B616LlzKz8kTCP0AVT puLdENTYctCVq/TUUedYajl+dobGVwfws8s6g/68DXnYe+gwMjhJQmZ9N6iMn8OVSYOZFwHEHWY XtWQ1SoL9IojKiy0kpXpelPnWNzWOXamun8sZA1gOyRAiPIWNqAFBd6IPL1y7r09WvBB2Ral5tL b0WCa7MPXd/ZWWkuv1HFh0hVXEypivDc/Xz38saf5FPPz/IvYjv1yM20Ve4fehXckIM9bcgtDWY BACboW6Q4iV1PuSbbhNsf1lkKd5OLSPTppEyL2FUzNTOI9NsTxkT/bJHyJ+cTpoZdr2xB4M/jKh M2VwiMdi X-Authority-Analysis: v=2.4 cv=YfW95xRf c=1 sm=1 tr=0 ts=68b0e185 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=2OwXVqhp2XgA:10 a=VnNF1IyMAAAA:8 a=voM4FWlXAAAA:8 a=VwQbUJbxAAAA:8 a=GD8v1-097_rLXb-cXwoA:9 a=IC2XNlieTeVoXbcui8wp:22 X-Proofpoint-ORIG-GUID: udWSfobq_4SdbnLQri1UwxT31p51b9Ky X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-28_04,2025-08-28_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 bulkscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2508280140 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 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