On 2016-06-06 at 10:36 "Ronald G. Minnich" <[email protected]> wrote:
> These are two simple translation helpers, one for converting
> an arbitrary guest kernel virtual address to a physical
> address (and hence host process virtual address); and one
> to return the guest kernel RIP as a physical address (and hence
> host virtual address).
> 
> Currently, they just blow the upper 34 bits of the guest
> VA to zero, since the high part of the negative address
> space is low physical memory.
> 
> Longer term, we may need to walk page tables, but so
> far there has been no need.

Eventually, we'll need to use the page tables so that we can translate
any GVA - not just Linux kernel GVAs.  The function should be able to
handle any of those.

When the time comes for that, I wrote a gva2gpa() in the kernel.
Userspace can do something similar, since it has a read-only view of
its page tables.  Though technically it only has a view of the KPT - not
the EPT.  That should be fine, since the EPT is a subset of the KPT,
but we'll have to be careful.

Either way, it's better we have the functionality hidden behind a
function (like we do because of this patch).


Merged to master at c46b403791f6..15bc690a05ea (from, to]

You can see the entire diff with 'git diff' or at
https://github.com/brho/akaros/compare/c46b403791f6...15bc690a05ea

Barret


-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to