Linux virtualization list
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	virtualization <virtualization@lists.linux-foundation.org>
Subject: [PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspace segfaults)
Date: Sun, 29 Apr 2007 23:36:58 +1000	[thread overview]
Message-ID: <1177853818.30071.182.camel@localhost.localdomain> (raw)
In-Reply-To: <1177853697.30071.179.camel@localhost.localdomain>

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,

           reply	other threads:[~2007-04-29 13:36 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1177853697.30071.179.camel@localhost.localdomain>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1177853818.30071.182.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox