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