[Lguest] Lguest modification.

Rusty Russell rusty at rustcorp.com.au
Fri Oct 26 10:08:10 EST 2007


On Thursday 25 October 2007 19:30:17 Sujit Sanjeev wrote:
> Hi All,

Hi Sujit,

> I want to do something similar, nothing related to interrupts ,but I would
> like to:
>
> 1. Store some data (variable or constant) in a host protected or hypervisor
> protected memory area, maybe in a page by itself.

OK, you can do this.  You'll need to allocate the page in lguest.c and hand it 
as an arg to the INITIALIZE write() to tell the kernel about it.  Then you'll 
need to copy it into the lguest_data structure so the Guest knows about it.

Then hack page_table.c to kill the Guest if it does a write fault on this 
particular page.

> 2. If the guest needs the value of this variable, it must make a hypercall
> and the host must return the value. For this I would like to add a new
> hypercall.

Adding a new hypercall is really easy.

>     Basically, I don't want the guest getting direct access to that
> variable, i.e. it should not be stored in the guest's memory address space.

I don't know how useful this will be, but it's certainly not too hard.

Good luck!
Rusty.



More information about the Lguest mailing list