From: "Alex Bennée" <alex.bennee@linaro.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: Mykyta Poturai <Mykyta_Poturai@epam.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
David Woodhouse <dwmw@amazon.co.uk>,
Julien Grall <julien@xen.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Vikram Garhwal <vikram.garhwal@amd.com>,
Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>,
stewart.hildebrand@amd.com
Subject: Re: Adding MSI support for virtio-pci to QEMU as Xen backend on ARM
Date: Tue, 12 Dec 2023 16:02:26 +0000 [thread overview]
Message-ID: <87wmtjbe99.fsf@draig.linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2312081407250.1703076@ubuntu-linux-20-04-desktop> (Stefano Stabellini's message of "Fri, 8 Dec 2023 14:15:16 -0800 (PST)")
Stefano Stabellini <sstabellini@kernel.org> writes:
> +Stewart
>
> On Fri, 8 Dec 2023, Mykyta Poturai wrote:
>> Hello everyone,
>>
>> I am currently working on adding MSI support to virtio-pci on ARM with Xen.
>
> Excellent!
>
>
>> As far as I understand QEMU Xen ARM machine that is used for
>> virtio-pci device emulation does not initialize any interrupt
>> controllers. And that makes it somewhat unclear what is the best
>> approach to adding the MSI support. So, I would appreciate some
>> thoughts on this.
>> To trigger the MSI interrupt in Xen guests we basically need to call a single DMOP, which I am also implementing.
>
> You should be able to call xen_inject_msi
>
>
>> So far, I have come up with 3 possible approaches:
>> 1. Hooking up the existing GIC code to the Xen Arm machine and extending it with the DMOP call.
>
> No, I would rather avoid this for a couple of reasons. In reality, the
> GIC is emulated by Xen, not QEMU. So letting QEMU think that QEMU is
> emulating a GIC is more error prone than the alternatives and also it
> would allocate resources needlessly.
>
>
>> 2. Writing some new barebones GIC implementation with only the required methods (something similar to xen_apic.c).
>> 3. Just hooking up the DMOP call to the existing PCI code based on xen_enabled() check.
>
> I would rather not introduce any more if (xen_enabled()) checks beyond
> the ones we already have unless it is the only option. So I would go
> with option 2). Even better if we could reuse xen_apic.c. xen_apic.c is
> just a stub, which is basically the same thing that we need here.
I guess the APIC part of the name is part of the historical baggage of
x86 - really it's just a xenpv-irq controller?
Anyway yeah I think just move it from hw/i386/xen to hw/xen and maybe
give it a new name with an alias to the old one we can deprecate over
time?
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
prev parent reply other threads:[~2023-12-12 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 9:59 Adding MSI support for virtio-pci to QEMU as Xen backend on ARM Mykyta Poturai
2023-12-08 22:15 ` Stefano Stabellini
2023-12-12 16:02 ` Alex Bennée [this message]
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=87wmtjbe99.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=Mykyta_Poturai@epam.com \
--cc=Oleksandr_Tyshchenko@epam.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=dwmw@amazon.co.uk \
--cc=julien@xen.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=stewart.hildebrand@amd.com \
--cc=vikram.garhwal@amd.com \
--cc=xen-devel@lists.xenproject.org \
/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).