Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3002930rwi; Tue, 1 Nov 2022 14:40:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5GoCq5EiVENd0lZXBmY78rn3JVhUcPsz/eWel/rJELXI9nQ3LL2o8czYhwD/a9J5MVb6kv X-Received: by 2002:a17:907:7637:b0:7ad:b869:2cc7 with SMTP id jy23-20020a170907763700b007adb8692cc7mr17179888ejc.159.1667338826589; Tue, 01 Nov 2022 14:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667338826; cv=none; d=google.com; s=arc-20160816; b=irdLO/4DJRFb4f0fUwK205FGsIyn9RDwVs6b7DvbO+XtCNRk2IH1L4aHJ4obBELeIm vCc8qk+mu1No/WgVl92LDtEKEuI5gUsO1su9Bx2e2UzXiohrlGMt/C0wJ2kI83ceVf6I OU5FrrPgkpHPtehtau+qlgQ0MF9i1JBrsLJsWJqsUM7lT3AvBahdXtE0+gPsjaha2Gkb 9XjEj+nV2Md90BOG8A9zEwHOZ+U2ETF2Ijp81IX+RGB9By/Y/taK7ox5BhJWyUAt+gaV fxdNW4cREzLSita0heDFZJZ4U+x773edHXJ2ElYbDkFeG3HZSjS5ZMmddyr+WX50VlKm uS/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=vq8w5J8ZljgRouLDat6E82i5n2WY0T1CLVf69PaTsHk=; b=WO26x+RjefS2x3HoPdJIrT6iq8ALHheG1XeeJib/PvSgUgVVYkRVg80DAU9JaSZTDH zWEU+nbdcWHaE1cbm6V6m4ZB4/tyQw5P7VyCUK2Jv67FJWYeb12tCYC3i/EaKVbLsmy8 Qe+LuoQeG06VmsEPzVa7hKj1fI9rKifJhAIRMzktNX/FUD9BDJMEwYfvKFRYOSmybyAK Ggbpgj13YC6sdxkKcz0dYOuRiAgq0O+5D0NtpCl7SeeYmgAIGq7X0Z69f9gU3I4LHI8K qREIl+rcX/VgGVujqWCdxg1Rx2+QvGIcOoHpQVBeIL/deQL+C7Dkqi5rvCLIMKxsTfv4 HwMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=GNZDuxvE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a50d502000000b004615bae2376si12311906edi.147.2022.11.01.14.40.03; Tue, 01 Nov 2022 14:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=GNZDuxvE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbiKAUfr (ORCPT + 96 others); Tue, 1 Nov 2022 16:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiKAUfp (ORCPT ); Tue, 1 Nov 2022 16:35:45 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF3712772; Tue, 1 Nov 2022 13:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1667334945; x=1698870945; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=vq8w5J8ZljgRouLDat6E82i5n2WY0T1CLVf69PaTsHk=; b=GNZDuxvERjCyicXQf6DyRn6LZ3QsUzqreq0KHjYqtDOtpE+bDWxMK3qi /FjSNPB18TAOzVVZ0+tZ4TvhlxBICltoMfMMLDMMx/GBjG+BTEhx4eRdu d8ljSL9ENxpSsCGm9/7d6t1BQlgScWY6favRl7U3hG806hFO9BJseMK87 A=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 01 Nov 2022 13:35:44 -0700 X-QCInternal: smtphost Received: from nasanex01b.na.qualcomm.com ([10.46.141.250]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2022 13:35:44 -0700 Received: from [10.134.65.5] (10.80.80.8) 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.986.29; Tue, 1 Nov 2022 13:35:43 -0700 Message-ID: <4cb58489-cd42-1868-9add-0c360065de23@quicinc.com> Date: Tue, 1 Nov 2022 13:35:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v6 02/21] dt-bindings: Add binding for gunyah hypervisor To: Jassi Brar CC: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Murali Nalajala , Trilok Soni , "Srivatsa Vaddagiri" , Carl van Schaik , Prakruthi Deepak Heragu , Andy Gross , Dmitry Baryshkov , , "Mark Rutland" , Lorenzo Pieralisi , Sudeep Holla , "Marc Zyngier" , Jonathan Corbet , Will Deacon , Catalin Marinas , Arnd Bergmann , Greg Kroah-Hartman , "Srinivas Kandagatla" , Amol Maheshwari , Kalle Valo , , , , References: <20221026185846.3983888-1-quic_eberman@quicinc.com> <20221026185846.3983888-3-quic_eberman@quicinc.com> Content-Language: en-US From: Elliot Berman In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/1/2022 9:23 AM, Jassi Brar wrote: > On Mon, Oct 31, 2022 at 10:20 PM Elliot Berman wrote: >> >> Hi Jassi, >> >> On 10/27/2022 7:33 PM, Jassi Brar wrote: >> > On Wed, Oct 26, 2022 at 1:59 PM Elliot Berman >> wrote: >> > ..... >> >> + >> >> + gunyah-resource-mgr@0 { >> >> + compatible = "gunyah-resource-manager-1-0", >> "gunyah-resource-manager"; >> >> + interrupts = , /* TX >> full IRQ */ >> >> + ; /* RX >> empty IRQ */ >> >> + reg = <0x00000000 0x00000000>, <0x00000000 0x00000001>; >> >> + /* TX, RX cap ids */ >> >> + }; >> >> >> > All these resources are used only by the mailbox controller driver. >> > So, this should be the mailbox controller node, rather than the >> > mailbox user.> One option is to load gunyah-resource-manager as a >> module that relies >> > on the gunyah-mailbox provider. That would also avoid the "Allow >> > direct registration to a channel" hack patch. >> >> A message queue to another guest VM wouldn't be known at boot time and >> thus couldn't be described on the devicetree. >> > I think you need to implement of_xlate() ... or please tell me what > exactly you need to specify in the dt. Dynamically created virtual machines can't be known on the dt, so there is nothing to specify in the DT. There couldn't be a devicetree node for the message queue client because that client is only exists once the VM is created by userspace. As a more concrete example, there is QRTR (net/qrtr) virtualization support which is implemented with Gunyah message queues. Whether a QRTR client needs to be for VM is only determined when launching the VM as well as which message queue resource the QRTR client should be using. Since many VMs could be running on a system, it's not possible to know the number of mailbox controllers (i.e. message queues) nor the number of mailbox clients (e.g. QRTR) as a static configuration in the DT. Thanks, Elliot