Page 1 of 1

Invoking interrupts inside a pluggable virtual device

Posted: 2. Oct 2015, 17:40
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 .

Re: Invoking interrupts inside a pluggable virtual device

Posted: 3. Oct 2015, 15:48
by michaln
What makes you think that it's not working?

Re: Invoking interrupts inside a pluggable virtual device

Posted: 5. Oct 2015, 23:25
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.

Re: Invoking interrupts inside a pluggable virtual device

Posted: 6. Oct 2015, 10:46
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.

Re: Invoking interrupts inside a pluggable virtual device

Posted: 6. Oct 2015, 19:16
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

Re: Invoking interrupts inside a pluggable virtual device

Posted: 6. Oct 2015, 22:10
by michaln
ASMBreakpoint()/RT_BREAKPOINT() is your friend.