Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp651119rdb; Thu, 22 Feb 2024 15:27:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWb3a5drwZFc+XZh90mmtQqU2H0FmRM6NOxK5ZvROdB8ZMSJiQ8soPGVJBWu/oP34anRri63SxaV3/psBxL11wGrljHZB0D6UyZnoaEGw== X-Google-Smtp-Source: AGHT+IFTyp93RoPck3CZVbJsX22yMPoNLOZZQZMhNgaYF9+K6FkhYFi+xIGihjl8EXJhu09IjjXb X-Received: by 2002:a05:6358:7f0f:b0:17b:5ed6:3db3 with SMTP id p15-20020a0563587f0f00b0017b5ed63db3mr316345rwn.12.1708644448126; Thu, 22 Feb 2024 15:27:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708644448; cv=pass; d=google.com; s=arc-20160816; b=hcNhbYC60tptsRuDe0UZTLP7LnI5jh5LgTCbHxe8uSucCiCvLEXtkPzan8YRTy9bRf vVCeOnGDjTBK+79DlEO/dFehHPv1KIhHrcRnwLUWdAd0KC96H4H7GT5Fx/PyKHcBZHOa DoN8Xn6Ahbjjw4ppKyeI3hdsODY10YDTswTaXqIosCOn1mEUbW7O5zGG6WQlxTRNYBPl iFIbdS7q5kHaw/Iw8f2QqmTCzGza8PTRhnTbCwoTK0hZmdgNRsk7lxx5Z4/JzpHUqu7Z XZmJjfNs0WzlcGOOIuA8MRWYfkVvKFhH7e4MMUkAU/OxSvOIr0JK39dPoNA7diS0XGtg GCPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=oWnghs7sEsHkez39tQquVTv8CCRTmJHz664b/mA4aIY=; fh=7zGUZI8o+faw/EP23+TMfHconvCe6/i99ctwc9fzJrw=; b=A85vRWEIp92E5IiCvUyCeDtp15TL4NdOiI9dcX647kaM6SVx4A81o5TF80c5GAVRKn 0I83JcFJhVfA+XwIxWOTrhhJ/esIgR6FpK27SsAYVS/aLfFaZWhT22iL0Z/lkUfENXNb PNtaF8rRA2EloQkpft2IdbhHvumAN5HvEnaeDz1/8WqeTkvx/tlbrsSQAA5i4aoTR6MN DwdKmNVWL7nOBF4WbjVsW64GCUrkSLrbGxUFCGjl6r8oXVLKmsOV2fRgmZHIJrRkmSxf xYx3T/Z193AWVtugQnEOiFVF02lzgMR2iDU+Uzw7GmR5oRpu/LRwzvgujF7VJpYWXftJ ZKHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jpuNQvcn; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-77527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x22-20020a63b216000000b005dbf27229edsi11021181pge.290.2024.02.22.15.27.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 15:27:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jpuNQvcn; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-77527-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77527-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2EDD6B249AB for ; Thu, 22 Feb 2024 23:26:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F81C15A48A; Thu, 22 Feb 2024 23:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jpuNQvcn" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B277225AF; Thu, 22 Feb 2024 23:17:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708643869; cv=none; b=a19ayu3Zp971XReBwjH94FmvjlUov5D5ji/q9HSG9IZK0FfbCvfCx+G2ofYDCBUqPktJAgm/J30HvMXdpHCEbuYzv0jklwbWPXCX08p1/KQOxVewNQepiiHQncBPmQH6QtN4IqKThbmbeEBxmv6KKSSglzTotLYzsWaCwr6Yfn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708643869; c=relaxed/simple; bh=1r+/sBWiV/vj/CTIIWq2k1yHM4Xtu1RQrX8BbHT8utY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=i+8NQc5ryYmd5sJk4ozuCzyqAnsJ7zQmonVc/0mh1LDj+9yiosjBLi86koU5bIrG4wBBylVTIa80A8ReTmu1Xk5T3lsmDfuYlexUoMRfJlj/UhfoR99rkdniatein870dv+dyEVnGXRIuACm3svulUX9g/Lv5m3jDHqJbqefIHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=jpuNQvcn; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41MLm2Yd008649; Thu, 22 Feb 2024 23:16:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=oWnghs7sEsHkez39tQquVTv8CCRTmJHz664b/mA4aIY =; b=jpuNQvcnyJPwtVHp8e4pknykV3AH0Tq+yWjN+KZYz2iTOLpEOQ0QfV7wK9w U4AyUZce+Z8u/xR0LXfb4x2fASPNWSyomWv+txCrJr3mh8A8YVX5+Atk30WkvGKo bnC9nC85oV/2MdEguoI24gZ2Vfuzp6c2nOciqqp39wW8Mj1tqjdOwBLjc2aTZtL3 0SemDeNxUTWzxwwwnViXfKmpTmikWsTpxldC379ttWND9mSvdjbje3PISsaHDM55 L2y+hpsCkSjly9x3QQd/VTdUGMFf5PVhUJoBiHMT0xMDnRO+f+DpL/JalTXfVCgF 36IQg4UnCpXkb8c8o48UvwkbDVA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wdw13afvf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 23:16:29 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41MNGS2D017417 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Feb 2024 23:16:28 GMT Received: from hu-eberman-lv.qualcomm.com (10.49.16.6) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 22 Feb 2024 15:16:27 -0800 From: Elliot Berman Date: Thu, 22 Feb 2024 15:16:25 -0800 Subject: [PATCH v17 02/35] dt-bindings: Add binding for gunyah hypervisor Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20240222-gunyah-v17-2-1e9da6763d38@quicinc.com> References: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> In-Reply-To: <20240222-gunyah-v17-0-1e9da6763d38@quicinc.com> To: Alex Elder , Srinivas Kandagatla , Murali Nalajal , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Philip Derrin , Prakruthi Deepak Heragu , Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Konrad Dybcio , Bjorn Andersson , Dmitry Baryshkov , "Fuad Tabba" , Sean Christopherson , "Andrew Morton" CC: , , , , , , Elliot Berman , Rob Herring X-Mailer: b4 0.12.4 X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: B4jDgrHxuxRwopWHvIyZDMwv1ZmQ6FLi X-Proofpoint-GUID: B4jDgrHxuxRwopWHvIyZDMwv1ZmQ6FLi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_15,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 impostorscore=0 bulkscore=0 adultscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402220179 The Gunyah Resource Manager applies a devicetree overlay describing the virtual platform configuration of the guest VM, such as the message queue capability IDs for communicating with the Resource Manager. This information is not otherwise discoverable by a VM: the Gunyah hypervisor core does not provide a direct interface to discover capability IDs nor a way to communicate with RM without having already known the corresponding message queue capability ID. Add the DT bindings that Gunyah adheres for the hypervisor node and message queues. Reviewed-by: Rob Herring Signed-off-by: Elliot Berman --- .../bindings/firmware/gunyah-hypervisor.yaml | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml new file mode 100644 index 0000000000000..cdeb4885a8072 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/gunyah-hypervisor.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/firmware/gunyah-hypervisor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Gunyah Hypervisor + +maintainers: + - Prakruthi Deepak Heragu + - Elliot Berman + +description: |+ + Gunyah virtual machines use this information to determine the capability IDs + of the message queues used to communicate with the Gunyah Resource Manager. + See also: https://github.com/quic/gunyah-resource-manager/blob/develop/src/vm_creation/dto_construct.c + +properties: + compatible: + const: gunyah-hypervisor + + "#address-cells": + description: Number of cells needed to represent 64-bit capability IDs. + const: 2 + + "#size-cells": + description: must be 0, because capability IDs are not memory address + ranges and do not have a size. + const: 0 + +patternProperties: + "^gunyah-resource-mgr(@.*)?": + type: object + description: + Resource Manager node which is required to communicate to Resource + Manager VM using Gunyah Message Queues. + + properties: + compatible: + const: gunyah-resource-manager + + reg: + items: + - description: Gunyah capability ID of the TX message queue + - description: Gunyah capability ID of the RX message queue + + interrupts: + items: + - description: Interrupt for the TX message queue + - description: Interrupt for the RX message queue + + additionalProperties: false + + required: + - compatible + - reg + - interrupts + +additionalProperties: false + +required: + - compatible + - "#address-cells" + - "#size-cells" + +examples: + - | + #include + + hypervisor { + #address-cells = <2>; + #size-cells = <0>; + compatible = "gunyah-hypervisor"; + + gunyah-resource-mgr@0 { + compatible = "gunyah-resource-manager"; + interrupts = , /* TX allowed IRQ */ + ; /* RX requested IRQ */ + reg = <0x00000000 0x00000000>, /* TX capability ID */ + <0x00000000 0x00000001>; /* RX capability ID */ + }; + }; -- 2.34.1