summaryrefslogtreecommitdiff
path: root/Documentation/lguest
AgeCommit message (Collapse)AuthorFilesLines
2007-10-23Boot with virtual == physical to get closer to native Linux.Rusty Russell1-103/+31
1) This allows us to get alot closer to booting bzImages. 2) It means we don't have to know page_offset. 3) The Guest needs to modify the boot pagetables to create the PAGE_OFFSET mapping before jumping to C code. 4) guest_pa() walks the page tables rather than using page_offset. 5) We don't use page_offset to figure out whether to emulate: it was always kinda quesationable, and won't work for instructions done before remapping (bzImage unpacking in particular). 6) We still want the kernel address for tlb flushing: have the initial hypercall give us that, too. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Change example launcher to use unsigned long not u32Jes Sorensen1-13/+14
Apply Clue 2x4 to lguest userland<->kernel handling code and the lguest launcher. Pointers are not to be passed in u32's! Basic rule of thumb: Anything passing u32's back and forth should be passing unsigned longs to be portable to 64 bit archs. For those who forgotten already, I repeat: NO POINTERS IN u32! Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Introduce guest mem offset, static link example launcherRusty Russell2-102/+113
In order to avoid problematic special linking of the Launcher, we give the Host an offset: this means we can use any memory region in the Launcher as Guest memory rather than insisting on mmap() at 0. The result is quite pleasing: a number of casts are replaced with simple additions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Accept elf files that are valid but have sections that can not be mmap'ed ↵Ronald G. Minnich1-29/+32
for some reason. Plan9 kernel binaries don't neatly align their ELF sections to our page boundaries. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Make lguest_launcher.h types userspace-friendlyRusty Russell2-3/+3
lguest_launcher.h uses "u32" not "__u32", which sets a bad example. Fix that, and include <linux/types.h>. This means we need to use -I on the Launcher build line so types.h is found. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23lguest.txt updateRusty Russell1-39/+29
o Describe the new split configurations o Highlight code documentation in drivers/lguest/README o Point out necessity of having a getty on /dev/hvc0 o Remove gratuitous "m" in example o Don't discuss I/O model here, stick to user documentation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23turn err into errx in lguest call sitesGlauber de Oliveira Costa1-2/+2
These two callsites should really be errx instead of err, since there is no errno associated with them in the moment they are issued. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Glauber de Oliveira Costa <gcosta@redhat.com>
2007-10-23Make asm-x86/bootparam.h includable from userspace.Rusty Russell1-1/+1
To actually write a bootloader (or, say, the lguest launcher) currently requires duplication of these structures. Making them includable from userspace is much nicer. We merge the common userspace-required definitions of e820_32/64.h into e820.h for export. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-11i386/x86_64: move headers to include/asm-x86Thomas Gleixner1-1/+1
Move the headers to include/asm-x86 and fixup the header install make rules Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-09-26lguest example launcher truncates block device file to 0 length on problemsChris Malley1-1/+1
The function should also use ftruncate64() rather than ftruncate() to prevent files over 4GB (not uncommon for a root filesystem) being zeroed. Signed-off-by: Chris Malley <mail@chrismalley.co.uk> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-09lguest: avoid shared libraries mapped over guest memoryRonald G. Minnich1-1/+3
Some versions of ld.so mmap the shared libraries right in over guest memory, so compile lguest statically by default. [ FC7 maps shared libraries very low, where the launcher maps guest's physical memory. Quick fix is to link Launcher static, real fix is for 2.6.24. ] -static is a simple fix. I expect this problem will be more common than we like, as different distro's make different "improvements" to ld.so Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-26lguest: documentation VII: FIXMEsRusty Russell1-0/+12
Documentation: The FIXMEs Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-26lguest: documentation IV: LauncherRusty Russell1-44/+555
Documentation: The Launcher Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-26lguest: documentation I: PreparationRusty Russell2-2/+65
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-24link lguest example launcher non-staticRusty Russell2-52/+35
S.Caglar Onur points out that many distributions don't ship a static zlib. Unfortunately the launcher currently maps virtual device memory where shared libraries want to go. The solution is to pre-scan the args to figure out how much memory we have, then allocate devices above that, rather than down from the top possible address. This also turns out to be simpler. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19lguest: the documentation, example launcherRusty Russell3-0/+1168
A brief document describing how to use lguest. Because lguest doesn't have an ABI we also include an example launcher in the Documentation directory. [jmorris@namei.org: Fix up nat example in documentation] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <ak@suse.de> Signed-off-by: James Morris <jmorris@namei.org> Cc: Matias Zabaljauregui <matias.zabaljauregui@cern.ch> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>