[Lguest] Lguest Improvement

Rusty Russell rusty at rustcorp.com.au
Tue Dec 7 19:43:37 EST 2010


On Tue, 7 Dec 2010 05:18:22 pm eviatar wrote:
> OK. I would try this. BTW as we agreed "struct lguest" is now needed in
> the Launcher (not only "struct lguest_regs"), so I move it (and all the
> structures it uses) up to <asm/lguest.h>. Is this OK by you?

I think you don't need all of struct lguest.  If not, perhaps split it
into something like:

	asm/lguest.h:
	struct lguest_state {
		... // Things the launcher can see
	};

	lg.h:
	struct lguest {
		struct lguest_state state;

		// Things the launcher doesn't need.
	...
	};

> Another issue. LHREQ_INIT also initialize the page tables and the GDT.
> Isn't that a problem? Maybe instead they should be updated from the
> launcher saved "struct lguest"? 

The page tables are in guest memory (though the initial ones are laid out by
the LHREQ_INIT call), as is the GDT.

(Certain GDT entries are fixed, of course, and should not be changeable
by the launcher nor the guest).

Hope that clarifies!
Rusty.


More information about the Lguest mailing list