From: "Yi-De Wu (吳一德)" <Yi-De.Wu@mediatek.com>
To: "maz@kernel.org" <maz@kernel.org>
Cc: "corbet@lwn.net" <corbet@lwn.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"quic_tsoni@quicinc.com" <quic_tsoni@quicinc.com>,
"MY Chuang (莊明躍)" <MY.Chuang@mediatek.com>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"Yingshiuan Pan (潘穎軒)" <Yingshiuan.Pan@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"PeiLun Suei (隋培倫)" <PeiLun.Suei@mediatek.com>,
"Liju-clr Chen (陳麗如)" <Liju-clr.Chen@mediatek.com>,
"yi-de.wu@mediatek.corp-partner.google.com"
<yi-de.wu@mediatek.corp-partner.google.com>,
"Jades Shih (施向玨)" <jades.shih@mediatek.com>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"dbrazdil@google.com" <dbrazdil@google.com>,
"yipei.chang@gmail.com" <yipei.chang@gmail.com>,
"Shawn Hsiao (蕭志祥)" <shawn.hsiao@mediatek.com>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"Miles Chen (陳民樺)" <Miles.Chen@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"Ivan Tseng (曾志軒)" <ivan.tseng@mediatek.com>,
"Ze-yu Wang (王澤宇)" <Ze-yu.Wang@mediatek.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"will@kernel.org" <will@kernel.org>
Subject: Re: [PATCH v2 5/7] virt: geniezone: Add irqchip support for virtual interrupt injection
Date: Mon, 22 May 2023 04:32:36 +0000 [thread overview]
Message-ID: <0df5f0f601e0177e64b65e643affd46939e231f6.camel@mediatek.com> (raw)
In-Reply-To: <86sfc1na84.wl-maz@kernel.org>
On Fri, 2023-05-12 at 10:57 +0100, Marc Zyngier wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On Fri, 12 May 2023 09:16:58 +0100,
> "Yi-De Wu (吳一德)" <Yi-De.Wu@mediatek.com> wrote:
> >
> > On Fri, 2023-05-12 at 08:51 +0100, Marc Zyngier wrote:
> > > External email : Please do not click links or open attachments
> > > until
> > > you have verified the sender or the content.
> > >
> > >
> > > On Fri, 12 May 2023 08:19:31 +0100,
> > > "Yi-De Wu (吳一德)" <Yi-De.Wu@mediatek.com> wrote:
> > > >
> > > > On Fri, 2023-04-28 at 19:59 +0100, Marc Zyngier wrote:
> > > > > External email : Please do not click links or open
> > > > > attachments
> > > > > until
> > > > > you have verified the sender or the content.
> > > > >
> > > > >
> > > > > On 2023-04-28 11:36, Yi-De Wu wrote:
> > > > > > From: "Yingshiuan Pan" <yingshiuan.pan@mediatek.com>
> > > > > >
> > > > > > Enable GenieZone to handle virtual interrupt injection
> > > > > > request.
> > > > > >
> > > > > > Signed-off-by: Yingshiuan Pan <yingshiuan.pan@mediatek.com>
> > > > > > Signed-off-by: Yi-De Wu <yi-de.wu@mediatek.com>
> > > > > > ---
> > > > > > arch/arm64/geniezone/Makefile | 2 +-
> > > > > > arch/arm64/geniezone/gzvm_arch.c | 24 ++++++--
> > > > > > arch/arm64/geniezone/gzvm_arch.h | 11 ++++
> > > > > > arch/arm64/geniezone/gzvm_irqchip.c | 88
> > > > > > +++++++++++++++++++++++++++++
> > > > > > drivers/virt/geniezone/gzvm_vm.c | 75
> > > > > > ++++++++++++++++++++++++
> > > > > > include/linux/gzvm_drv.h | 4 ++
> > > > > > include/uapi/linux/gzvm.h | 38 ++++++++++++-
> > > > > > 7 files changed, 235 insertions(+), 7 deletions(-)
> > > > > > create mode 100644 arch/arm64/geniezone/gzvm_irqchip.c
> > > > >
> > > > > [...]
> > > > >
> > > > > > +++ b/arch/arm64/geniezone/gzvm_irqchip.c
> > > > > > @@ -0,0 +1,88 @@
> > > > > > +// SPDX-License-Identifier: GPL-2.0
> > > > > > +/*
> > > > > > + * Copyright (c) 2023 MediaTek Inc.
> > > > > > + */
> > > > > > +
> > > > > > +#include <linux/irqchip/arm-gic-v3.h>
> > > > > > +#include <kvm/arm_vgic.h>
> > > > >
> > > > > NAK.
> > > > >
> > > > > There is no way you can rely on anything from KVM in
> > > > > your own hypervisor code.
> > > > >
> > > >
> > > > Same with previous discussion, we'd like to copy or rename the
> > > > related
> > > > part from KVM and keep the maintainance at our own if it's ok.
> > >
> > > Why do you need *ANY* of the KVM stuff? Please fully enumerate
> > > these
> > > dependencies and why you have them.
> > >
> > > Directly using KVM stuff for something completely unrelated is
> > > not
> > > OK,
> > > and will never be.
> > >
> > > M.
> > >
> > > --
> > > Without deviation from the norm, progress is not possible.
> >
> > The particular part we'd like to leverage from KVM are as followed
> > 1. `gfn_to_pfn_memslot` to convert guest physical address(or
> > intermediate physical address) to physical address
>
> What is a memslot in your hypervisor? How does it relate to KVM's?
> What about the use of struct kvm?
>
> I'm sorry, but your use of *internal* structures and API would make
> it
> impossible for us to make any further change without potentially
> affecting your hypervisor. Which is closed source and untestable.
>
> To sum it up, I'm strongly opposed to any use of these data
> structures. If you can spot some commonalities, expose them as a
> 0-cost abstraction. But don't use them as is your code.
>
> > 2. get ARM's number of interrupt of different types e.g. number of
> > SGI,
> > number of PPI...etc
>
> These are architectural constants, and you can define your own. That
> will cost you nothing but a handful of #define, and keep the two
> subsystem independent.
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
As per discussion, we would define our own constants here and keep the
subsystem indepedent.
next prev parent reply other threads:[~2023-05-22 4:32 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 10:36 [PATCH v2 0/7] GenieZone hypervisor drivers Yi-De Wu
2023-04-28 10:36 ` [PATCH v2 1/7] docs: geniezone: Introduce GenieZone hypervisor Yi-De Wu
2023-05-12 16:51 ` Pavel Machek
2023-05-22 5:45 ` Yi-De Wu (吳一德)
2023-04-28 10:36 ` [PATCH v2 2/7] dt-bindings: hypervisor: Add MediaTek " Yi-De Wu
2023-04-28 14:52 ` Rob Herring
2023-05-12 6:42 ` Yi-De Wu (吳一德)
2023-05-12 16:34 ` Trilok Soni
2023-05-22 3:45 ` Yi-De Wu (吳一德)
2023-04-28 21:24 ` Rob Herring
2023-05-12 6:42 ` Yi-De Wu (吳一德)
2023-05-12 11:01 ` Conor Dooley
2023-05-22 3:28 ` Yi-De Wu (吳一德)
2023-06-26 9:05 ` Yi-De Wu (吳一德)
2023-04-28 10:36 ` [PATCH v2 3/7] virt: geniezone: Introduce GenieZone hypervisor support Yi-De Wu
2023-04-28 16:19 ` kernel test robot
2023-04-28 17:53 ` kernel test robot
2023-04-28 20:07 ` kernel test robot
2023-04-28 22:12 ` Marc Zyngier
2023-04-28 22:48 ` Trilok Soni
2023-05-12 7:18 ` Yi-De Wu (吳一德)
2023-05-12 7:17 ` Yi-De Wu (吳一德)
2023-05-12 9:59 ` Marc Zyngier
2023-05-22 4:29 ` Yi-De Wu (吳一德)
2023-04-28 10:36 ` [PATCH v2 4/7] virt: geniezone: Add vcpu support Yi-De Wu
2023-04-29 6:34 ` kernel test robot
2023-04-28 10:36 ` [PATCH v2 5/7] virt: geniezone: Add irqchip support for virtual interrupt injection Yi-De Wu
2023-04-28 18:59 ` Marc Zyngier
2023-05-12 7:19 ` Yi-De Wu (吳一德)
2023-05-12 7:51 ` Marc Zyngier
2023-05-12 8:16 ` Yi-De Wu (吳一德)
2023-05-12 9:57 ` Marc Zyngier
2023-05-22 4:32 ` Yi-De Wu (吳一德) [this message]
2023-04-28 10:36 ` [PATCH v2 6/7] virt: geniezone: Add irqfd support Yi-De Wu
2023-04-28 10:36 ` [PATCH v2 7/7] virt: geniezone: Add ioeventfd support Yi-De Wu
2023-04-28 12:25 ` [PATCH v2 0/7] GenieZone hypervisor drivers Krzysztof Kozlowski
2023-05-16 7:53 ` Yi-De Wu (吳一德)
2023-04-28 12:26 ` Krzysztof Kozlowski
2023-05-22 3:18 ` Yi-De Wu (吳一德)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0df5f0f601e0177e64b65e643affd46939e231f6.camel@mediatek.com \
--to=yi-de.wu@mediatek.com \
--cc=Liju-clr.Chen@mediatek.com \
--cc=MY.Chuang@mediatek.com \
--cc=Miles.Chen@mediatek.com \
--cc=PeiLun.Suei@mediatek.com \
--cc=Yingshiuan.Pan@mediatek.com \
--cc=Ze-yu.Wang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dbrazdil@google.com \
--cc=devicetree@vger.kernel.org \
--cc=ivan.tseng@mediatek.com \
--cc=jades.shih@mediatek.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=maz@kernel.org \
--cc=quic_tsoni@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=shawn.hsiao@mediatek.com \
--cc=will@kernel.org \
--cc=yi-de.wu@mediatek.corp-partner.google.com \
--cc=yipei.chang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).