ead(VFIOPCIDevice *vdev,
> VFIOUserDMARW *msg)
>
> static void vfio_user_dma_write(VFIOPCIDevice *vdev, VFIOUserDMARW *msg)
> {
> -PCIDevice *pdev = &vdev->pdev;
> +PCIDevice *pdev = PCI_DEVICE(vdev);
> VFIOUserProxy *proxy = vdev->vbasedev.proxy;
> MemTxResult r;
>
Reviewed-by: John Levon
On Tue, Jul 15, 2025 at 10:25:49AM +0100, Mark Cave-Ayland wrote:
> Use QOM casts to convert between VFIOUserContainer and VFIOContainerBase
> instead
> of accessing bcontainer directly.
>
> Signed-off-by: Mark Cave-Ayland
Patch subject should be "vfio-user/container.c" not vfio/container.c
_USER_PCI)
>
> struct VFIOUserPCIDevice {
> -VFIOPCIDevice device;
> +VFIOPCIDevice parent_obj;
>
> SocketAddress *socket;
> bool send_queued; /* all sends are queued */
Reviewed-by: John Levon
ntainer sub-class for vfio-user. */
> struct VFIOUserContainer {
> -VFIOContainerBase bcontainer;
> +VFIOContainerBase parent_obj;
>
> VFIOUserProxy *proxy;
> };
Reviewed-by: John Levon
r *name,
> VFIOUserPCIDevice *udev = VFIO_USER_PCI(obj);
> bool success;
>
> -if (udev->device.vbasedev.proxy) {
> +if (VFIO_PCI_BASE(udev)->vbasedev.proxy) {
> error_setg(errp, "Proxy is connected");
> return;
> }
Reviewed-by: John Levon
ruct VFIOUserPCIDevice {
> VFIOPCIDevice device;
> +
> SocketAddress *socket;
> bool send_queued; /* all sends are queued */
> uint32_t wait_time; /* timeout for message replies */
Reviewed-by: John Levon
se bcontainer;
> +
> VFIOUserProxy *proxy;
> -} VFIOUserContainer;
> +};
>
> OBJECT_DECLARE_SIMPLE_TYPE(VFIOUserContainer, VFIO_IOMMU_USER);
>
Reviewed-by: John Levon
Signed-off-by: John Levon
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e88ed2c0a9..30e9b71e6e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4287,6 +4287,7 @@ F: tests/functional/test_multiprocess.py
VFIO-USER:
M: John Levon
M: Thanos
e same way
to resolve this.
Resolves: Coverity CID 1611805
Fixes: 18e899e6 ("vfio-user: implement VFIO_USER_DMA_MAP/UNMAP")
Reported-by: Cédric Le Goater
Signed-off-by: John Levon
Reviewed-by: Cédric Le Goater
---
hw/vfio-user/container.c | 6 +-
1 file changed, 1 insertion(+), 5 del
Some small Coverity and related fixes for the recently merged vfio-user series.
thanks
john
John Levon (4):
hw/vfio-user: add Cédric Le Goater as a maintainer
hw/vfio: fix region fd initialization
hw/vfio-user: wait for proxy close correctly
hw/vfio-user: fix use of uninitialized
ity.
Signed-off-by: John Levon
Reviewed-by: Mark Cave-Ayland
Reviewed-by: Cédric Le Goater
---
hw/vfio-user/proxy.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
index c418954440..2275d3fe39 100644
--- a/hw/vfio-u
We were not initializing the region fd array to -1, so we would
accidentally try to close(0) on cleanup for any region that is not
referenced.
Fixes: 95cdb024 ("vfio: add region info cache")
Signed-off-by: John Levon
Reviewed-by: Mark Cave-Ayland
Reviewed-by: Cédric Le Goater
--
On Tue, Jul 15, 2025 at 10:01:59AM +0100, Mark Cave-Ayland wrote:
> On 15/07/2025 06:52, John Levon wrote:
>
> > Coverity reported:
> >
> > CID 1611806: Concurrent data access violations (BAD_CHECK_OF_WAIT_COND)
> >
> > A wait is performed without a loop
e same way
to resolve this.
Resolves: Coverity CID 1611805
Fixes: 18e899e6 ("vfio-user: implement VFIO_USER_DMA_MAP/UNMAP")
Reported-by: Cédric Le Goater
Signed-off-by: John Levon
---
hw/vfio-user/container.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/vfi
xes: 0b3d881a ("vfio-user: implement message receive infrastructure")
Signed-off-by: John Levon
---
hw/vfio-user/proxy.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
index c418954440..2275d3fe39 100644
--- a
We were not initializing the region fd array to -1, so we would
accidentally try to close(0) on cleanup for any region that is not
referenced.
Fixes: 95cdb024 ("vfio: add region info cache")
Signed-off-by: John Levon
---
hw/vfio/device.c | 6 +-
1 file changed, 5 insertions(+),
Signed-off-by: John Levon
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e88ed2c0a9..30e9b71e6e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4287,6 +4287,7 @@ F: tests/functional/test_multiprocess.py
VFIO-USER:
M: John Levon
M: Thanos
Some small Coverity and related fixes for the recently merged vfio-user series.
thanks
john
John Levon (4):
hw/vfio-user: add Cédric Le Goater as a maintainer
hw/vfio: fix region fd initialization
hw/vfio-user: wait for proxy close correctly
hw/vfio-user: fix use of uninitialized
ity.
Signed-off-by: John Levon
---
hw/vfio-user/proxy.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/vfio-user/proxy.c b/hw/vfio-user/proxy.c
index c418954440..2275d3fe39 100644
--- a/hw/vfio-user/proxy.c
+++ b/hw/vfio-user/proxy.c
@@ -32,7 +32,6 @@ static v
We were not initializing the region fd array to -1, so we would
accidentally try to close(0) on cleanup for any region that is not
referenced.
Fixes: 95cdb024 ("vfio: add region info cache")
Signed-off-by: John Levon
---
hw/vfio/device.c | 6 +-
1 file changed, 5 insertions(+),
Coverity reported:
CID 1611806: Concurrent data access violations (BAD_CHECK_OF_WAIT_COND)
A wait is performed without a loop. If there is a spurious wakeup, the
condition may not be satisfied.
Fix this by checking ->state for VFIO_PROXY_CLOSED in a loop.
Signed-off-by: John Levon
---
On Thu, Jul 10, 2025 at 01:33:17PM +0100, Peter Maydell wrote:
> On Thu, 26 Jun 2025 at 08:51, Cédric Le Goater wrote:
> >
> > From: John Levon
> >
> > Introduce the vfio-user "proxy": this is the client code responsible for
> > sending and receiving v
e same way
to resolve this.
Reported-by: Cédric Le Goater
Signed-off-by: John Levon
---
hw/vfio-user/container.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/vfio-user/container.c b/hw/vfio-user/container.c
index d318e6a339..d589dd90f5 100644
--- a/hw/vfio-user/cont
Add support for getting region info for vfio-user. As vfio-user has one
fd per region, enable ->use_region_fds.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 2 ++
hw/vfio-user/protoco
Add support for getting basic device information.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 20 ++
hw/vfio-user/protocol.h | 12 +
hw/vfio-user/proxy.h | 7
Add some basic documentation on vfio-user usage.
Signed-off-by: John Levon
---
docs/system/device-emulation.rst | 1 +
docs/system/devices/vfio-user.rst | 26 ++
2 files changed, 27 insertions(+)
create mode 100644 docs/system/devices/vfio-user.rst
diff --git a/docs
Unlike most other messages, this is a server->client message, for when a
server wants to do "DMA"; this is slow, so normally the server has
memory directly mapped instead.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-b
discussed as an RFC in:
"RFC: use VFIO over a UNIX domain socket to implement device offloading"
Signed-off-by: Thanos Makatos
Signed-off-by: John Levon
---
MAINTAINERS|3 +-
docs/interop/index.rst |1 +
docs/interop/vfio-user.
Hook this call up to the legacy reset handler for vfio-user-pci.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 2 ++
hw/vfio-user/device.c | 18 ++
hw/vfio-user/pci.c| 15
IRQ setup uses the same semantics as the traditional vfio path, but we
need to share the corresponding file descriptors with the server as
necessary.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user
For vfio-user, the server holds the pending IRQ state; set up an I/O
region for the MSI-X PBA so we can ask the server for this state on a
PBA read.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio/pci.h
The user container will shortly need access to the underlying vfio-user
proxy; set this up.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/container.h | 2 ++
hw/vfio-user/container.c | 43
From: John Levon
When the vfio-user container gets mapping updates, share them with the
vfio-user by sending a message; this can include the region fd, allowing
the server to directly mmap() the region as needed.
For performance, we only wait for the message responses when we're doing
w
Add the basic implementation for receiving vfio-user messages from the
control socket.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
meson.build | 1 +
hw/vfio-user/protocol.h | 53 +
hw/vfio
Re-use PCI setup functions from hw/vfio/pci.c to realize the vfio-user
PCI device.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/pci.c | 29 +
1 file changed, 29 insertions
rPCIDevice instance.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 79 +
include/hw/vfio/vfio-device.h | 2 +
hw/vfio-user/pci.c| 22 +
hw/vfio-us
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/protocol.h | 12 ++
hw/vfio-user/device.c | 79 +++
hw/vfio-user/trace-events | 1 +
3 files changed, 92
Add plumbing for sending vfio-user messages on the control socket.
Add initial version negotation on connection.
Originally-by: John Johnson
Signed-off-by: Jagannathan Raman
Signed-off-by: Elena Ufimtseva
Signed-off-by: John Levon
---
hw/vfio-user/protocol.h | 62 +
hw/vfio-user
Support an asynchronous send of a vfio-user socket message (no wait for
a reply) when the write is posted. This is only safe when no regions are
mappable by the VM. Add an option to explicitly disable this as well.
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 6 ++
hw/vfio-user
: John Levon
---
hw/vfio-user/protocol.h | 21 ++
hw/vfio-user/proxy.h | 12 ++
hw/vfio-user/device.c | 40 +++
hw/vfio-user/proxy.c | 84 +++
hw/vfio-user/trace-events | 1 +
5 files changed, 158 insertions(+)
diff
By default, the vfio-user subsystem will wait 5 seconds for a message
reply from the server. Add an option to allow this to be configurable.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 1
functional test is still being worked on.
A previous version of this series can be found at
https://lore.kernel.org/qemu-devel/20250619133154.264786-1-john.le...@nutanix.com/
Changes since last series:
- fixed SPDX identifier nits
- code review changes for error handling
thanks
john
John Levon (18
.c for instantiating VFIOUserPCIDevice objects,
sharing some common code from hw/vfio/pci.c.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
MAINTAINERS | 8 +
hw/vfio-user/container.h
On Tue, Jun 24, 2025 at 11:35:52AM +0200, Cédric Le Goater wrote:
> > These files came from hw/vfio/ and were then modified so would carry the
> > same
> > license. Please let me know what you'd like me to do.
>
> Ah. Please consider them as new. These are infrastructure files which are
> all si
On Wed, Jun 25, 2025 at 10:02:50AM +0200, Cédric Le Goater wrote:
> > +/*
> > + * Process a received message.
> > + */
> > +static void vfio_user_process(VFIOUserProxy *proxy, VFIOUserMsg *msg,
> > + bool isreply)
>
> This routine could have an 'Error **errp' paramete
On Wed, Jun 25, 2025 at 10:56:44AM +0200, Cédric Le Goater wrote:
> Could you please send v5 this week ? I plan to merge it first as other
> proposals are knocking at the VFIO door and I am OOO on week 28.
Will take care of your Error comments then send out
thanks
john
On Tue, Jun 24, 2025 at 11:27:57AM +0200, Cédric Le Goater wrote:
> On 6/24/25 11:19, John Levon wrote:
> > On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote:
> >
> > > On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote:
> > > >
On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote:
> On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote:
> > + Daniel
> >
> > On 6/23/25 11:30, John Levon wrote:
> > > Add SPDX-License-Identifier to some files missing it in hw/vfi
On Sun, Jun 22, 2025 at 02:57:57PM +0200, Cédric Le Goater wrote:
> PCI enumeration work but the kernel module won't load on ubuntu 24.04
Sorry, I forgot - there's a kernel bug in the Ubuntu LTS kernel for this driver.
Mark has a fix - Mark, can you share?
regards
john
Add SPDX-License-Identifier to some files missing it in hw/vfio/.
Signed-off-by: John Levon
---
hw/vfio/trace.h | 3 +++
hw/vfio/Kconfig | 2 ++
hw/vfio/meson.build | 2 ++
hw/vfio/trace-events | 2 ++
4 files changed, 9 insertions(+)
diff --git a/hw/vfio/trace.h b/hw/vfio/trace.h
On Sat, Jun 21, 2025 at 04:25:24PM +0200, Cédric Le Goater wrote:
> > So please let me know what if anything needs to be fixed (and if I should
> > make
> > the same retrospective fix to hw/vfio/ equivalent).
>
> Did you update the QEMU tree ?
>
> $ git describe
> v10.0.0-1657-g6e1571533fd9
On Fri, Jun 20, 2025 at 11:11:10AM +0200, Cédric Le Goater wrote:
> > The series contains an implement of a vfio-user client in QEMU, along with
> > a few
> > more preparatory patches.
>
> Please run ./scripts/checkpatch.pl and resend later on, as we might get
> reviews.
Output is below, MAINTA
On Fri, Jun 20, 2025 at 10:32:10AM +0200, Cédric Le Goater wrote:
> Before merging, I would like to be able to experiment a minimum.
>
> Does a dummy device (server side) implementation exist ? and a
> GH repo I could pull the code from.
>
> John,
>
> How do you test ?
I use these scripts for
: John Levon
---
hw/vfio-user/protocol.h | 21 ++
hw/vfio-user/proxy.h | 12 ++
hw/vfio-user/device.c | 40 +++
hw/vfio-user/proxy.c | 84 +++
hw/vfio-user/trace-events | 1 +
5 files changed, 158 insertions(+)
diff
IRQ setup uses the same semantics as the traditional vfio path, but we
need to share the corresponding file descriptors with the server as
necessary.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user
Hook this call up to the legacy reset handler for vfio-user-pci.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 2 ++
hw/vfio-user/device.c | 12
hw/vfio-user/pci.c| 15
By default, the vfio-user subsystem will wait 5 seconds for a message
reply from the server. Add an option to allow this to be configurable.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 1
For vfio-user, the server holds the pending IRQ state; set up an I/O
region for the MSI-X PBA so we can ask the server for this state on a
PBA read.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio/pci.h
Add support for getting basic device information.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 20
hw/vfio-user/protocol.h | 12 ++
hw/vfio-user/proxy.h
Add plumbing for sending vfio-user messages on the control socket.
Add initial version negotation on connection.
Originally-by: John Johnson
Signed-off-by: Jagannathan Raman
Signed-off-by: Elena Ufimtseva
Signed-off-by: John Levon
---
hw/vfio-user/protocol.h | 62 +
hw/vfio-user
.c for instantiating VFIOUserPCIDevice objects,
sharing some common code from hw/vfio/pci.c.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
MAINTAINERS | 8 +
hw/vfio-user/container.h
Support an asynchronous send of a vfio-user socket message (no wait for
a reply) when the write is posted. This is only safe when no regions are
mappable by the VM. Add an option to explicitly disable this as well.
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 5 +
hw/vfio-user
Add some basic documentation on vfio-user usage.
Signed-off-by: John Levon
---
docs/system/device-emulation.rst | 1 +
docs/system/devices/vfio-user.rst | 24
2 files changed, 25 insertions(+)
create mode 100644 docs/system/devices/vfio-user.rst
diff --git a/docs
Re-use PCI setup functions from hw/vfio/pci.c to realize the vfio-user
PCI device.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/pci.c | 29 +
1 file changed, 29 insertions
Add the basic implementation for receiving vfio-user messages from the
control socket.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
meson.build | 1 +
hw/vfio-user/protocol.h | 53 +
hw/vfio
Add support for getting region info for vfio-user. As vfio-user has one
fd per region, enable ->use_region_fds.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/device.h | 2 ++
hw/vfio-user/protoco
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/protocol.h | 12 +++
hw/vfio-user/device.c | 67 +++
hw/vfio-user/trace-events | 1 +
3 files changed, 80
From: John Levon
When the vfio-user container gets mapping updates, share them with the
vfio-user by sending a message; this can include the region fd, allowing
the server to directly mmap() the region as needed.
For performance, we only wait for the message responses when we're doing
w
discussed as an RFC in:
"RFC: use VFIO over a UNIX domain socket to implement device offloading"
Signed-off-by: Thanos Makatos
Signed-off-by: John Levon
---
MAINTAINERS|3 +-
docs/interop/index.rst |1 +
docs/interop/vfio-user.
Unlike most other messages, this is a server->client message, for when a
server wants to do "DMA"; this is slow, so normally the server has
memory directly mapped instead.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-b
The user container will shortly need access to the underlying vfio-user
proxy; set this up.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/container.h | 2 ++
hw/vfio-user/container.c | 43
rPCIDevice instance.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 79 +
include/hw/vfio/vfio-device.h | 2 +
hw/vfio-user/pci.c| 22 +
hw/vfio-us
has been
removed
- the documentation has been relocated next to vhost-user's
- SocketAddress is now used for the command line parameter
- small bits of code review feedback
John Levon (18):
vfio-user: add vfio-user class and container
vfio-user: connect vfio proxy to remote server
This keeps the existence of ->region_fds private to hw/vfio/device.c.
Signed-off-by: John Levon
---
include/hw/vfio/vfio-device.h | 12
hw/vfio/device.c | 7 +++
hw/vfio/region.c | 5 +
3 files changed, 20 insertions(+), 4 deletions(-)
d
Signed-off-by: John Levon
---
include/hw/vfio/vfio-device.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index d45e5a68a2..abea652be2 100644
--- a/include/hw/vfio/vfio-device.h
+++ b/include/hw/vfio/vfio-device.h
@@ -240,6
On Thu, Jun 12, 2025 at 08:57:54AM +0200, Cédric Le Goater wrote:
> On 6/7/25 02:10, John Levon wrote:
> > The series contains an implement of a vfio-user client in QEMU, along with
> > a few
> > more preparatory patches.
> >
> > The vfio-user protocol allows
On Thu, Jun 12, 2025 at 08:39:17AM +0200, Cédric Le Goater wrote:
> > +static void vfio_user_pci_realize(PCIDevice *pdev, Error **errp)
> > +{
> > +ERRP_GUARD();
> > +VFIOUserPCIDevice *udev = VFIO_USER_PCI(pdev);
> > +VFIOPCIDevice *vdev = VFIO_PCI_BASE(pdev);
> > +VFIODevice *vba
Explicitly describe every parameter rather than summarizing.
Signed-off-by: John Levon
---
include/hw/vfio/vfio-device.h | 52 +--
1 file changed, 43 insertions(+), 9 deletions(-)
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index
>
> This isn't catastrophic only because VFIO_PCI_BASE is an abstract class.
>
> Fixes: d4e392d0a99b ("vfio: add vfio-pci-base class")
> Signed-off-by: Zhenzhong Duan
Thanks! I had a similar patch after IRC discussion.
Reviewed-by: John Levon
regards
john
On Wed, Jun 11, 2025 at 09:46:15AM +0200, Cédric Le Goater wrote:
> > > can't we simply have a CONFIG option and select the device on platforms
> > > supporting it ?
> >
> > You mean always build vfio-user client rather than optionally? Why would it
> > be
> > different from other optional compo
On Fri, Jun 06, 2025 at 05:10:34PM -0700, John Levon wrote:
> If VFIO_IRQ_INFO_MASKABLE is set for VFIO_PCI_MSIX_IRQ_INDEX, record
> this in ->can_mask_msix, and use it to individually mask MSI-X
> interrupts as needed.
I'm just going to drop this patch. Neither vfio nor libvfi
On Tue, Jun 10, 2025 at 09:42:41AM +0200, Cédric Le Goater wrote:
> > @@ -478,9 +491,14 @@ void vfio_device_unprepare(VFIODevice *vbasedev)
> > for (i = 0; i < vbasedev->num_regions; i++) {
> > g_free(vbasedev->reginfo[i]);
> > +if (vbasedev->region_fds != NULL && vbasedev-
On Tue, Jun 10, 2025 at 09:42:41AM +0200, Cédric Le Goater wrote:
> > @@ -478,9 +491,14 @@ void vfio_device_unprepare(VFIODevice *vbasedev)
> > for (i = 0; i < vbasedev->num_regions; i++) {
> > g_free(vbasedev->reginfo[i]);
> > +if (vbasedev->region_fds != NULL && vbasedev-
On Tue, Jun 10, 2025 at 11:57:00AM +0200, Cédric Le Goater wrote:
> > @@ -529,6 +531,8 @@ _meson_option_parse() {
> > --disable-vdi) printf "%s" -Dvdi=disabled ;;
> > --enable-vduse-blk-export) printf "%s" -Dvduse_blk_export=enabled ;;
> > --disable-vduse-blk-export) printf "%s"
On Tue, Jun 10, 2025 at 11:38:29AM +0200, Cédric Le Goater wrote:
> > +
> > +--
> > +Version_ 0.9.1
> > +--
>
> Are you planning to have a subsection per version ?
>
I've removed this, as it's not useful/meaningful at this point in time.
regards
john
On Tue, Jun 10, 2025 at 09:42:41AM +0200, Cédric Le Goater wrote:
> On 6/7/25 02:10, John Levon wrote:
> > For vfio-user, each region has its own fd rather than sharing
> > vbasedev's. Add the necessary plumbing to support this, and use the
> > corr
On Tue, Jun 10, 2025 at 01:57:23PM +0200, Cédric Le Goater wrote:
> On 6/10/25 13:27, John Levon wrote:
> > On Tue, Jun 10, 2025 at 11:58:18AM +0100, Mark Cave-Ayland wrote:
> >
> > > > +/* Use the per-region fd if set, or the shared fd. */
> > &
On Tue, Jun 10, 2025 at 12:42:35PM +0100, Mark Cave-Ayland wrote:
> Question: how do you see the division between hw/vfio and hw/vfio-user? My
> initial feeling is that there is substantial sharing between the two, in
> which case I'd expect the files to be in hw/vfio as e.g.
> hw/vfio/container-u
On Tue, Jun 10, 2025 at 11:58:18AM +0100, Mark Cave-Ayland wrote:
> > +/* Use the per-region fd if set, or the shared fd. */
> > +fd = region->vbasedev->region_fds ?
> > + region->vbasedev->region_fds[region->nr] :
> > + region->vbasedev->fd,
> > +
>
> This
On Tue, Jun 10, 2025 at 11:38:29AM +0200, Cédric Le Goater wrote:
> > docs/devel/vfio-user.rst | 1522
>
> I think this file should be split in several smaller files. The
> protocol specification part belongs to "System Emulation Management
> and Interopera
-off-by: Zhenzhong Duan
D'oh, copy-and-paste error, thanks. Somewhat impressive this didn't show up as
any failure in my testing.
Reviewed-by: John Levon
regards
john
Add plumbing for sending vfio-user messages on the control socket.
Add initial version negotation on connection.
Originally-by: John Johnson
Signed-off-by: Jagannathan Raman
Signed-off-by: Elena Ufimtseva
Signed-off-by: John Levon
---
hw/vfio-user/protocol.h | 62 +
hw/vfio-user
Re-use PCI setup functions from hw/vfio/pci.c to realize the vfio-user
PCI device.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/pci.c | 29 +
1 file changed, 29 insertions
For vfio-user, the region write implementation needs to know if the
write is posted; add the necessary plumbing to support this.
Signed-off-by: John Levon
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-device.h | 4 ++--
include/hw/vfio/vfio-region.h | 1 +
hw/vfio/device.c
rPCIDevice instance.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
hw/vfio-user/proxy.h | 82 +
include/hw/vfio/vfio-device.h | 2 +
hw/vfio-user/pci.c| 17
hw/vfio-us
From: John Levon
When the vfio-user container gets mapping updates, share them with the
vfio-user by sending a message; this can include the region fd, allowing
the server to directly mmap() the region as needed.
For performance, we only wait for the message responses when we're doing
w
: John Levon
---
hw/vfio-user/protocol.h | 21 ++
hw/vfio-user/proxy.h | 12 ++
hw/vfio-user/device.c | 40 +++
hw/vfio-user/proxy.c | 84 +++
hw/vfio-user/trace-events | 1 +
5 files changed, 158 insertions(+)
diff
Add the basic implementation for receiving vfio-user messages from the
control socket.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-by: John Levon
---
meson.build | 1 +
hw/vfio-user/protocol.h | 56 ++
hw/vfio
Unlike most other messages, this is a server->client message, for when a
server wants to do "DMA"; this is slow, so normally the server has
memory directly mapped instead.
Originally-by: John Johnson
Signed-off-by: Elena Ufimtseva
Signed-off-by: Jagannathan Raman
Signed-off-b
For vfio-user, each region has its own fd rather than sharing
vbasedev's. Add the necessary plumbing to support this, and use the
correct fd in vfio_region_mmap().
Signed-off-by: John Levon
---
include/hw/vfio/vfio-device.h | 7 +--
hw/vfio/device.c
1 - 100 of 470 matches
Mail list logo