[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] MSI-X interrupt emulation
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] MSI-X interrupt emulation |
Date: |
Wed, 13 Aug 2014 08:14:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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