diff mbox series

[v2,2/7] dt-bindings: hypervisor: Add MediaTek GenieZone hypervisor

Message ID 20230428103622.18291-3-yi-de.wu@mediatek.com
State Changes Requested, archived
Headers show
Series GenieZone hypervisor drivers | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema fail build log

Commit Message

Yi-De Wu April 28, 2023, 10:36 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>
---
 .../hypervisor/mediatek,geniezone-hyp.yaml    | 31 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml

Comments

Rob Herring (Arm) April 28, 2023, 2:52 p.m. UTC | #1
On Fri, 28 Apr 2023 18:36:17 +0800, 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
> 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>
> ---
>  .../hypervisor/mediatek,geniezone-hyp.yaml    | 31 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 32 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/hypervisor/mediatek,geniezone-hyp.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230428103622.18291-3-yi-de.wu@mediatek.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Rob Herring (Arm) April 28, 2023, 9:24 p.m. UTC | #2
On Fri, Apr 28, 2023 at 06:36:17PM +0800, 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
> able to do virtual machine operations.

Why can't the driver just try and do virtual machine operations to see 
if the hypervisor is there? IOW, make your software interfaces 
discoverable. DT is for non-discoverable hardware.

Rob
Yi-De Wu May 12, 2023, 6:42 a.m. UTC | #3
On Fri, 2023-04-28 at 09:52 -0500, Rob Herring wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On Fri, 28 Apr 2023 18:36:17 +0800, 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
> > 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>
> > ---
> >  .../hypervisor/mediatek,geniezone-hyp.yaml    | 31
> > +++++++++++++++++++
> >  MAINTAINERS                                   |  1 +
> >  2 files changed, 32 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-
> > hyp.yaml
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m
> dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-
> hyp.yaml: $id: relative path/filename doesn't match actual path or
> filename
>         expected: 
> https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,geniezone-hyp.yaml*__;Iw!!CTRNKA9wMg0ARbw!joIOXbICM7UGvy3XBEJvfzSKO7s61efB87_NX5cqpUqpu5ot5cuzw50A8-8ledZT9_7ifsB2sKzxSD0$
> 
> doc reference errors (make refcheckdocs):
> 
> See 
> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230428103622.18291-3-yi-de.wu@mediatek.com
> 
> The base for the series is generally the latest rc1. A different
> dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up
> to
> date:
> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself.
> Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up
> checking
> your schema. However, it must be unset to test all examples with your
> schema.
> 

Noted, we've run the yaml check and we are going to re-submit the
latest version in v3.
Yi-De Wu May 12, 2023, 6:42 a.m. UTC | #4
On Fri, 2023-04-28 at 16:24 -0500, Rob Herring wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On Fri, Apr 28, 2023 at 06:36:17PM +0800, 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
> > able to do virtual machine operations.
> 
> Why can't the driver just try and do virtual machine operations to
> see
> if the hypervisor is there? IOW, make your software interfaces
> discoverable. DT is for non-discoverable hardware.
> 
> Rob

Can do, our hypervisor is discoverable through invoking probing
hypercall, and we use the device tree to prevent unnecessary module
loading on all systems.
Conor Dooley May 12, 2023, 11:01 a.m. UTC | #5
On Fri, May 12, 2023 at 06:42:51AM +0000, Yi-De Wu (吳一德) wrote:
> On Fri, 2023-04-28 at 16:24 -0500, Rob Herring wrote:
> > External email : Please do not click links or open attachments until
> > you have verified the sender or the content.
> > 
> > 
> > On Fri, Apr 28, 2023 at 06:36:17PM +0800, 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
> > > able to do virtual machine operations.
> > 
> > Why can't the driver just try and do virtual machine operations to
> > see
> > if the hypervisor is there? IOW, make your software interfaces
> > discoverable. DT is for non-discoverable hardware.
> > 
> > Rob
> 
> Can do, our hypervisor is discoverable through invoking probing
> hypercall, and we use the device tree to prevent unnecessary module
> loading on all systems.

Please do not wait until immediately prior to submitting version N+1
before replying to any of the comments on version N.
This creates a confusing scenario, where some review comments may be
missed due to parallel discussion.

Thanks,
Conor.
Trilok Soni May 12, 2023, 4:34 p.m. UTC | #6
On 5/11/2023 11:42 PM, Yi-De Wu (吳一德) wrote:
> On Fri, 2023-04-28 at 09:52 -0500, Rob Herring wrote:
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>> 
>> 
>> On Fri, 28 Apr 2023 18:36:17 +0800, 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
>> > 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>
>> > ---
>> >  .../hypervisor/mediatek,geniezone-hyp.yaml    | 31
>> > +++++++++++++++++++
>> >  MAINTAINERS                                   |  1 +
>> >  2 files changed, 32 insertions(+)
>> >  create mode 100644
>> > Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-
>> > hyp.yaml
>> > 
>> 
>> My bot found errors running 'make DT_CHECKER_FLAGS=-m
>> dt_binding_check'
>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>> 
>> yamllint warnings/errors:
>> 
>> dtschema/dtc warnings/errors:
>> ./Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-
>> hyp.yaml: $id: relative path/filename doesn't match actual path or
>> filename
>>         expected: 
>> https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,geniezone-hyp.yaml*__;Iw!!CTRNKA9wMg0ARbw!joIOXbICM7UGvy3XBEJvfzSKO7s61efB87_NX5cqpUqpu5ot5cuzw50A8-8ledZT9_7ifsB2sKzxSD0$
>> 
>> doc reference errors (make refcheckdocs):
>> 
>> See 
>> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230428103622.18291-3-yi-de.wu@mediatek.com
>> 
>> The base for the series is generally the latest rc1. A different
>> dependency
>> should be noted in *this* patch.
>> 
>> If you already ran 'make dt_binding_check' and didn't see the above
>> error(s), then make sure 'yamllint' is installed and dt-schema is up
>> to
>> date:
>> 
>> pip3 install dtschema --upgrade
>> 
>> Please check and re-submit after running the above command yourself.
>> Note
>> that DT_SCHEMA_FILES can be set to your schema file to speed up
>> checking
>> your schema. However, it must be unset to test all examples with your
>> schema.
>> 
> 
> Noted, we've run the yaml check and we are going to re-submit the
> latest version in v3.
> 
> ************* MEDIATEK Confidentiality Notice ********************
> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be
> conveyed only to the designated recipient(s). Any use, dissemination,
> distribution, printing, retaining or copying of this e-mail (including its
> attachments) by unintended recipient(s) is strictly prohibited and may
> be unlawful. If you are not an intended recipient of this e-mail, or believe
> that you have received this e-mail in error, please notify the sender
> immediately (by replying to this e-mail), delete any and all copies of
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!

Do you want us to reply w/ such a big confidentiality notice?
Yi-De Wu May 22, 2023, 3:28 a.m. UTC | #7
On Fri, 2023-05-12 at 12:01 +0100, Conor Dooley wrote:
> On Fri, May 12, 2023 at 06:42:51AM +0000, Yi-De Wu (吳一德) wrote:
> > On Fri, 2023-04-28 at 16:24 -0500, Rob Herring wrote:
> > > External email : Please do not click links or open attachments
> > > until
> > > you have verified the sender or the content.
> > > 
> > > 
> > > On Fri, Apr 28, 2023 at 06:36:17PM +0800, 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
> > > > able to do virtual machine operations.
> > > 
> > > Why can't the driver just try and do virtual machine operations
> > > to
> > > see
> > > if the hypervisor is there? IOW, make your software interfaces
> > > discoverable. DT is for non-discoverable hardware.
> > > 
> > > Rob
> > 
> > Can do, our hypervisor is discoverable through invoking probing
> > hypercall, and we use the device tree to prevent unnecessary module
> > loading on all systems.
> 
> Please do not wait until immediately prior to submitting version N+1
> before replying to any of the comments on version N.
> This creates a confusing scenario, where some review comments may be
> missed due to parallel discussion.
> 
> Thanks,
> Conor.
> 
Noted, we would stop updating newer version until there's some
consensus to do so.
Yi-De Wu May 22, 2023, 3:45 a.m. UTC | #8
On Fri, 2023-05-12 at 09:34 -0700, Trilok Soni wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 5/11/2023 11:42 PM, Yi-De Wu (吳一德) wrote:
> > On Fri, 2023-04-28 at 09:52 -0500, Rob Herring wrote:
> > > External email : Please do not click links or open attachments
> > > until
> > > you have verified the sender or the content.
> > > 
> > > 
> > > On Fri, 28 Apr 2023 18:36:17 +0800, 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
> > > > 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>
> > > > ---
> > > >  .../hypervisor/mediatek,geniezone-hyp.yaml    | 31
> > > > +++++++++++++++++++
> > > >  MAINTAINERS                                   |  1 +
> > > >  2 files changed, 32 insertions(+)
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/hypervisor/mediatek,geniezone
> > > > -
> > > > hyp.yaml
> > > > 
> > > 
> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m
> > > dt_binding_check'
> > > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> > > 
> > > yamllint warnings/errors:
> > > 
> > > dtschema/dtc warnings/errors:
> > > ./Documentation/devicetree/bindings/hypervisor/mediatek,geniezone
> > > -
> > > hyp.yaml: $id: relative path/filename doesn't match actual path
> > > or
> > > filename
> > >         expected:
> > > 
https://urldefense.com/v3/__http://devicetree.org/schemas/hypervisor/mediatek,geniezone-hyp.yaml*__;Iw!!CTRNKA9wMg0ARbw!joIOXbICM7UGvy3XBEJvfzSKO7s61efB87_NX5cqpUqpu5ot5cuzw50A8-8ledZT9_7ifsB2sKzxSD0$
> > > 
> > > doc reference errors (make refcheckdocs):
> > > 
> > > See
> > > 
https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230428103622.18291-3-yi-de.wu@mediatek.com
> > > 
> > > The base for the series is generally the latest rc1. A different
> > > dependency
> > > should be noted in *this* patch.
> > > 
> > > If you already ran 'make dt_binding_check' and didn't see the
> > > above
> > > error(s), then make sure 'yamllint' is installed and dt-schema is
> > > up
> > > to
> > > date:
> > > 
> > > pip3 install dtschema --upgrade
> > > 
> > > Please check and re-submit after running the above command
> > > yourself.
> > > Note
> > > that DT_SCHEMA_FILES can be set to your schema file to speed up
> > > checking
> > > your schema. However, it must be unset to test all examples with
> > > your
> > > schema.
> > > 
> > 
> > Noted, we've run the yaml check and we are going to re-submit the
> > latest version in v3.
> > 
> > ************* MEDIATEK Confidentiality Notice ********************
> > The information contained in this e-mail message (including any
> > attachments) may be confidential, proprietary, privileged, or
> > otherwise
> > exempt from disclosure under applicable laws. It is intended to be
> > conveyed only to the designated recipient(s). Any use,
> > dissemination,
> > distribution, printing, retaining or copying of this e-mail
> > (including its
> > attachments) by unintended recipient(s) is strictly prohibited and
> > may
> > be unlawful. If you are not an intended recipient of this e-mail,
> > or believe
> > that you have received this e-mail in error, please notify the
> > sender
> > immediately (by replying to this e-mail), delete any and all copies
> > of
> > this e-mail (including any attachments) from your system, and do
> > not
> > disclose the content of this e-mail to any other person. Thank you!
> 
> Do you want us to reply w/ such a big confidentiality notice?
> 

My apology to this mistake, our mail server wasn't configured properly.
We've added all related mailing list to our disclaimer-free bypassing
list to prevent such issues from happening again.
Yi-De Wu June 26, 2023, 9:05 a.m. UTC | #9
On Fri, 2023-05-12 at 14:42 +0800, Yi-De Wu wrote:
> On Fri, 2023-04-28 at 16:24 -0500, Rob Herring wrote:
> > External email : Please do not click links or open attachments
> > until
> > you have verified the sender or the content.
> > 
> > 
> > On Fri, Apr 28, 2023 at 06:36:17PM +0800, 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
> > > able to do virtual machine operations.
> > 
> > Why can't the driver just try and do virtual machine operations to
> > see
> > if the hypervisor is there? IOW, make your software interfaces
> > discoverable. DT is for non-discoverable hardware.
> > 
> > Rob
> 
> Can do, our hypervisor is discoverable through invoking probing
> hypercall, and we use the device tree to prevent unnecessary module
> loading on all systems.

hi Rob,

We'd like to continue with the argument whether to use dt here. As per
our previous discussion, we knew that dt is for non-discoverable
hardware. However, probing on all devices could possibly raise the
worries about polluting other users with redundant system overhead in
our v4 patches[1].

Are there any concerns from your side if we were to take the dt back in
v5 patches and keep it as simple as possible just to initialize our
hypervisor exclusively? Something similar to what we proposed
before[2].

Reference:
[1] 
https://lore.kernel.org/lkml/2fe0c7f9-55fc-ae63-3631-8526a0212ccd@linaro.org/
[2] 
https://android-review.googlesource.com/c/kernel/common/+/2447547/1..2/drivers/virt/geniezone/gzvm_main.c#b112

Regards,
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml b/Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml
new file mode 100644
index 000000000000..9dc0831cf175
--- /dev/null
+++ b/Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml
@@ -0,0 +1,31 @@ 
+# 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:
+  This interface is designed for integrating GenieZone hypervisor into Android
+  Virtualization Framework(AVF) along with Crosvm as a VMM.
+  It acts like a wrapper for every hypercalls to GenieZone hypervisor in
+  order to control guest VM lifecycles and virtual interrupt injections.
+
+properties:
+  compatible:
+    const: mediatek,geniezone-hyp
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    hypervisor {
+        compatible = "mediatek,geniezone-hyp";
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index db8915114b86..1e911d1d9741 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8698,6 +8698,7 @@  GENIEZONE HYPERVISOR DRIVER
 M:	Yingshiuan Pan <yingshiuan.pan@mediatek.com>
 M:	Ze-Yu Wang <ze-yu.wang@mediatek.com>
 M:	Yi-De Wu <yi-de.wu@mediatek.com>
+F:	Documentation/devicetree/bindings/hypervisor/mediatek,geniezone-hyp.yaml
 F:	Documentation/virt/geniezone/
 
 GENWQE (IBM Generic Workqueue Card)