Re: [PATCH v1 3/6] soc: mediatek: virt: geniezone: Introduce GenieZone hypervisor support

From: Yi-De Wu (吳一德)
Date: Fri May 12 2023 - 03:29:58 EST


On Fri, 2023-04-14 at 10:17 -0700, Trilok Soni wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 4/14/2023 1:51 AM, Krzysztof Kozlowski wrote:
> > On 14/04/2023 10:43, Yi-De Wu (吳一德) wrote:
> > > On Thu, 2023-04-13 at 19:08 +0200, Matthias Brugger wrote:
> > > > External email : Please do not click links or open attachments
> > > > until
> > > > you have verified the sender or the content.
> > > >
> > > >
> > > > On 13/04/2023 14:55, Krzysztof Kozlowski wrote:
> > > > > On 13/04/2023 11:07, Yi-De Wu wrote:
> > > > > > From: "Yingshiuan Pan" <yingshiuan.pan@xxxxxxxxxxxx>
> > > > > >
> > > > > > GenieZone is MediaTek proprietary hypervisor solution, and
> > > > > > it is
> > > > > > running
> > > > > > in EL2 stand alone as a type-I hypervisor. This patch
> > > > > > exports a
> > > > > > set of
> > > > > > ioctl interfaces for userspace VMM (e.g., crosvm) to
> > > > > > operate
> > > > > > guest VMs
> > > > > > lifecycle (creation, running, and destroy) on GenieZone.
> > > > > >
> > > > > > Signed-off-by: Yingshiuan Pan <yingshiuan.pan@xxxxxxxxxxxx>
> > > > > > Signed-off-by: Yi-De Wu <yi-de.wu@xxxxxxxxxxxx>
> > > > > > ---
> > > > > > arch/arm64/include/uapi/asm/gzvm_arch.h | 79 ++++
> > > > > > drivers/soc/mediatek/Kconfig | 2 +
> > > > > > drivers/soc/mediatek/Makefile | 1 +
> > > > > > drivers/soc/mediatek/virt/geniezone/Kconfig | 17 +
> > > > >
> > > > > Hypervisor drivers do not go to soc. Stop shoving there
> > > > > everything
> > > > > from
> > > > > your downstream. Find appropriate directory, e.g. maybe
> > > > > drivers/virt.
> > > >
> > > > Acked, what is the reason you want to add this to drivers/soc
> > > > instead
> > > > of
> > > > drivers/virt?
> > > >
> > > > Regards,
> > > > Matthias
> > > >
> > >
> > > Noted. We would take your advice and move it from
> > > drivers/soc/mediatek/virt to /drivers/virt on next version.
> > >
> > > The reason we put it under our soc/ is that the drver is highly
> > > propietary for mediatek's product and for aarch64 only. Maybe
> > > it's not
> > > general enough to put in under /drivers/virt.
> >
> > If virt folks reject the driver, because it is highly proprietary,
> > then
> > it is not suitable for soc/mediatek either.
> >
> > Your argument is actually not helping you. It's rather a proof that
> > this
> > driver might not be suitable for Linux kernel at all.
> >
> > >
> >
> >
https://urldefense.com/v3/__https://android-review.googlesource.com/c/kernel/common/*/2447547/1..2/drivers/virt/geniezone/gzvm.h*b91__;KyM!!CTRNKA9wMg0ARbw!gV4z0n7DNq-QuX66Oln0w0grKWY3km14bMGVtv-keTfeOyCVsVQRYfgqKP4RWiA3BlgfkgS0OytOf12PquxZs9o$
> >
> > I don't see there anything suggesting moving to soc/mediatek.
> > Comment
> > from Trilok (+Cc) suggests that your code is simply not portable.
> > Write
> > code which is portable and properly organized.
>
> Thanks for the CC. I don't know how different these patches are from
> the
> ACK post, but if they are similar then I am surprised that patches of
> that state are posted here since they will need lot of work to get it
> reviewed here.
>
> Also, do you plan to open-source your hypervisor? I am not sure if
> that
> is the requirement but it will be good to know if some version of
> your
> Hypervisor is open-sourced or you have plan for that.
>
> ---Trilok Soni
>

There would be some difficulties for us to open source our hypervisor
right now. But we will try our utmost to answer all the related
questions to make our design more comprehensive and transparent to the
public.