From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Danzer, Uwe" <uwe.danzer@siemens.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] MSI-X interrupt emulation
Date: Wed, 13 Aug 2014 08:14:20 +0200 [thread overview]
Message-ID: <53EB023C.5050305@siemens.com> (raw)
In-Reply-To: <72E8820D80E4B94AB8DA5A287D013A7C1B2DD792@DENBGAT9EI5MSX.ww902.siemens.net>
On 2014-08-01 08:22, Danzer, Uwe wrote:
> Hi there,
>
> I'm implementing an emulated PCIe Memory class device, but can't get MSI-X interrupt emulation working.
>
> So far, the card appears in the guest system and the driver for the card recognises it and the emulation of 1MB of accessible r/w registers works as desired.
>
> As the real card is connected to the outside world, it can signal events from there to the software via 5 MSI-X interrupts. Though I do not manage do get MSI-X emulation working in my implementation.
>
> The guest OS is QNX and works just fine on the real hardware. Running QNX as guest inside QEMU, the command pci -vvv (QNX equivalent of lspci on Linux) shows my card and that it says it's able to do the desired 5 MSI-X interrupts, but the QNX driver doesn't activate MSI-X for the card.
>
I suppose the config space layouts are identical between emulated and
real card? Just in case the QNX driver has hard-coded capability offsets
(it shouldn't, but who knows).
Do you have the source code of the driver?
> In my init function of the PCIe card, I try to make MSI-X available with this code:
>
> ret = msix_init_exclusive_bar (dev, 5, 1);
> if (ret) {
> printf("msix_init() failed\n");
> } else {
> int i;
>
> for (i = 0; i < 5; i++) {
> msix_vector_use (dev, i);
> }
>
> msix = 1;
> }
>
> Can someone tell me, what is wrong or missing in my code or does somebody have a minimal example for a (pseudo)device with MSI-X?
If the problem still persists and you can't share your code here, drop
me an email directly, and I can have a look or suggest further
instrumentations.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2014-08-13 6:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 6:22 [Qemu-devel] MSI-X interrupt emulation Danzer, Uwe
2014-08-13 6:14 ` Jan Kiszka [this message]
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=53EB023C.5050305@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=uwe.danzer@siemens.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.