linux-stable/include/xen/interface
Viresh Kumar f0d7db7b33 xen: privcmd: Add support for ioeventfd
Virtio guests send VIRTIO_MMIO_QUEUE_NOTIFY notification when they need
to notify the backend of an update to the status of the virtqueue. The
backend or another entity, polls the MMIO address for updates to know
when the notification is sent.

It works well if the backend does this polling by itself. But as we move
towards generic backend implementations, we end up implementing this in
a separate user-space program.

Generally, the Virtio backends are implemented to work with the Eventfd
based mechanism. In order to make such backends work with Xen, another
software layer needs to do the polling and send an event via eventfd to
the backend once the notification from guest is received. This results
in an extra context switch.

This is not a new problem in Linux though. It is present with other
hypervisors like KVM, etc. as well. The generic solution implemented in
the kernel for them is to provide an IOCTL call to pass the address to
poll and eventfd, which lets the kernel take care of polling and raise
an event on the eventfd, instead of handling this in user space (which
involves an extra context switch).

This patch adds similar support for xen.

Inspired by existing implementations for KVM, etc..

This also copies ioreq.h header file (only struct ioreq and related
macros) from Xen's source tree (Top commit 5d84f07fe6bf ("xen/pci: drop
remaining uses of bool_t")).

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/b20d83efba6453037d0c099912813c79c81f7714.1697439990.git.viresh.kumar@linaro.org
Signed-off-by: Juergen Gross <jgross@suse.com>
2023-10-16 15:18:33 +02:00
..
hvm xen: privcmd: Add support for ioeventfd 2023-10-16 15:18:33 +02:00
io xen: sync xs_wire.h header with upstream xen 2022-05-19 14:44:05 +02:00
callback.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
elfnote.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
event_channel.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
features.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
grant_table.h xen: update grant_table.h 2022-05-19 14:21:34 +02:00
memory.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
nmi.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
physdev.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
platform.h x86/PVH: obtain VGA console info in Dom0 2023-03-14 15:20:51 +01:00
sched.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
vcpu.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
version.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
xen-mca.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00
xen.h xen/x86: obtain upper 32 bits of video frame buffer address for Dom0 2022-01-06 08:55:34 +01:00
xenpmu.h xen: fix wrong SPDX headers of Xen related headers 2021-11-02 07:45:44 -05:00