* [PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspace segfaults)
[not found] <1177853697.30071.179.camel@localhost.localdomain>
@ 2007-04-29 13:36 ` Rusty Russell
0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2007-04-29 13:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml - Kernel Mailing List, virtualization
There's a new paravirt_lazy_mode mode in town.
Well, it's spelled "mode", but it's pronounced "hack".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
===================================================================
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -59,9 +59,13 @@ static enum paravirt_lazy_mode lazy_mode
static enum paravirt_lazy_mode lazy_mode;
static void lguest_lazy_mode(enum paravirt_lazy_mode mode)
{
- lazy_mode = mode;
- if (mode == PARAVIRT_LAZY_NONE)
+ if (mode == PARAVIRT_LAZY_FLUSH)
hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ else {
+ lazy_mode = mode;
+ if (mode == PARAVIRT_LAZY_NONE)
+ hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ }
}
static void lazy_hcall(unsigned long call,
^ permalink raw reply [flat|nested] only message in thread