On Wednesday 21 May 2008 11:41:14 Sujit Sanjeev wrote:
> Hi,
>
> I am trying to access guest memory areas (both kernel and user space) from
> within lguest.
>
> I was able to read the guest kernel area by using the __pa() value of the
> guest address as the source address in copy_from_user().
>
> I was wondering, if there is a similar method to read the contents from
> guest userspace area too. Since, as I understand __pa()
> works only on kernel virtual addresses. What would be an equivalent to read
> contents from guest's user space?
>
> Basically, given a virtual address of a guest user space program, how do I
> read the contents at that address from within
> the hypervisor (lguest).

Yes, you need to get_user_pages() the pages in the guest kernel, then hand 
those physical addresses to the hypervisor.  Otherwise the pages might not 
even be resident.

Hope that helps,
Rusty.
_______________________________________________
Lguest mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/lguest

Reply via email to