Invoking interrupts inside a pluggable virtual device

Discussions related to using the OSE version of VirtualBox.
Post Reply
burhan
Posts: 12
Joined: 11. Sep 2015, 15:21

Invoking interrupts inside a pluggable virtual device

Post by burhan »

I constructed a device and registered it with virtualbox 4.3.28. It is working but I want it to invoke interrupts (interrupt number 11). I am using PDMDevHlpISASetIrq(pDevIns, 11, 1); call to do this. But right now I dont think it is working. I can see the Logflow() statements inside this function which should print to the debug log. I guess it is disabled by default , so i tried to turn it ON by using VBoxManage to set the log groups for this. But still I cannot see any message inside the debug log file. Please help .
michaln
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: Invoking interrupts inside a pluggable virtual device

Post by michaln »

What makes you think that it's not working?
burhan
Posts: 12
Joined: 11. Sep 2015, 15:21

Re: Invoking interrupts inside a pluggable virtual device

Post by burhan »

Because I cannot see the logflow statement inside the debug log file generated and I also run a program in the host OS to service this interrupt but the interrupt handler never gets called. One question I would like to ask though is what particular group should I turn ON for logging to see the log messages for this. Right now I am using main , PDM, PDM_DEVICE, PDM_DRIVER, gui, dev_vmm.... I also tried using "all" but the log file generated is huge and un-searchable.
michaln
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: Invoking interrupts inside a pluggable virtual device

Post by michaln »

By "host OS" you mean "guest OS"? Based on your setup, you might want to log the PIC or APIC device. Look at the top of the relevant source file, the LOG_GROUP #define will tell you what the relevant log group is called. That said, there will still be a lot of stuff in the log file.

You might have better luck with putting a breakpoint in your code and tracing through the execution with a debugger. Up to you.

Based on my experience, you're probably not setting up everything correctly on the guest OS side. Just a hunch.
burhan
Posts: 12
Joined: 11. Sep 2015, 15:21

Re: Invoking interrupts inside a pluggable virtual device

Post by burhan »

The log group used by this file is PDM_DEVICE. You are right that I should use a debugger. I am now using gdb to debug. The problem I am stuck with is the Virutalbox source code file where I want to put a breakpoint in is not including the symbols for gdb, I tried using "SharedLibrary" command in gdb to include the .so file for this but I dont seem to have luck. What is the proper way to do it. Please help
michaln
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: Invoking interrupts inside a pluggable virtual device

Post by michaln »

ASMBreakpoint()/RT_BREAKPOINT() is your friend.
Post Reply