Invoking interrupts inside a pluggable virtual device

Discussions related to using the OSE version of VirtualBox.

Invoking interrupts inside a pluggable virtual device

Postby burhan » 2. Oct 2015, 17:40

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 .
burhan
 
Posts: 12
Joined: 11. Sep 2015, 15:21

Re: Invoking interrupts inside a pluggable virtual device

Postby michaln » 3. Oct 2015, 15:48

What makes you think that it's not working?
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: Invoking interrupts inside a pluggable virtual device

Postby burhan » 5. Oct 2015, 23:25

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.
burhan
 
Posts: 12
Joined: 11. Sep 2015, 15:21

Re: Invoking interrupts inside a pluggable virtual device

Postby michaln » 6. Oct 2015, 10:46

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.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all

Re: Invoking interrupts inside a pluggable virtual device

Postby burhan » 6. Oct 2015, 19:16

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
burhan
 
Posts: 12
Joined: 11. Sep 2015, 15:21

Re: Invoking interrupts inside a pluggable virtual device

Postby michaln » 6. Oct 2015, 22:10

ASMBreakpoint()/RT_BREAKPOINT() is your friend.
michaln
Oracle Corporation
 
Posts: 2958
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 2 guests