aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/lguest (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-19lguest: Fix uninitialized members in example launcherRusty Russell1-3/+6
Thanks valgrind! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-11-12virtio: Force use of power-of-two for descriptor ring sizesRusty Russell1-4/+5
The virtio descriptor rings of size N-1 were nicely set up to be aligned to an N-byte boundary. But as Anthony Liguori points out, the free-running indices used by virtio require that the sizes be a power of 2, otherwise we get problems on wrap (demonstrated with lguest). So we replace the clever "2^n-1" scheme with a simple "align to page boundary" scheme: this means that all virtio rings take at least two pages, but it's safer than guessing cache alignment. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-11-12lguest: Fix lguest virtio-blk backend size computationAnthony Liguori1-4/+4
This seems like an obvious typo but it's worked in the past because the virtio blk frontend just ignores the length field on completion. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25lguest: documentation updateRusty Russell1-60/+95
Went through the documentation doing typo and content fixes. This patch contains only comment and whitespace changes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25lguest: example launcher header cleanup.Rusty Russell1-12/+11
Now the kernel headers are clean for userspace export, we don't need to typedef kernel types before including them. We also don't need pci_ids.h (that was from an earlier virtio draft). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Use "struct boot_params" in example launcherRusty Russell1-25/+22
Now that the "struct boot_params" is userspace accessible, we don't need magic numbers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Loading bzImage directly.Rusty Russell1-64/+29
Now arch/i386/boot/compressed/head.S understands the hardware_platform field, we can directly execute bzImages. No more horrific unpacking code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Revert lguest magic and use hook in head.SRusty Russell1-29/+13
Version 2.07 of the boot protocol uses 0x23C for the hardware_subarch field, that for lguest is "1". This allows us to use the standard boot entry point rather than the "GenuineLguest" string hack. The standard entry point also clears the BSS and copies the boot parameters and commandline for us, saving more code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Update lguest documentation to reflect the new virtual block device name.Chris Malley1-3/+3
Signed-off-by: Chris Malley <mail@chrismalley.co.uk> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Example launcher handle guests not being ready for inputRusty Russell1-50/+57
We currently discard console and network input when the guest has no input buffers. This patch changes that, so that we simply stop listening to that fd until the guest refills its input buffers. This is particularly important because hvc_console without interrupts does backoff polling and so often lose characters if we discard. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-23Update example launcher for virtioRusty Russell1-462/+681
Implements virtio-based console, network and block servers. The block server uses a thread so it's async, which is an improvement over the old synchronous implementation (but a little more complex). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
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 for some reason.Ronald G. Minnich1-29/+32
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>