Compiling VirtualBox for MSI Interrupts
Compiling VirtualBox for MSI Interrupts
Hello,
I have been trying to get/ run VirtualBox compiled for Interrupts (MSI). Looking through the source code I found MSI specific source code is ifdef'ed out under defines PCI_INCLUDE_PRIVATE, PCIDEVICEINT_DECLARED. Trying to check if there are any other known defines ? and if there is a way to use command line options to add these defines.
Thanks.
I have been trying to get/ run VirtualBox compiled for Interrupts (MSI). Looking through the source code I found MSI specific source code is ifdef'ed out under defines PCI_INCLUDE_PRIVATE, PCIDEVICEINT_DECLARED. Trying to check if there are any other known defines ? and if there is a way to use command line options to add these defines.
Thanks.
-
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Any and all
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
Why not start by explaining what it is you're trying to achieve in the end...
I don't really understand the question because regular VirtualBox releases have supported MSIs (with appropriate devices and ICH9 chipset) for years.
I don't really understand the question because regular VirtualBox releases have supported MSIs (with appropriate devices and ICH9 chipset) for years.
Re: Compiling VirtualBox for MSI Interrupts
I am adding an extension (new) device to the VirtualBox setup, which works quite right with registration, transfer between this device <-> VirtualBox etc. Device on the other side is connected to custom architectural model.
Now I am looking to add MSI support into this new device. Custom model generates necessary MSI request, but that request apparently doesn't seem to be reaching VirtualBox.
I greped for current MSI support from other devices and found these examples viz, USB/DevOHCI.cpp, Storage/DevAHCI.cpp and replicated Interrupt specific code which implies I am not doing something right. Hence the question.
Return code "rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);" returns false. So, can't start the Virtual machine (with the new device)
If there is source code specific document for interrupts that would really really help.
Thanks.
Now I am looking to add MSI support into this new device. Custom model generates necessary MSI request, but that request apparently doesn't seem to be reaching VirtualBox.
I greped for current MSI support from other devices and found these examples viz, USB/DevOHCI.cpp, Storage/DevAHCI.cpp and replicated Interrupt specific code which implies I am not doing something right. Hence the question.
Return code "rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);" returns false. So, can't start the Virtual machine (with the new device)
If there is source code specific document for interrupts that would really really help.
Thanks.
-
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Any and all
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
No, it doesn't, because it doesn't return a bool value. It returns a VBox error code. See VINF_SUCCESS.Dhaks wrote:Return code "rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);" returns false.
You have the full source code to your own project and to VirtualBox. We only have the source code to VirtualBox. I'm afraid only you have the data to figure out the problem.If there is source code specific document for interrupts that would really really help.
What sort of device are you implementing?
Re: Compiling VirtualBox for MSI Interrupts
Understand. My comment was, do you (or any expert) by chance can isolate MSI implementation specific code ? or if there is any spec available.
-
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Any and all
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
I'm not sure what the question is exactly. MSI documentation in general, or VirtualBox specific implementation? The former can be found in PCI specifications and to some extent Intel CPU documentation, the latter is in the VirtualBox source code.
Again, what are you trying to implement, and what is it you don't understand exactly? You're asking very vague questions.
Again, what are you trying to implement, and what is it you don't understand exactly? You're asking very vague questions.
Re: Compiling VirtualBox for MSI Interrupts
Yes I do understand the actual MSI interrupts but it is VirtualBox implementation, that isn't working for me. Device is a custom device meant to do something specific for inhouse implementation.VirtualBox specific implementation?
As far as I understand from examples, implementation from other devices, I added all the defines, header files, specific code but YET invoking " rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);" returns
ERROR: Failed to map MSI register space
00:01:39.627348 PDM: Failed to construct '..../0! VERR_NOT_IMPLEMENTED (-12) - The request function is not implemented.
00:01:39.632739 AIOMgr: Flush failed with VERR_INVALID_PARAMETER, disabling async flushes
00:01:39.640547 NamedPipe0: accept failed, rc=VERR_INVALID_PARAMETER
First part of ERROR message is something I wrote right after reading rc
rc = PDMDevHlpPCIRegisterMsi(pDevIns, &MsiReg);
if (RT_FAILURE(rc)) {
LogRel(("ERROR: Failed to map MSI register space \n"));
return rc;
}
It's obvious I am not doing the configuration right as since other devices are functional with MSI. So trying to get the expert advice on specific code (or documentation) of VirtualBox MSI implementation.
Last edited by Dhaks on 29. Jul 2015, 23:33, edited 1 time in total.
-
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Any and all
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
Are you building with VBOX_WITH_MSI_DEVICES defined? Is your VM configured with the ICH9 chipset? Asking just in case.Dhaks wrote:It's obvious I am not doing the configuration right as since other devices are functional with MSI. So trying to get the expert advice on specific code (or documentation) of VirtualBox MSI implementation.
Obviously without seeing the arguments you're passing to PDMDevHlpPCIRegisterMsi(), there's not a lot else I can say... but you can trace through the PDMDevHlpPCIRegisterMsi call and see what really happens.
And one miscellaneous note: VirtualBox 5.0 contains several MSI-related fixes which may or may not be relevant to you.
Re: Compiling VirtualBox for MSI Interrupts
Do you please mind editing the first line in your previous response
Yes, I am compiling using define VBOX_WITH_MSI_DEVICES. But, where do I set this ICH9 in VM ?Are you building with VBOX_WITH_MSI_DEVICES defined? Is your VM configured with the ICH9 chipset? Asking just in case.
-
- Oracle Corporation
- Posts: 2973
- Joined: 19. Dec 2007, 15:45
- Primary OS: MS Windows 7
- VBox Version: PUEL
- Guest OSses: Any and all
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
I see I just did...Dhaks wrote:Do you please mind editing the first line in your previous response
It's the "chipset" configuration option in the System/Motherboard VM settings. Not a compile-time thing at all.Yes, I am compiling using define VBOX_WITH_MSI_DEVICES. But, where do I set this ICH9 in VM ?
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Compiling VirtualBox for MSI Interrupts
Moved to "VirtualBox OSE", forum fitting for the discussion
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!