On 11/1/2022 9:23 AM, Jassi Brar wrote:
On Mon, Oct 31, 2022 at 10:20 PM Elliot Berman <quic_eberman@xxxxxxxxxxx> wrote:
Hi Jassi,
On 10/27/2022 7:33 PM, Jassi Brar wrote:
> On Wed, Oct 26, 2022 at 1:59 PM Elliot Berman
<quic_eberman@xxxxxxxxxxx> wrote:
> .....
>> +
>> + gunyah-resource-mgr@0 {
>> + compatible = "gunyah-resource-manager-1-0",
"gunyah-resource-manager";
>> + interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>, /* TX
full IRQ */
>> + <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>; /* 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