[vbox-dev] HGCM question...guest memory mapping

Jaikumar G jaienigma at gmail.com
Fri Aug 3 22:14:21 GMT 2012


Hi Ram,

On Wed, Jul 18, 2012 at 1:31 AM, Ramshankar <
ramshankar.venkataraman at oracle.com> wrote:

> On 17/07/12 00:17, Jaikumar G wrote:
>
>> Hi Ram,
>>
>> Thanks that makes a lot of sense.
>>
>> Regarding allocation of memory in guest space:
>>
>> "QEMU has a feature where it can translate a guest virtual address in
>> user space directly into the corresponding physical/backing page in RAM
>> without the need for allocating memory in Guest space."
>>
>> Is is something that can be done in virtual box ? Is there any
>> significant performance differences ?
>>
>>
> I don't know the context of that quote or what feature it refers to. As
> far as VirtualBox is concerned, we could classify this into 2 cases for the
> sake of simplicity.
>
> 1. Without Nested Paging (NP) / Extended Page Tables (EPT): the hypervisor
> traps #PFs in the guest and syncs its shadow page tables. Host-side
> translation of guest addresses is done by traversing the shadow page tables.
>
> 2. With NP/EPT: #PFs in the guest are handled without causing VM-exits as
> the hardware supports an extra indirection of address translation. The host
> TLBs can cache guest linear addresses to host physical addresses.
> VirtualBox fully supports NP/EPT if the hardware has support for it.
>

Thanks for replying. Bare with me, as I am still trying to understand the
memory mapping mechanism.

The context of the question wast this. I was looking at
PDMDevHlpPhysReadGCVirt - the destination pointer needs to be allocated for
this.

So I was looking for a function where I can avoid this allocation and the
Guest Memory is direct mapped to Host and I get a pointer that I can use..

Thanks


> Regards,
> Ram.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20120803/211a94b9/attachment.html>


More information about the vbox-dev mailing list