aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lguest/boot.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-07-22 01:09:50 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-07-22 01:09:50 -0400
commit9f54288def3f92b7805eb6d4b1ddcd73ecf6e889 (patch)
treebb46242a92e47112c2967354b3be0c6daecae7a7 /arch/x86/lguest/boot.c
parent3c3ed482dc077a67903a58c9e1aedba1bb18c18a (diff)
lguest: update comments
Also removes a long-unused #define and an extraneous semicolon. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r--arch/x86/lguest/boot.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 719a32c60516..74279907bc1a 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -71,7 +71,8 @@
71#include <asm/stackprotector.h> 71#include <asm/stackprotector.h>
72#include <asm/reboot.h> /* for struct machine_ops */ 72#include <asm/reboot.h> /* for struct machine_ops */
73 73
74/*G:010 Welcome to the Guest! 74/*G:010
75 * Welcome to the Guest!
75 * 76 *
76 * The Guest in our tale is a simple creature: identical to the Host but 77 * The Guest in our tale is a simple creature: identical to the Host but
77 * behaving in simplified but equivalent ways. In particular, the Guest is the 78 * behaving in simplified but equivalent ways. In particular, the Guest is the
@@ -190,15 +191,23 @@ static void lazy_hcall4(unsigned long call,
190#endif 191#endif
191 192
192/*G:036 193/*G:036
193 * When lazy mode is turned off reset the per-cpu lazy mode variable and then 194 * When lazy mode is turned off, we issue the do-nothing hypercall to
194 * issue the do-nothing hypercall to flush any stored calls. 195 * flush any stored calls, and call the generic helper to reset the
195:*/ 196 * per-cpu lazy mode variable.
197 */
196static void lguest_leave_lazy_mmu_mode(void) 198static void lguest_leave_lazy_mmu_mode(void)
197{ 199{
198 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0); 200 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0);
199 paravirt_leave_lazy_mmu(); 201 paravirt_leave_lazy_mmu();
200} 202}
201 203
204/*
205 * We also catch the end of context switch; we enter lazy mode for much of
206 * that too, so again we need to flush here.
207 *
208 * (Technically, this is lazy CPU mode, and normally we're in lazy MMU
209 * mode, but unlike Xen, lguest doesn't care about the difference).
210 */
202static void lguest_end_context_switch(struct task_struct *next) 211static void lguest_end_context_switch(struct task_struct *next)
203{ 212{
204 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0); 213 hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0);
@@ -640,7 +649,7 @@ static void lguest_write_cr4(unsigned long val)
640 649
641/* 650/*
642 * The Guest calls this after it has set a second-level entry (pte), ie. to map 651 * The Guest calls this after it has set a second-level entry (pte), ie. to map
643 * a page into a process' address space. Wetell the Host the toplevel and 652 * a page into a process' address space. We tell the Host the toplevel and
644 * address this corresponds to. The Guest uses one pagetable per process, so 653 * address this corresponds to. The Guest uses one pagetable per process, so
645 * we need to tell the Host which one we're changing (mm->pgd). 654 * we need to tell the Host which one we're changing (mm->pgd).
646 */ 655 */
@@ -1139,7 +1148,7 @@ static struct notifier_block paniced = {
1139static __init char *lguest_memory_setup(void) 1148static __init char *lguest_memory_setup(void)
1140{ 1149{
1141 /* 1150 /*
1142 *The Linux bootloader header contains an "e820" memory map: the 1151 * The Linux bootloader header contains an "e820" memory map: the
1143 * Launcher populated the first entry with our memory limit. 1152 * Launcher populated the first entry with our memory limit.
1144 */ 1153 */
1145 e820_add_region(boot_params.e820_map[0].addr, 1154 e820_add_region(boot_params.e820_map[0].addr,