|
71 | 71 | #include <asm/stackprotector.h> |
72 | 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 | 77 | * The Guest in our tale is a simple creature: identical to the Host but |
77 | 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 | 191 | #endif |
191 | 192 |
|
192 | 193 | /*G:036 |
193 | | - * When lazy mode is turned off reset the per-cpu lazy mode variable and then |
194 | | - * issue the do-nothing hypercall to flush any stored calls. |
195 | | -:*/ |
| 194 | + * When lazy mode is turned off, we issue the do-nothing hypercall to |
| 195 | + * flush any stored calls, and call the generic helper to reset the |
| 196 | + * per-cpu lazy mode variable. |
| 197 | + */ |
196 | 198 | static void lguest_leave_lazy_mmu_mode(void) |
197 | 199 | { |
198 | 200 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0, 0); |
199 | 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 | + */ |
202 | 211 | static void lguest_end_context_switch(struct task_struct *next) |
203 | 212 | { |
204 | 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 | 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 | 653 | * address this corresponds to. The Guest uses one pagetable per process, so |
645 | 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 = { |
1139 | 1148 | static __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 | 1152 | * Launcher populated the first entry with our memory limit. |
1144 | 1153 | */ |
1145 | 1154 | e820_add_region(boot_params.e820_map[0].addr, |
|
0 commit comments