Jeroen Janssen wrote:
> what functions allows me to:
>         * "reserve" some memory in the guest that I can use as 
>           frame buffer
>         * transfer memory from the guest to host

All of the virtualised physical memory is mapped
into the user program's address space using an
mmap call.  You don't "reserve" a piece of memory
but you simply use it (you could use your API calls
to have the guest specify its requested location of
the framebuffer).  You can use the calls vm_read_physical()
and vm_write_physical() (check out the source) to read
and write from the guest's physical memory in the user
program.

>         * register some API functions in the guest that are 
>           "callbacked" to host?

You should hook I/O ports using plugin_alloc_inp()
and plugin_alloc_outp() (in the current tree still
unified in plugin_alloc()) and use them to pass
data to and from the driver.  Check out
plugins/bochs/io.cc for example usage.

-- Ramon


Reply via email to