[vbox-dev] Question regarding channel callbacks between guest and host
jaeyong.yoo at samsung.com
Fri Apr 25 00:30:40 UTC 2014
> Sender : Michael Thayer<michael.thayer at oracle.com>
> Date : 2014-04-24 23:00 (GMT+09:00)
> Title : Re: [vbox-dev] Question regarding channel callbacks between guest and host
> Hello Jaeyong,
> On 24/04/14 15:18, Jaeyong Yoo wrote:
> > While I'm reading the source, I found the following sequence of
> > function call:
> > [In xpdm directory] VBoxMPHGSMIDpc () -->
> > VBoxHGSMIProcessHostQueue () -->
> > hgsmiHostCommandQueryProcess() -->
> > hgsmiHostCmdProcess () -->
> > HGSMIBufferProcess () -->
> > hgsmiBufferProcess () -->
> > HGSMIChannelHandlerCall () -->
> > pfnHandler() ==
> > [Host side] vbvaChannelHandler
> > It looks like a guest-side function (in VGA driver) VBoxMPHGSMIDpc
> > calls the host-side function (in VGA emulator) vbvaChannelHandler.
> > How is this possible since host and guest are in different address
> > space (if we are using nested paging table)? Or, I'm feeling like I
> > miss something.
> I'm not too familiar with that code, but what makes you think that
> pfnHandler points to vbvaChannelHandler() inside the guest driver? See
> line 626 of
> rc = HGSMIChannelRegister(&pCommon->hostCtx.channels, u8Channel,
> "VGA Miniport HGSMI channel",
> pContexts, &s_OldHandler);
> So I would guess that VBoxVbvaChannelGenericHandlerCB() is what is being
> called. In any case there should be no direct calls from the guest to
> the host address space.
Oh, I must got confused with the line 2411
rc = HGSMIHostChannelRegister (pVGAState->pHGSMI,
where HGSMIHostChannelRegister is finally calling
rc = HGSMIChannelRegister (&pIns->channelInfo, u8Channel, NULL, pfnChannelHandler, pvChannelHandler, pOldHandler);
They must have the same function name but reside in different address space (guest and host).
Currently, I'm trying to figure out how guest and host interact with events (such as guest notifying host or host injecting interrupt to guest).
I'm suspecting that VBox is also using VT-x techniques (such as IO port/MMIO emulation or virtual APIC interrupt injection).
But, it is quite hard to point the source that actually do that. Could you give me a little heads up?
More information about the vbox-dev