<div>Hi,</div>
<div> </div>
<div>Thanks for the reply.</div>
<div> </div>
<div>Is there a way to directly access guest user space addresses from the hypervisor, without copying it contents</div>
<div>via the guest kernel? i.e. without taking the guest kernel's help.</div>
<div> </div>
<div>Basically, given a virtual address from the objdump output of an ELF executable, and if this executable</div>
<div>is executing in the guest user space, can the hypervisor access the contents of this running process directly?</div>
<div> </div>
<div>Thanks in advance,</div>
<div>Sujit<br><br></div>
<div class="gmail_quote">On Tue, May 20, 2008 at 11:03 PM, Rusty Russell <<a href="mailto:rusty@rustcorp.com.au" target="_blank">rusty@rustcorp.com.au</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div>On Wednesday 21 May 2008 11:41:14 Sujit Sanjeev wrote:<br>> Hi,<br>><br>> I am trying to access guest memory areas (both kernel and user space) from<br>> within lguest.<br>><br>> I was able to read the guest kernel area by using the __pa() value of the<br>
> guest address as the source address in copy_from_user().<br>><br>> I was wondering, if there is a similar method to read the contents from<br>> guest userspace area too. Since, as I understand __pa()<br>> works only on kernel virtual addresses. What would be an equivalent to read<br>
> contents from guest's user space?<br>><br>> Basically, given a virtual address of a guest user space program, how do I<br>> read the contents at that address from within<br>> the hypervisor (lguest).<br>
<br></div></div>Yes, you need to get_user_pages() the pages in the guest kernel, then hand<br>those physical addresses to the hypervisor. Otherwise the pages might not<br>even be resident.<br><br>Hope that helps,<br><font color="#888888">Rusty.<br>
</font></blockquote></div><br>