From: Alexander Duyck <alexander.duyck@gmail.com>
To: Jag Raman <jag.raman@oracle.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"f4bug@amsat.org" <f4bug@amsat.org>,
Paolo Bonzini <pbonzini@redhat.com>,
"marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>,
"thuth@redhat.com" <thuth@redhat.com>,
"bleal@redhat.com" <bleal@redhat.com>,
"berrange@redhat.com" <berrange@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
"eduardo@habkost.net" <eduardo@habkost.net>,
"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
"eblake@redhat.com" <eblake@redhat.com>,
"armbru@redhat.com" <armbru@redhat.com>,
Juan Quintela <quintela@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
Peter Xu <peterx@redhat.com>,
"john.levon@nutanix.com" <john.levon@nutanix.com>,
"thanos.makatos@nutanix.com" <thanos.makatos@nutanix.com>,
Elena Ufimtseva <elena.ufimtseva@oracle.com>,
John Johnson <john.g.johnson@oracle.com>,
Kanth Ghatraju <kanth.ghatraju@oracle.com>
Subject: Re: [PATCH v10 13/14] vfio-user: handle device interrupts
Date: Mon, 6 Jun 2022 13:38:30 -0700 [thread overview]
Message-ID: <CAKgT0Uf9KYAFfuoaCWv1_GwTH6kcwgpdFwrd4AUSSpnPkyu73w@mail.gmail.com> (raw)
In-Reply-To: <7F3721E6-A29D-4B74-872C-6648BC6E97E7@oracle.com>
On Mon, Jun 6, 2022 at 12:29 PM Jag Raman <jag.raman@oracle.com> wrote:
>
>
>
> > On Jun 6, 2022, at 2:32 PM, Alexander Duyck <alexander.duyck@gmail.com> wrote:
> >
> > On Tue, May 24, 2022 at 9:11 AM Jagannathan Raman <jag.raman@oracle.com> wrote:
> >>
> >> Forward remote device's interrupts to the guest
> >>
> >> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> >> Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
> >> Signed-off-by: Jagannathan Raman <jag.raman@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
> >>
> >
> > So I had a question about a few bits below. Specifically I ran into
> > issues when I had setup two devices to be assigned to the same VM via
> > two vfio-user-pci/x-vfio-user-server interfaces.
>
> Thanks for the heads up, Alexander!
>
> >
> > What I am hitting is an assert(irq_num < bus->nirq) in
> > pci_bus_change_irq_level in the server.
>
> That is issue is because we are only initializing only one
> IRQ for the PCI bus - but it should be more. We will update
> it and when the bus initializes interrupts and get back to you.
>
> We only tested MSI/x devices for the multi-device config. We
> should also test INTx - could you please confirm which device
> you’re using so we could verify that it works before posting
> the next revision.
>
> Thank you!
> --
> Jag
I was testing an MSI-X capable NIC, so you can reproduce with e1000e.
During the device enumeration before the driver was even loaded it
threw the error:
qemu-system-x86_64: ../hw/pci/pci.c:276: pci_bus_change_irq_level:
Assertion `irq_num < bus->nirq' failed.
All it really takes is attaching to the second device, that is enough
to trigger the error since the irq_num will be non-zero.
If I recall, all the kernel is doing is unmasking the interrupt via
the config space and it is triggering the error which then shuts down
the server.
next prev parent reply other threads:[~2022-06-06 20:51 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 15:30 [PATCH v10 00/14] vfio-user server in QEMU Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 01/14] qdev: unplug blocker for devices Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 02/14] remote/machine: add HotplugHandler for remote machine Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 03/14] remote/machine: add vfio-user property Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 04/14] vfio-user: build library Jagannathan Raman
2022-05-25 14:46 ` Stefan Hajnoczi
2022-05-24 15:30 ` [PATCH v10 05/14] vfio-user: define vfio-user-server object Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 06/14] vfio-user: instantiate vfio-user context Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 07/14] vfio-user: find and init PCI device Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 08/14] vfio-user: run vfio-user context Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 09/14] vfio-user: handle PCI config space accesses Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 10/14] vfio-user: IOMMU support for remote device Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 11/14] vfio-user: handle DMA mappings Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 12/14] vfio-user: handle PCI BAR accesses Jagannathan Raman
2022-05-24 15:30 ` [PATCH v10 13/14] vfio-user: handle device interrupts Jagannathan Raman
2022-05-25 14:53 ` Stefan Hajnoczi
2022-05-31 15:01 ` Jag Raman
2022-05-31 20:10 ` Alex Williamson
2022-05-31 21:03 ` Stefan Hajnoczi
2022-05-31 21:45 ` Alex Williamson
2022-06-01 6:37 ` John Johnson
2022-06-01 9:38 ` Stefan Hajnoczi
2022-06-01 17:00 ` Jag Raman
2022-06-01 17:26 ` Alex Williamson
2022-06-01 18:01 ` Jag Raman
2022-06-01 18:30 ` Alex Williamson
2022-06-01 19:38 ` Jag Raman
2022-06-03 12:20 ` John Johnson
2022-06-06 18:32 ` Alexander Duyck
2022-06-06 19:29 ` Jag Raman
2022-06-06 20:38 ` Alexander Duyck [this message]
2022-05-24 15:30 ` [PATCH v10 14/14] vfio-user: handle reset of remote device Jagannathan Raman
2022-05-25 14:55 ` [PATCH v10 00/14] vfio-user server in QEMU Stefan Hajnoczi
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=CAKgT0Uf9KYAFfuoaCWv1_GwTH6kcwgpdFwrd4AUSSpnPkyu73w@mail.gmail.com \
--to=alexander.duyck@gmail.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=elena.ufimtseva@oracle.com \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=jag.raman@oracle.com \
--cc=john.g.johnson@oracle.com \
--cc=john.levon@nutanix.com \
--cc=kanth.ghatraju@oracle.com \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanha@redhat.com \
--cc=thanos.makatos@nutanix.com \
--cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).