[Lguest] Lguest modification.

Glauber de Oliveira Costa glommer at gmail.com
Fri Oct 26 08:17:39 EST 2007


On 10/25/07, Sujit Sanjeev <sujit771 at gmail.com> wrote:
> Hi All,
>
> The comments for the file /drivers/lguest/lguest.c mentions:
>
> "One way would be to put the "irq_enabled" field in a page by itself, and
> have the Host write-protect it when an interrupt comes in when irqs are
> disabled.
>  There will then be a page fault as soon as interrupts are re-enabled. "
>
> 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.
>
> 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.
>     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 exactly what you're trying to do, but it seems to me that
you either:
a) Want something to be completely invisible to the guest, in which
case you don't need to put it on a separate page, special address, or
anything. Just keep in the host structures, and issue a hypercall when
you need it. It is the way most values are used currently in lguest.

b) Want something visible to the guest. (but not writable), in which
case you just need to read it when you want. Issuing a hypercall here
is unnecessary and expensive.

In both scenarios, your 1) and 2) seem mutually excludent.

-- 
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."



More information about the Lguest mailing list