diff mbox series

[v1,2/6] dt-bindings: hypervisor: Add binding for MediaTek GenieZone hypervisor

Message ID 20230413090735.4182-3-yi-de.wu@mediatek.com
State New
Headers show
Series GenieZone hypervisor drivers | expand

Commit Message

Yi-De Wu April 13, 2023, 9:07 a.m. UTC
From: "Yingshiuan Pan" <yingshiuan.pan@mediatek.com>

Add documentation for GenieZone(gzvm) node. This node informs gzvm
driver to start probing if geniezone hypervisor is available and
able to do virtual machine operations.

Signed-off-by: Yingshiuan Pan <yingshiuan.pan@mediatek.com>
Signed-off-by: Yi-De Wu <yi-de.wu@mediatek.com>
---
 .../bindings/hypervisor/mediatek,gzvm.yaml    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml

Comments

Yi-De Wu April 14, 2023, 8:35 a.m. UTC | #1
On Thu, 2023-04-13 at 15:05 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 13/04/2023 11:07, Yi-De Wu wrote:
> > From: "Yingshiuan Pan" <yingshiuan.pan@mediatek.com>
> > 
> > Add documentation for GenieZone(gzvm) node. This node informs gzvm
> > driver to start probing if geniezone hypervisor is available and
> 
> Subject: drop second/last, redundant "binding for". The "dt-bindings"
> prefix is already stating that these are bindings.
> 
Thank you for the review comments. We would remove the "binding for"
wording in the subject on the next version.

> > able to do virtual machine operations.
> > 
> > Signed-off-by: Yingshiuan Pan <yingshiuan.pan@mediatek.com>
> > Signed-off-by: Yi-De Wu <yi-de.wu@mediatek.com>
> > ---
> >  .../bindings/hypervisor/mediatek,gzvm.yaml    | 30
> > +++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
> > b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
> > new file mode 100644
> > index 000000000000..35e1e5b18e47
> > --- /dev/null
> > +++
> > b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
> > @@ -0,0 +1,30 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: 
> > https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,gzvm.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmA3TPJSag$
> > +$schema: 
> > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmDSXil_Qw$
> > +
> > +title: MediaTek GenieZone hypervisor
> > +
> > +maintainers:
> > +  - Yingshiuan Pan <yingshiuan.pan@mediatek.com>
> > +
> > +description:
> > +  GenieZone is MediaTek proprietary hypervisor. This device node
> > informs its
> > +  driver, gzvm, to probe if platform supports running virtual
> > machines.
> 
> Do not describe Linux, we all know how driver binding works, but
> hardware/firmware/hypervisor.
> 
Noted. We would enhance the description on next version.

> I don't know if we actually want to support proprietary hypervisors.
> There can be hundreds of them, one per each SoC manufacturer, and
> they
> can come with many ridiculous ideas.
> 
MediaTek, as a partner of Android, our GenieZone hypervisor has been
one of the backend options under Android Virtualization Framework(AVF)
now.
Thus, we'd like to donate these patches for better supporting the
Linux/Android ecosystem.

Reference link: https://crosvm.dev/book/hypervisors.html#geniezone 

> > +
> > +properties:
> > +  compatible:
> > +    const: mediatek,gzvm
> > +
> > +required:
> > +  - compatible
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    hypervisor {
> > +        compatible = "mediatek,gzvm";
> > +        status = "okay";
> 
> Drop status.
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski April 14, 2023, 8:42 a.m. UTC | #2
On 14/04/2023 10:35, Yi-De Wu (吳一德) wrote:
>> I don't know if we actually want to support proprietary hypervisors.
>> There can be hundreds of them, one per each SoC manufacturer, and
>> they
>> can come with many ridiculous ideas.
>>
> MediaTek, as a partner of Android, our GenieZone hypervisor has been
> one of the backend options under Android Virtualization Framework(AVF)
> now.
> Thus, we'd like to donate these patches for better supporting the
> Linux/Android ecosystem.

If it is proprietary, I don't have much interests in it. Make it
open-source. :)

Best regards,
Krzysztof
Matthias Brugger April 14, 2023, 3:29 p.m. UTC | #3
On 14/04/2023 10:35, Yi-De Wu (吳一德) wrote:
> On Thu, 2023-04-13 at 15:05 +0200, Krzysztof Kozlowski wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>>
>> On 13/04/2023 11:07, Yi-De Wu wrote:
>>> From: "Yingshiuan Pan" <yingshiuan.pan@mediatek.com>
>>>
>>> Add documentation for GenieZone(gzvm) node. This node informs gzvm
>>> driver to start probing if geniezone hypervisor is available and
>>
>> Subject: drop second/last, redundant "binding for". The "dt-bindings"
>> prefix is already stating that these are bindings.
>>
> Thank you for the review comments. We would remove the "binding for"
> wording in the subject on the next version.
> 
>>> able to do virtual machine operations.
>>>
>>> Signed-off-by: Yingshiuan Pan <yingshiuan.pan@mediatek.com>
>>> Signed-off-by: Yi-De Wu <yi-de.wu@mediatek.com>
>>> ---
>>>   .../bindings/hypervisor/mediatek,gzvm.yaml    | 30
>>> +++++++++++++++++++
>>>   1 file changed, 30 insertions(+)
>>>   create mode 100644
>>> Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
>>> b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
>>> new file mode 100644
>>> index 000000000000..35e1e5b18e47
>>> --- /dev/null
>>> +++
>>> b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
>>> @@ -0,0 +1,30 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id:
>>> https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,gzvm.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmA3TPJSag$
>>> +$schema:
>>> https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmDSXil_Qw$
>>> +
>>> +title: MediaTek GenieZone hypervisor
>>> +
>>> +maintainers:
>>> +  - Yingshiuan Pan <yingshiuan.pan@mediatek.com>
>>> +
>>> +description:
>>> +  GenieZone is MediaTek proprietary hypervisor. This device node
>>> informs its
>>> +  driver, gzvm, to probe if platform supports running virtual
>>> machines.
>>
>> Do not describe Linux, we all know how driver binding works, but
>> hardware/firmware/hypervisor.
>>
> Noted. We would enhance the description on next version.
> 
>> I don't know if we actually want to support proprietary hypervisors.
>> There can be hundreds of them, one per each SoC manufacturer, and
>> they
>> can come with many ridiculous ideas.
>>
> MediaTek, as a partner of Android, our GenieZone hypervisor has been
> one of the backend options under Android Virtualization Framework(AVF)
> now.
> Thus, we'd like to donate these patches for better supporting the
> Linux/Android ecosystem.
> 
> Reference link: https://crosvm.dev/book/hypervisors.html#geniezone
> 

What is the difference between geniezone and gunyah? Why will we need both of 
them? Couldn't we just get one hypervisor implementation merged that includes 
all the needed features. In the end it will be used with the same VMM.

Regards,
Matthias

>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: mediatek,gzvm
>>> +
>>> +required:
>>> +  - compatible
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    hypervisor {
>>> +        compatible = "mediatek,gzvm";
>>> +        status = "okay";
>>
>> Drop status.
>>
>> Best regards,
>> Krzysztof
>>
Yi-De Wu May 12, 2023, 7:52 a.m. UTC | #4
On Fri, 2023-04-14 at 10:42 +0200, Krzysztof Kozlowski wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 14/04/2023 10:35, Yi-De Wu (吳一德) wrote:
> > > I don't know if we actually want to support proprietary
> > > hypervisors.
> > > There can be hundreds of them, one per each SoC manufacturer, and
> > > they
> > > can come with many ridiculous ideas.
> > > 
> > 
> > MediaTek, as a partner of Android, our GenieZone hypervisor has
> > been
> > one of the backend options under Android Virtualization
> > Framework(AVF)
> > now.
> > Thus, we'd like to donate these patches for better supporting the
> > Linux/Android ecosystem.
> 
> If it is proprietary, I don't have much interests in it. Make it
> open-source. :)
> 
> Best regards,
> Krzysztof
> 
I'm sorry it's hard for us to open source right away. We tend to
elaborate more on our design in the documentation and make it more
transparent to the public and reviewers.
Yi-De Wu May 12, 2023, 7:52 a.m. UTC | #5
On Fri, 2023-04-14 at 17:29 +0200, Matthias Brugger wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 14/04/2023 10:35, Yi-De Wu (吳一德) wrote:
> > On Thu, 2023-04-13 at 15:05 +0200, Krzysztof Kozlowski wrote:
> > > External email : Please do not click links or open attachments
> > > until
> > > you have verified the sender or the content.
> > > 
> > > 
> > > On 13/04/2023 11:07, Yi-De Wu wrote:
> > > > From: "Yingshiuan Pan" <yingshiuan.pan@mediatek.com>
> > > > 
> > > > Add documentation for GenieZone(gzvm) node. This node informs
> > > > gzvm
> > > > driver to start probing if geniezone hypervisor is available
> > > > and
> > > 
> > > Subject: drop second/last, redundant "binding for". The "dt-
> > > bindings"
> > > prefix is already stating that these are bindings.
> > > 
> > 
> > Thank you for the review comments. We would remove the "binding
> > for"
> > wording in the subject on the next version.
> > 
> > > > able to do virtual machine operations.
> > > > 
> > > > Signed-off-by: Yingshiuan Pan <yingshiuan.pan@mediatek.com>
> > > > Signed-off-by: Yi-De Wu <yi-de.wu@mediatek.com>
> > > > ---
> > > >   .../bindings/hypervisor/mediatek,gzvm.yaml    | 30
> > > > +++++++++++++++++++
> > > >   1 file changed, 30 insertions(+)
> > > >   create mode 100644
> > > > Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.ya
> > > > ml
> > > > b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.ya
> > > > ml
> > > > new file mode 100644
> > > > index 000000000000..35e1e5b18e47
> > > > --- /dev/null
> > > > +++
> > > > b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.ya
> > > > ml
> > > > @@ -0,0 +1,30 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id:
> > > > 
https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,gzvm.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmA3TPJSag$
> > > > +$schema:
> > > > 
https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!lp4d4WBp26cpOeEGcKn_aHcNGfyl1Y--BYzfR8oR_0Xzr9TLvUELfOQAAdqHlLIOra1W_QdjVSJv0-HMpLesJmDSXil_Qw$
> > > > +
> > > > +title: MediaTek GenieZone hypervisor
> > > > +
> > > > +maintainers:
> > > > +  - Yingshiuan Pan <yingshiuan.pan@mediatek.com>
> > > > +
> > > > +description:
> > > > +  GenieZone is MediaTek proprietary hypervisor. This device
> > > > node
> > > > informs its
> > > > +  driver, gzvm, to probe if platform supports running virtual
> > > > machines.
> > > 
> > > Do not describe Linux, we all know how driver binding works, but
> > > hardware/firmware/hypervisor.
> > > 
> > 
> > Noted. We would enhance the description on next version.
> > 
> > > I don't know if we actually want to support proprietary
> > > hypervisors.
> > > There can be hundreds of them, one per each SoC manufacturer, and
> > > they
> > > can come with many ridiculous ideas.
> > > 
> > 
> > MediaTek, as a partner of Android, our GenieZone hypervisor has
> > been
> > one of the backend options under Android Virtualization
> > Framework(AVF)
> > now.
> > Thus, we'd like to donate these patches for better supporting the
> > Linux/Android ecosystem.
> > 
> > Reference link: 
> > https://urldefense.com/v3/__https://crosvm.dev/book/hypervisors.html*geniezone__;Iw!!CTRNKA9wMg0ARbw!n1sN15eKnG1M6mlcAb7UBi4hoIYmKsw2zlfdwO21thuHZuHYHHkHnZF9WWfp3xScXVha3mlbLVCUMGIo3OM6D8eI$
> > 
> 
> What is the difference between geniezone and gunyah? Why will we need
> both of
> them? Couldn't we just get one hypervisor implementation merged that
> includes
> all the needed features. In the end it will be used with the same
> VMM.
> 
> Regards,
> Matthias
> 

We might not be able to speak for Gunyah, but Gunyah and GenieZone are
quite different hypervisor implementations in various aspects such like
VM execution flow, semantics, UAPI...etc.

Still, we're open to dicussion if there's any proposal that provide a
unified interface among all the hypervisors.

> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    const: mediatek,gzvm
> > > > +
> > > > +required:
> > > > +  - compatible
> > > > +
> > > > +additionalProperties: false
> > > > +
> > > > +examples:
> > > > +  - |
> > > > +    hypervisor {
> > > > +        compatible = "mediatek,gzvm";
> > > > +        status = "okay";
> > > 
> > > Drop status.
> > > 
> > > Best regards,
> > > Krzysztof
> > >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
new file mode 100644
index 000000000000..35e1e5b18e47
--- /dev/null
+++ b/Documentation/devicetree/bindings/hypervisor/mediatek,gzvm.yaml
@@ -0,0 +1,30 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hypervisor/mediatek,gzvm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek GenieZone hypervisor
+
+maintainers:
+  - Yingshiuan Pan <yingshiuan.pan@mediatek.com>
+
+description:
+  GenieZone is MediaTek proprietary hypervisor. This device node informs its
+  driver, gzvm, to probe if platform supports running virtual machines.
+
+properties:
+  compatible:
+    const: mediatek,gzvm
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    hypervisor {
+        compatible = "mediatek,gzvm";
+        status = "okay";
+    };