On Tue, 31 May 2022 at 21:11, Alex Williamson <alex.william...@redhat.com> wrote: > > On Tue, 31 May 2022 15:01:57 +0000 > Jag Raman <jag.ra...@oracle.com> wrote: > > > > On May 25, 2022, at 10:53 AM, Stefan Hajnoczi <stefa...@redhat.com> wrote: > > > > > > On Tue, May 24, 2022 at 11:30:32AM -0400, Jagannathan Raman wrote: > > >> Forward remote device's interrupts to the guest > > >> > > >> Signed-off-by: Elena Ufimtseva <elena.ufimts...@oracle.com> > > >> Signed-off-by: John G Johnson <john.g.john...@oracle.com> > > >> Signed-off-by: Jagannathan Raman <jag.ra...@oracle.com> > > >> --- > > >> include/hw/pci/pci.h | 13 ++++ > > >> include/hw/remote/vfio-user-obj.h | 6 ++ > > >> hw/pci/msi.c | 16 ++-- > > >> hw/pci/msix.c | 10 ++- > > >> hw/pci/pci.c | 13 ++++ > > >> hw/remote/machine.c | 14 +++- > > >> hw/remote/vfio-user-obj.c | 123 ++++++++++++++++++++++++++++++ > > >> stubs/vfio-user-obj.c | 6 ++ > > >> MAINTAINERS | 1 + > > >> hw/remote/trace-events | 1 + > > >> stubs/meson.build | 1 + > > >> 11 files changed, 193 insertions(+), 11 deletions(-) > > >> create mode 100644 include/hw/remote/vfio-user-obj.h > > >> create mode 100644 stubs/vfio-user-obj.c > > > > > > It would be great if Michael Tsirkin and Alex Williamson would review > > > this. > > > > Hi Michael and Alex, > > > > Do you have any thoughts on this patch? > > Ultimately this is just how to insert callbacks to replace the default > MSI/X triggers so you can send a vector# over the wire for a remote > machine, right? I'll let the code owners, Michael and Marcel, comment > if they have grand vision how to architect this differently. Thanks,
An earlier version of the patch intercepted MSI-X at the msix_notify() level, replacing the entire function. This patch replaces msix_get_message() and msi_send_message(), leaving the masking logic in place. I haven't seen the latest vfio-user client implementation for QEMU, but if the idea is to allow the guest to directly control the vfio-user device's MSI-X table's mask bits, then I think this is a different design from VFIO kernel where masking is emulated by QEMU and not passed through to the PCI device. It's been a while since I looked at how this works in QEMU's hw/vfio/ code, so I may not be explaining it correctly, but I think there is a design difference here between VFIO kernel and vfio-user that's worth evaluating. Stefan