From: Val Packett <val@invisiblethingslab.com>
To: "Teddy Astie" <teddy.astie@vates.tech>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>
Cc: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux.dev
Subject: Re: [RFC PATCH] virtio-mmio: add xenbus probing
Date: Thu, 30 Apr 2026 01:01:22 -0300 [thread overview]
Message-ID: <fd6493ac-9d3e-475a-a844-6e53b0472820@invisiblethingslab.com> (raw)
In-Reply-To: <1777473712.8631fc262581453bbf619ec5b2062170.19dd9b07146000f373@vates.tech>
On 4/29/26 11:41 AM, Teddy Astie wrote:
> Hello,
>
> Le 29/04/2026 à 16:18, Val Packett a écrit :
>> […]
>>
>> I've been working on porting virtio-mmio support from Arm to x86_64,
>> with the goal of running vhost-user-gpu to power Wayland/GPU integration
>> for Qubes OS. (I'm aware of various proposals for alternative virtio
>> transports but virtio-mmio seems to be the only one that *is* upstream
>> already and just Works..) Setting up virtio-mmio through xenbus, initially
>> motivated just by event channels being the only real way to get interrupts
>> working on HVM, turned out to generally be quite pleasant and nice :)
> Is it HVM specific, or can we also make it work for PVH (we can actually
> attach a ioreq server to PVH guests) ?
Sorry, typo, I did mean PVH of course!
I've been testing this with PVH guests + PV dom0, with my PV alloc_ioreq
fix:
https://lore.kernel.org/all/20251126062124.117425-1-val@invisiblethingslab.com/
(Time to resend that one as a non-RFC I guess…)
HVM actually does have legacy ISA interrupts (which are often used with
virtio-mmio on KVM), funnily enough, and I've tried firing those from a
DMOP but that silly thing didn't work properly.
>> I'd like to get some early feedback for this patch, particularly
>> the general stuff:
>>
>> * is this whole thing acceptable in general?
>> * should it be extracted into a different file?
>> * (from the Xen side) any input on the xenstore keys, what goes where?
>> * anything else to keep in mind?
>>
>> It does seem simple enough, so hopefully this can be done?
>>
>> The corresponding userspace-side WIP is available at:
>> https://github.com/QubesOS/xen-vhost-frontend
>>
>> And the required DMOP for firing the evtchn events will be sent
>> to xen-devel shortly as well.
> Could that be done through evtchn_send (or its userland counterpart) ?
Actually, yes… The use of DMOPs is only dictated by the current Linux
privcmd.c code (the irqfds created by the kernel react to events by
executing HYPERVISOR_dm_op with a stored operation), we can avoid the
need to modify Xen by simply expanding the privcmd driver to make
"evtchn fds". Sounds good, will do.
>> [..]
>>
>> diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
>> index ce5bc0d9ea28..56bc2b10526b 100644
>> --- a/drivers/virtio/Kconfig
>> +++ b/drivers/virtio/Kconfig
>> @@ -171,6 +171,13 @@ config VIRTIO_MMIO_CMDLINE_DEVICES
>>
>> If unsure, say 'N'.
>>
>> +config VIRTIO_MMIO_XENBUS
>> + bool "Memory mapped virtio devices parameter parsing"
> that text seems to miss the xenbus aspect
Yep, didn't change that yet, ack
>> [..]
> In some way, we're defining a new "PV driver" which is a virtio-mmio
> one, I guess we can eventually specific some form of protocol that
> backend/frontend would need to follow ?
Right, Jürgen mentioned documenting the keys in the xenstore-paths doc..
would the entire "protocol" (keys + state transition logic) fit into that?
The keys are currently derived from the initial Arm prototype which
wasn't actually using xenbus properly (the guest driver was configured
by a device tree node, but the ioreq server used xenstore keys, without
properly transitioning between states).
Thanks,
~val
next prev parent reply other threads:[~2026-04-30 4:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 13:52 [RFC PATCH] virtio-mmio: add xenbus probing Val Packett
2026-04-29 15:35 ` Jürgen Groß
2026-04-30 4:04 ` Val Packett
[not found] ` <1777473712.8631fc262581453bbf619ec5b2062170.19dd9b07146000f373@vates.tech>
2026-04-30 4:01 ` Val Packett [this message]
[not found] ` <1777536698.8631fc262581453bbf619ec5b2062170.19ddd7187da000f373@vates.tech>
2026-04-30 8:48 ` Val Packett
[not found] ` <1777556830.8631fc262581453bbf619ec5b2062170.19ddea4b728000f373@vates.tech>
2026-04-30 18:50 ` Val Packett
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=fd6493ac-9d3e-475a-a844-6e53b0472820@invisiblethingslab.com \
--to=val@invisiblethingslab.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marmarek@invisiblethingslab.com \
--cc=mst@redhat.com \
--cc=teddy.astie@vates.tech \
--cc=viresh.kumar@linaro.org \
--cc=virtualization@lists.linux.dev \
--cc=xen-devel@lists.xenproject.org \
--cc=xuanzhuo@linux.alibaba.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