aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/hypercalls.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-03-28 12:05:53 -0400
committerRusty Russell <rusty@rustcorp.com.au>2008-03-27 20:05:54 -0400
commita6bd8e13034dd7d60b6f14217096efa192d0adc1 (patch)
tree23890908b06eb8357e6ce633d35df1216f5e4213 /drivers/lguest/hypercalls.c
parente18b094f0faa4889b06a112da17230a10b88c815 (diff)
lguest: comment documentation update.
Took some cycles to re-read the Lguest Journey end-to-end, fix some rot and tighten some phrases. Only comments change. No new jokes, but a couple of recycled old jokes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/hypercalls.c')
-rw-r--r--drivers/lguest/hypercalls.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c
index 0f2cb4fd7c69..54d66f05fefa 100644
--- a/drivers/lguest/hypercalls.c
+++ b/drivers/lguest/hypercalls.c
@@ -29,7 +29,7 @@
29#include "lg.h" 29#include "lg.h"
30 30
31/*H:120 This is the core hypercall routine: where the Guest gets what it wants. 31/*H:120 This is the core hypercall routine: where the Guest gets what it wants.
32 * Or gets killed. Or, in the case of LHCALL_CRASH, both. */ 32 * Or gets killed. Or, in the case of LHCALL_SHUTDOWN, both. */
33static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) 33static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
34{ 34{
35 switch (args->arg0) { 35 switch (args->arg0) {
@@ -190,6 +190,13 @@ static void initialize(struct lg_cpu *cpu)
190 * pagetable. */ 190 * pagetable. */
191 guest_pagetable_clear_all(cpu); 191 guest_pagetable_clear_all(cpu);
192} 192}
193/*:*/
194
195/*M:013 If a Guest reads from a page (so creates a mapping) that it has never
196 * written to, and then the Launcher writes to it (ie. the output of a virtual
197 * device), the Guest will still see the old page. In practice, this never
198 * happens: why would the Guest read a page which it has never written to? But
199 * a similar scenario might one day bite us, so it's worth mentioning. :*/
193 200
194/*H:100 201/*H:100
195 * Hypercalls 202 * Hypercalls
@@ -227,7 +234,7 @@ void do_hypercalls(struct lg_cpu *cpu)
227 * However, if we are signalled or the Guest sends I/O to the 234 * However, if we are signalled or the Guest sends I/O to the
228 * Launcher, the run_guest() loop will exit without running the 235 * Launcher, the run_guest() loop will exit without running the
229 * Guest. When it comes back it would try to re-run the 236 * Guest. When it comes back it would try to re-run the
230 * hypercall. */ 237 * hypercall. Finding that bug sucked. */
231 cpu->hcall = NULL; 238 cpu->hcall = NULL;
232 } 239 }
233} 240}