aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-10-21 20:56:23 -0400
committerRusty Russell <rusty@rustcorp.com.au>2007-10-23 01:49:48 -0400
commit9653c4aff94e43de5f4ef918d47e00018beb4105 (patch)
treea02ea6c46dbb471c54996c376c8e5c2510133b73
parent141341cdae5f1745e3903a6b9732672230b1dd64 (diff)
lguest.txt update
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>
-rw-r--r--Documentation/lguest/lguest.txt68
1 files changed, 29 insertions, 39 deletions
diff --git a/Documentation/lguest/lguest.txt b/Documentation/lguest/lguest.txt
index 821617bd6c04..b60f0ab9de49 100644
--- a/Documentation/lguest/lguest.txt
+++ b/Documentation/lguest/lguest.txt
@@ -6,7 +6,7 @@ Lguest is designed to be a minimal hypervisor for the Linux kernel, for
6Linux developers and users to experiment with virtualization with the 6Linux developers and users to experiment with virtualization with the
7minimum of complexity. Nonetheless, it should have sufficient 7minimum of complexity. Nonetheless, it should have sufficient
8features to make it useful for specific tasks, and, of course, you are 8features to make it useful for specific tasks, and, of course, you are
9encouraged to fork and enhance it. 9encouraged to fork and enhance it (see drivers/lguest/README).
10 10
11Features: 11Features:
12 12
@@ -23,19 +23,30 @@ Developer features:
23 23
24Running Lguest: 24Running Lguest:
25 25
26- Lguest runs the same kernel as guest and host. You can configure 26- The easiest way to run lguest is to use same kernel as guest and host.
27 them differently, but usually it's easiest not to. 27 You can configure them differently, but usually it's easiest not to.
28 28
29 You will need to configure your kernel with the following options: 29 You will need to configure your kernel with the following options:
30 30
31 CONFIG_HIGHMEM64G=n ("High Memory Support" "64GB")[1] 31 "General setup":
32 CONFIG_TUN=y/m ("Universal TUN/TAP device driver support") 32 "Prompt for development and/or incomplete code/drivers" = Y
33 CONFIG_EXPERIMENTAL=y ("Prompt for development and/or incomplete code/drivers") 33 (CONFIG_EXPERIMENTAL=y)
34 CONFIG_PARAVIRT=y ("Paravirtualization support (EXPERIMENTAL)") 34
35 CONFIG_LGUEST=y/m ("Linux hypervisor example code") 35 "Processor type and features":
36 36 "Paravirtualized guest support" = Y
37 and I recommend: 37 "Lguest guest support" = Y
38 CONFIG_HZ=100 ("Timer frequency")[2] 38 "High Memory Support" = off/4GB
39 "Alignment value to which kernel should be aligned" = 0x100000
40 (CONFIG_PARAVIRT=y, CONFIG_LGUEST_GUEST=y, CONFIG_HIGHMEM64G=n and
41 CONFIG_PHYSICAL_ALIGN=0x100000)
42
43 "Device Drivers":
44 "Network device support"
45 "Universal TUN/TAP device driver support" = M/Y
46 (CONFIG_TUN=m)
47 "Virtualization"
48 "Linux hypervisor example code" = M/Y
49 (CONFIG_LGUEST=m)
39 50
40- A tool called "lguest" is available in this directory: type "make" 51- A tool called "lguest" is available in this directory: type "make"
41 to build it. If you didn't build your kernel in-tree, use "make 52 to build it. If you didn't build your kernel in-tree, use "make
@@ -51,14 +62,17 @@ Running Lguest:
51 dd if=/dev/zero of=rootfile bs=1M count=2048 62 dd if=/dev/zero of=rootfile bs=1M count=2048
52 qemu -cdrom image.iso -hda rootfile -net user -net nic -boot d 63 qemu -cdrom image.iso -hda rootfile -net user -net nic -boot d
53 64
65 Make sure that you install a getty on /dev/hvc0 if you want to log in on the
66 console!
67
54- "modprobe lg" if you built it as a module. 68- "modprobe lg" if you built it as a module.
55 69
56- Run an lguest as root: 70- Run an lguest as root:
57 71
58 Documentation/lguest/lguest 64m vmlinux --tunnet=192.168.19.1 --block=rootfile root=/dev/lgba 72 Documentation/lguest/lguest 64 vmlinux --tunnet=192.168.19.1 --block=rootfile root=/dev/lgba
59 73
60 Explanation: 74 Explanation:
61 64m: the amount of memory to use. 75 64: the amount of memory to use, in MB.
62 76
63 vmlinux: the kernel image found in the top of your build directory. You 77 vmlinux: the kernel image found in the top of your build directory. You
64 can also use a standard bzImage. 78 can also use a standard bzImage.
@@ -99,31 +113,7 @@ Running Lguest:
99 "--sharenet=<filename>": any two guests using the same file are on 113 "--sharenet=<filename>": any two guests using the same file are on
100 the same network. This file is created if it does not exist. 114 the same network. This file is created if it does not exist.
101 115
102Lguest I/O model: 116There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest
103
104Lguest uses a simplified DMA model plus shared memory for I/O. Guests
105can communicate with each other if they share underlying memory
106(usually by the lguest program mmaping the same file), but they can
107use any non-shared memory to communicate with the lguest process.
108
109Guests can register DMA buffers at any key (must be a valid physical
110address) using the LHCALL_BIND_DMA(key, dmabufs, num<<8|irq)
111hypercall. "dmabufs" is the physical address of an array of "num"
112"struct lguest_dma": each contains a used_len, and an array of
113physical addresses and lengths. When a transfer occurs, the
114"used_len" field of one of the buffers which has used_len 0 will be
115set to the length transferred and the irq will fire.
116 117
117Using an irq value of 0 unbinds the dma buffers. 118Good luck!
118
119To send DMA, the LHCALL_SEND_DMA(key, dma_physaddr) hypercall is used,
120and the bytes used is written to the used_len field. This can be 0 if
121noone else has bound a DMA buffer to that key or some other error.
122DMA buffers bound by the same guest are ignored.
123
124Cheers!
125Rusty Russell rusty@rustcorp.com.au. 119Rusty Russell rusty@rustcorp.com.au.
126
127[1] These are on various places on the TODO list, waiting for you to
128 get annoyed enough at the limitation to fix it.
129[2] Lguest is not yet tickless when idle. See [1].