diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-22 11:24:10 +1000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 15:49:55 +1000 |
commit | 15045275c32bf6d15d32c2eca8157be9c0ba6e45 (patch) | |
tree | 32ef90c875b22cb1bbb94e38f557a690f1c0c6f8 /drivers/lguest/hypercalls.c | |
parent | 0ca49ca946409f87a8cd0b14d5acb6dea58de6f3 (diff) | |
download | linux-3.10-15045275c32bf6d15d32c2eca8157be9c0ba6e45.tar.gz linux-3.10-15045275c32bf6d15d32c2eca8157be9c0ba6e45.tar.bz2 linux-3.10-15045275c32bf6d15d32c2eca8157be9c0ba6e45.zip |
Remove old lguest I/O infrrasructure.
This patch gets rid of the old lguest host I/O infrastructure and
replaces it with a single hypercall "LHCALL_NOTIFY" which takes an
address.
The main change is the removal of io.c: that mainly did inter-guest
I/O, which virtio doesn't yet support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/hypercalls.c')
-rw-r--r-- | drivers/lguest/hypercalls.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c index 13b5f2f813d..3a53788ba45 100644 --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c @@ -60,22 +60,9 @@ static void do_hcall(struct lguest *lg, struct hcall_args *args) else guest_pagetable_flush_user(lg); break; - case LHCALL_BIND_DMA: - /* BIND_DMA really wants four arguments, but it's the only call - * which does. So the Guest packs the number of buffers and - * the interrupt number into the final argument, and we decode - * it here. This can legitimately fail, since we currently - * place a limit on the number of DMA pools a Guest can have. - * So we return true or false from this call. */ - args->arg0 = bind_dma(lg, args->arg1, args->arg2, - args->arg3 >> 8, args->arg3 & 0xFF); - break; /* All these calls simply pass the arguments through to the right * routines. */ - case LHCALL_SEND_DMA: - send_dma(lg, args->arg1, args->arg2); - break; case LHCALL_NEW_PGTABLE: guest_new_pagetable(lg, args->arg1); break; @@ -99,6 +86,9 @@ static void do_hcall(struct lguest *lg, struct hcall_args *args) /* Similarly, this sets the halted flag for run_guest(). */ lg->halted = 1; break; + case LHCALL_NOTIFY: + lg->pending_notify = args->arg1; + break; default: if (lguest_arch_do_hcall(lg, args)) kill_guest(lg, "Bad hypercall %li\n", args->arg0); @@ -156,9 +146,9 @@ static void do_async_hcalls(struct lguest *lg) break; } - /* Stop doing hypercalls if we've just done a DMA to the - * Launcher: it needs to service this first. */ - if (lg->dma_is_pending) + /* Stop doing hypercalls if they want to notify the Launcher: + * it needs to service this first. */ + if (lg->pending_notify) break; } } @@ -220,9 +210,9 @@ void do_hypercalls(struct lguest *lg) do_async_hcalls(lg); /* If we stopped reading the hypercall ring because the Guest did a - * SEND_DMA to the Launcher, we want to return now. Otherwise we do + * NOTIFY to the Launcher, we want to return now. Otherwise we do * the hypercall. */ - if (!lg->dma_is_pending) { + if (!lg->pending_notify) { do_hcall(lg, lg->hcall); /* Tricky point: we reset the hcall pointer to mark the * hypercall as "done". We use the hcall pointer rather than |