You could check MSI enablement by running down config space of the device. Check the capabilities pointer and track down MSI capability.
I am assuming you have added MSI registration code in your device model matching the end point device. Past that, you simply need to look out for any upstream memory writes @ address 0xFEEXXXXX, upon receiving, simply invoke PDMDevHlpPCISetIrq(). As long as the model is MSI enabled code will pick appropriate MSI related functions. I am not sure I can comment more on Legacy without actually knowing, debugging through the code. On Wed, Mar 30, 2016 at 6:33 PM, Vilbig, Ric <ric_vil...@mentor.com> wrote: > Hi, > > > > I am not sure if the drivers are MSI enabled, or how to check that — I > just installed the guest from standard iso distribution. But I should > think when the driver is bound to a new device, it would check the > capabilities of that device. This particular device (USB mass storage > controller) does not support MSI. > > > > Yes, I am calling PDMDevHlpPCISetIrq() to signal the interrupt. This same > virtual device model works well in a VM that uses the PIIX3 chipset, but I > need to move to the ICH9 chipset to support a different device (PCIe > switch) which does require MSI support. That is actually my goal right > now, I just thought moving the older device that already works with PIIX3 > over to ICH9 would be a good first step in that transition. In the end I > need both of these devices working in the same VM. > > > > // RicV > > > > > > *From:* Ananth Pallapothu [mailto:apallapo...@gmail.com] > *Sent:* Saturday, March 26, 2016 11:00 > *To:* Vilbig, Ric > *Cc:* vbox-dev@virtualbox.org > > *Subject:* Re: [vbox-dev] Chipset support for Message Signaled Interrupts > (MSI) > > > > Are you sure your drivers aren't MSI enabled ? Not any known issues with > Legacy on ICH9 or I should rather say I didn't have any issue using Legacy > interrupts. > > > > I am assuming you invoked PDM*irq function with your device appropriately > (upon receiving the interrupt) ? > > > > On Thu, Mar 24, 2016 at 7:11 PM, Vilbig, Ric <ric_vil...@mentor.com> > wrote: > > Now I have the opposite question. Are IRQ type interrupts (as in PCI > Config 0x3d IntPin) expected to work with ICH9? > > > > I have a virtual PCI device which works with PIIX3 quite nicely using IRQ4 > — a USB3 mass storage device. But when plugged into the ICH9 VM the device > is not detected within the guest, using IRQ1/2/3/4. > > > > The guest must know the device is present, because it does lots of MMIO > Rd/Wr to it, and then the device does some DMA, and raises an interrupt. > Everything looks quite similar between the ICH9 and PIIX3 case, except the > former does nothing more after raising the interrupt, whereas the latter > continues working with lots more DMA, interrupts, and a usable mass storage > device in the guest. > > > > From what I have found so far, the interrupt is passed down into PDM, but > does not actually do anything, and dmesg in the guest says "can't derive > routing for PCI INT n". > > > > Thanks, > > > > // RicV > > > > > > *From:* Ananth Pallapothu [mailto:apallapo...@gmail.com] > *Sent:* Monday, March 21, 2016 15:55 > *To:* Vilbig, Ric > *Cc:* VirtualBox developer's list > *Subject:* Re: [vbox-dev] Chipset support for Message Signaled Interrupts > (MSI) > > > > MSI's came into existence after PIIX3. > > Yes, if you need MSI you need to use ICH9. > PIIX3 doesn't support MSI > > On Mar 21, 2016 6:43 PM, "Vilbig, Ric" <ric_vil...@mentor.com> wrote: > > Hi Experts, > > > > I posted the following on the VIrtualBox forum, but Perry recommended I > contact you by the email list. > > https://forums.virtualbox.org/viewtopic.php?f=10&t=76867 > > > ------------------------------ > > I am working on a custom PCI device model, plugged into VirtualBox via > PDM. It's mostly working, lspci for example shows it's present. But I am > having a problem with Message Signaled Interrupts (MSI). > > > > The following quote from Ch.3 of the VirtualBox User Manual implies that > the ICP9 chipset must be used for MSI support, and I have seen supporting > evidence in web searches and VBox source code (OSE 5.0.16 tarball). > > > > “...VirtualBox 4.0 introduced an emulation of the more modern ICH9 > chipset, which supports PCI express, > > three PCI buses, PCI-to-PCI bridges and Message Signaled Interrupts > (MSI)...” > > > > *Can someone confirm or refute with certainty that the PIIX3 chipset does > not support MSI and ICH9 is required for device models using MSI?* > > > > How worried should I be about this excerpt from the same paragraph? A > quick test of ICH9 VM did not go well. I've actually tried with Fedora 23, > Fedora 18 and Ubuntu 14 guests (all 64-bit) without success, but not yet > dug into it because this quote worries me. > > > > “Note that the ICH9 support is experimental and not recommended for guest > operating systems which do not require it.” > ------------------------------ > > > > Thanks in advance for your help. > > > > _____________________________________________ > > > > *Ric Vilbig* > > Mentor Graphics, Emulation Division > > 46871 Bayside Parkway, Fremont CA, 94538 > > Phone: 510-354-7360 > > Mobile: 408-529-2365 > > email: ric_vil...@mentor.com > > > > > > > _______________________________________________ > vbox-dev mailing list > vbox-dev@virtualbox.org > https://www.virtualbox.org/mailman/listinfo/vbox-dev > > > _______________________________________________ > vbox-dev mailing list > vbox-dev@virtualbox.org > https://www.virtualbox.org/mailman/listinfo/vbox-dev > > >
_______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org https://www.virtualbox.org/mailman/listinfo/vbox-dev