[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240319143253.22317-4-sudanl@amazon.com>
Date: Tue, 19 Mar 2024 14:32:52 +0000
From: Sudan Landge <sudanl@...zon.com>
To: <tytso@....edu>, <Jason@...c4.com>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<sudanl@...zon.com>, <sathyanarayanan.kuppuswamy@...ux.intel.com>,
<thomas.lendacky@....com>, <dan.j.williams@...el.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <graf@...zon.de>, <dwmw@...zon.co.uk>, <bchalios@...zon.es>,
<xmarcalx@...zon.co.uk>
Subject: [PATCH v1 3/4] dt-bindings: Add bindings for vmgenid
Virtual Machine Generation ID driver was introduced in commit af6b54e2b5ba
("virt: vmgenid: notify RNG of VM fork and supply generation ID"), as an
ACPI only device.
Add a devicetree binding support for vmgenid so that hypervisors
can support vmgenid without the need to support ACPI.
Signed-off-by: Sudan Landge <sudanl@...zon.com>
---
.../devicetree/bindings/vmgenid/vmgenid.yaml | 57 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 58 insertions(+)
create mode 100644 Documentation/devicetree/bindings/vmgenid/vmgenid.yaml
diff --git a/Documentation/devicetree/bindings/vmgenid/vmgenid.yaml b/Documentation/devicetree/bindings/vmgenid/vmgenid.yaml
new file mode 100644
index 000000000000..17773aa96f8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/vmgenid/vmgenid.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/vmgenid/vmgenid.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Virtual Machine Generation Counter ID device.
+
+maintainers:
+ - Jason A. Donenfeld <Jason@...c4.com>
+
+description: |+
+ Firmwares or hypervisors can use this devicetree to describe
+ interrupts and the shared resources to inject a Virtual Machine Generation
+ counter.
+
+properties:
+ compatible:
+ const: linux,vmgenctr
+
+ "#interrupt-cells":
+ const: 3
+ description: |
+ The 1st cell is the interrupt type.
+ The 2nd cell contains the interrupt number for the interrupt type.
+ The 3rd cell is for trigger type and level flags.
+
+ interrupt-controller: true
+
+ reg:
+ description: |
+ specifies the base physical address and
+ size of the regions in memory which holds the VMGenID counter.
+ maxItems: 1
+
+ interrupts:
+ description: |
+ interrupt used to notify that a new VMGenID counter is available.
+ The interrupt should be Edge triggered.
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ vmgenid@...00000 {
+ compatible = "linux,vmgenctr";
+ reg = <0x80000000 0x1000>;
+ interrupts = <0x00 0x23 0x01>;
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index d818866d6d73..e602a51b9bd7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18359,6 +18359,7 @@ M: "Theodore Ts'o" <tytso@....edu>
M: Jason A. Donenfeld <Jason@...c4.com>
S: Maintained
T: git https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git
+F: Documentation/devicetree/bindings/vmgenid/vmgenid.yaml
F: drivers/char/random.c
F: drivers/virt/vmgenid.c
--
2.40.1
Powered by blists - more mailing lists