diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-21 20:56:23 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 01:49:48 -0400 |
commit | 9653c4aff94e43de5f4ef918d47e00018beb4105 (patch) | |
tree | a02ea6c46dbb471c54996c376c8e5c2510133b73 /Documentation/lguest/lguest.txt | |
parent | 141341cdae5f1745e3903a6b9732672230b1dd64 (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>
Diffstat (limited to 'Documentation/lguest/lguest.txt')
-rw-r--r-- | Documentation/lguest/lguest.txt | 68 |
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 | |||
6 | Linux developers and users to experiment with virtualization with the | 6 | Linux developers and users to experiment with virtualization with the |
7 | minimum of complexity. Nonetheless, it should have sufficient | 7 | minimum of complexity. Nonetheless, it should have sufficient |
8 | features to make it useful for specific tasks, and, of course, you are | 8 | features to make it useful for specific tasks, and, of course, you are |
9 | encouraged to fork and enhance it. | 9 | encouraged to fork and enhance it (see drivers/lguest/README). |
10 | 10 | ||
11 | Features: | 11 | Features: |
12 | 12 | ||
@@ -23,19 +23,30 @@ Developer features: | |||
23 | 23 | ||
24 | Running Lguest: | 24 | Running 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 | ||
102 | Lguest I/O model: | 116 | There is a helpful mailing list at http://ozlabs.org/mailman/listinfo/lguest |
103 | |||
104 | Lguest uses a simplified DMA model plus shared memory for I/O. Guests | ||
105 | can communicate with each other if they share underlying memory | ||
106 | (usually by the lguest program mmaping the same file), but they can | ||
107 | use any non-shared memory to communicate with the lguest process. | ||
108 | |||
109 | Guests can register DMA buffers at any key (must be a valid physical | ||
110 | address) using the LHCALL_BIND_DMA(key, dmabufs, num<<8|irq) | ||
111 | hypercall. "dmabufs" is the physical address of an array of "num" | ||
112 | "struct lguest_dma": each contains a used_len, and an array of | ||
113 | physical addresses and lengths. When a transfer occurs, the | ||
114 | "used_len" field of one of the buffers which has used_len 0 will be | ||
115 | set to the length transferred and the irq will fire. | ||
116 | 117 | ||
117 | Using an irq value of 0 unbinds the dma buffers. | 118 | Good luck! |
118 | |||
119 | To send DMA, the LHCALL_SEND_DMA(key, dma_physaddr) hypercall is used, | ||
120 | and the bytes used is written to the used_len field. This can be 0 if | ||
121 | noone else has bound a DMA buffer to that key or some other error. | ||
122 | DMA buffers bound by the same guest are ignored. | ||
123 | |||
124 | Cheers! | ||
125 | Rusty Russell rusty@rustcorp.com.au. | 119 | Rusty 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]. | ||