[vbox-dev] Accessing guest memory from the vBox host
Sander van Leeuwen
sander.x.van.leeuwen at oracle.com
Thu Aug 19 00:55:47 PDT 2010
On 8/18/2010 7:42 AM, Glenn Tremblay wrote:
>
> I am new to vbox development/architecture and would like to understand
> my options in accessing guest memory from the vbox host side. I am
> running a Windows guest in a vbox VM with vbox running on top of
> CentOS. The windows guest contains a proprietary I/O driver that
> generates requests from 4k to 64k in size. Ideally I'd like to pass
> down the virtual/physical address and length to vbox on the host and
> them map the buffer into the host's memory space for access by a
> vbox/linux driver. The host driver must be able to read and write the
> guest I/O buffer. Also ideally these buffer addresses will potentially
> be different for each I/O buffer to be mapped -- although I could get
> away with a fixed mapped region and copy the buffer to that
> preallocated shared region every time if necessary.
>
> So my questions are:
>
> 1) What are my options for mapping any portion of guest address space
> to host accessible address space? And unmap it when done.
>
Two options:
1) create a virtual device that reads and writes from/to guest memory;
you can map guest memory into host memory, but that is generally discouraged
2) create a virtual device that maps an associated MMIO range into guest
memory (our VGA device does that)
> 2) Are there any memory address limitations? (e.g. guest address range
> must be < 4 GB)
>
None.
> 3) Is there any existing vbox code I study that utilizes this type of
> guest memory/buffer access?
>
The existing virtual devices. There's a very basic sample device in
src/VMM/Devices/Samples, but you can look at any of the others for more
info.
Sander
> Thanks in advance for any assistance anyone can provide,
>
> Glenn
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100819/c9c7626f/attachment-0001.html
More information about the vbox-dev
mailing list