All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] MSI-X interrupt emulation
@ 2014-08-01  6:22 Danzer, Uwe
  2014-08-13  6:14 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Danzer, Uwe @ 2014-08-01  6:22 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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.

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?

Many thanks in advance!

Best regards
Uwe Danzer



[-- Attachment #2: Type: text/html, Size: 2457 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] MSI-X interrupt emulation
  2014-08-01  6:22 [Qemu-devel] MSI-X interrupt emulation Danzer, Uwe
@ 2014-08-13  6:14 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2014-08-13  6:14 UTC (permalink / raw)
  To: Danzer, Uwe; +Cc: qemu-devel@nongnu.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-13  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01  6:22 [Qemu-devel] MSI-X interrupt emulation Danzer, Uwe
2014-08-13  6:14 ` Jan Kiszka

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.