bindings: Adding bindings to support vm on Sun

Adding bindings to support vm on Sun.

This is snapshot of bindings from 'commit 999a92cd8b38
("Merge "ARM: dts: qcom: Add platform support for VMs on
Cliffs"")' from device tree project msm-6.1 branch.

Change-Id: I47eda741b3451d38d215f7d95505a2bb4dd86565
Signed-off-by: Meena Pasumarthi <quic_pasumart@quicinc.com>
Signed-off-by: Sahitya Tummala <quic_stummala@quicinc.com>
This commit is contained in:
Meena Pasumarthi
2023-09-19 14:32:48 +05:30
committed by Sahitya Tummala
parent 8e96b50796
commit 784b6afca3
10 changed files with 552 additions and 0 deletions

View File

@@ -0,0 +1,178 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gunyah/qcom,hypervisor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Hypervisor node to define virtual devices and other services.
maintainers:
- Murali Nalajala <quic_mnalajal@quicinc.com>
description: |+
Top-level node named /hypervisor that describes virtual devices and other
services.
properties:
compatible:
oneOf:
items:
- const: qcom,gunyah-hypervisor-1.0
- const: qcom,gunyah-hypervisor
properties:
"#address-cells":
const: 2
"#size-cells":
description: must be 0, because capability IDs are not memory address
ranges and do not have a size.
const: 0
required:
- compatible
- "#address-cells"
- "#size-cells"
description: |+
The VM Identification is a virtual node that conveys to the VM information
about itself in the context of the hypervisor-based system and may be
present as a child of the /hypervisor node
properties:
compatible:
oneOf:
description: |+
Must contain the VM-ID compatible string, which is provisionally
specified as "qcom,gunyah-vm-id". This should be preceded by
a string that specifies the VM ID API version, which is currently
1.0, thus "qcom,gunyah-vm-id-1.0".
items:
- const: qcom,gunyah-vm-id-1.0
- const: qcom,gunyah-vm-id
properties:
qcom,vendor:
description: must contain the VM vendor string, for example: "Qualcomm Technologies, Inc.".
$ref: /schemas/types.yaml#/definitions/string
qcom,vmid:
$ref: /schemas/types.yaml#/definitions/uint32
description: must contain the hypervisor VMID of the VM, as
a 32-bit value
qcom,owner-vmid:
$ref: /schemas/types.yaml#/definitions/uint32
description: Contains the hypervisor VMID of the VMs owner. The owner
is the VM that allocated and created the VM. VMs directly
managed by the resource manager, such as the HLOS do not
have an owner.
qcom,image-name:
$ref: /schemas/types.yaml#/definitions/string
description: contains the VM image name string.
qcom,swid:
$ref: /schemas/types.yaml#/definitions/uint32
description: must contain the Qualcomm Technologies, Inc. PIL software ID value.
required:
- compatible
- qcom,vmid
- qcom,owner-vmid
description: |+
Resource Manager node which is required to communicate to Resource
Manager VM using RM Message Queues.
properties:
compatible:
oneOf:
description:
The resource manager RPC communicate link is required to be in the
device-tree of a VM at boot, without it, a VM may be unable to
communicate with the Resource Manager. Resource Manager VM can
support implementation of various versions i.e 1.0 or 2.0
items:
- const: qcom,resource-manager-1-0
- const: qcom,resource-manager
- const: qcom,gunyah-message-queue
- const: qcom,haven-capability
interrupts:
maxItems: 2
reg:
maxItems: 2
qcom,is-full-duplex:
$ref: /schemas/types.yaml#/definitions/flag
description: This node is a pair of message queues i.e. Tx and Rx
qcom,tx-message-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum message size in bytes, >= 240 bytes for RM IPC
qcom,tx-queue-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description: depth(size) of transmit queue in hypervisor
qcom,rx-message-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum message size in bytes, >= 240 bytes for RM IPC
qcom,rx-queue-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description: depth(size) of receive queue in hypervisor
qcom,console-dev:
$ref: /schemas/types.yaml#/definitions/flag
description: if set, the resource-manger will accept console logs
from the VM
qcom,free-irq-start:
$ref: /schemas/types.yaml#/definitions/uint32
description: first VIRQ number which is free for virtual interrupt
use. Here SPI 0 = VIRQ 32.
required:
- compatible
- interrupts
- reg
- qcom,is-full-duplex
examples:
- |
hypervisor {
#address-cells = <2>;
#size-cells = <0>;
compatible = "qcom,gunyah-hypervisor-1.0", "qcom,gunyah-hypervisor",
"simple-bus";
name = "hypervisor";
qcom,gunyah-vm {
compatible = "qcom,gunyah-vm-id-1.0", "qcom,gunyah-vm-id";
qcom,vendor = "Qualcomm Technologies, Inc.";
qcom,vmid = <45>;
qcom,owner-vmid = <3>;
};
qcom,resource-manager-rpc@0000000000000001 {
compatible = "qcom,resource-manager-1-0", "qcom,resource-manager",
"qcom,gunyah-message-queue", "qcom,haven-capability";
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 */
qcom,is-full-duplex;
qcom,free-irq-start = <0>;
qcom,tx-queue-depth = <8>;
qcom,tx-message-size = <0xf0>;
qcom,rx-queue-depth = <8>;
qcom,rx-message-size = <0xf0>;
};
};

View File

@@ -0,0 +1,53 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gunyah/virtio_backend.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtio backend device for Gunyah hypervisor
maintainers:
- Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>
- Sreenad Menon <quic_sreemeno@quicinc.com>
description: |+
Configuration properties for Virtio backend device. This device is
specific to virtio support found in Gunyah hypervisor. The
device helps a virtio backend driver in one Virtual Machine
establish connection with its frontend counterpart in another Virtual
Machine, with both VMs running on Gunyah hypervisor.
properties:
compatible:
oneOf:
- const: qcom,virtio_backend
qcom,vm:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Handle to node that describes common properties of a VM to which this
device belongs.
qcom,label:
$ref: '/schemas/types.yaml#/definitions/uint32'
description:
Unique label associated with the device. This label is used to identify
the right device which is the target of ioctl() calls.
required:
- compatible
- qcom,vm
- qcom,label
example:
- |
trustedvm: trustedvm@0 {
reg = <0x0 0xdff00000 0x0 100000>;
vm_name = "trustedvm";
};
virtio_backend@0 {
compatible = "qcom,virtio_backend";
qcom,vm = <&trustedvm>;
qcom,label = <0x10200>;
};

90
bindings/gunyah/vm.yaml Normal file
View File

@@ -0,0 +1,90 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/gunyah/vm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual Machine (VM) Configuration
maintainers:
- Venkata Narendra Kumar Gutta <quic_vgutta@quicinc.com>
- Murali Nalajala <quic_mnalajal@quicinc.com>
description: |+
Configuration properties for Virtual Machines. This configuration
is used by virtual machine manager and know about various
properties of VM before it launch the virtual machine
properties:
compatible:
oneOf:
- const: qcom,vm-1.0
vm-type:
description: type of virtual machine e.g aarch64, x86 etc
oneOf:
- const: aarch64-guest
boot-config:
oneOf:
- const: fdt,unified
os-type:
description: Type of the operating system being used in virtual machine
oneOf:
- const: linux
kernel-entry-segment:
$ref: /schemas/types.yaml#/definitions/string-array
kernel-entry-offset:
$ref: '/schemas/types.yaml#/definitions/uint64'
vendor:
$ref: /schemas/types.yaml#/definitions/string-array
image-name:
$ref: /schemas/types.yaml#/definitions/string-array
qcom,pasid:
$ref: '/schemas/types.yaml#/definitions/uint64'
memory:
properties:
"#address-cells":
const: 2
"#size-cells":
const: 2
base-address:
description: Base address of the memory for virtual machine
maxItems: 2
size-min:
description: Size of the memory that is being used by the virtual machine
maxItems: 2
segments:
properties:
kernel:
maxItems: 4
description: Load location offset of the kernel
dt:
maxItems: 4
description: Load location offset of devicetree
vcpus:
properties:
config
affinity
affinity-map
interrupts:
properties:
config
vdevices:
properties:
peer-default
required:
- compatible
- image_to_be_loaded