All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PATCH] xen-mapcache: don't unmap locked entry during mapcache invalidation
Date: Thu, 15 Mar 2012 16:18:17 +0000	[thread overview]
Message-ID: <4F621649.4030702@citrix.com> (raw)

When an IOREQ_TYPE_INVALIDATE is sent to QEMU, it invalidates all entry
of the map cache even if it's locked.

QEMU is not able to know that entry was invalidated, so when an IO
access is requested a segfault occured.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
  xen-mapcache.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen-mapcache.c b/xen-mapcache.c
index 585b559..6e7e5ab 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -370,6 +370,9 @@ void xen_invalidate_map_cache(void)
              continue;
          }
+	if (entry->lock > 0)
+	    continue;
+
          if (munmap(entry->vaddr_base, entry->size) != 0) {
              perror("unmap fails");
              exit(-1);
-- 
Julien Grall

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@citrix.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: [PATCH] xen-mapcache: don't unmap locked entry during mapcache invalidation
Date: Thu, 15 Mar 2012 16:18:17 +0000	[thread overview]
Message-ID: <4F621649.4030702@citrix.com> (raw)

When an IOREQ_TYPE_INVALIDATE is sent to QEMU, it invalidates all entry
of the map cache even if it's locked.

QEMU is not able to know that entry was invalidated, so when an IO
access is requested a segfault occured.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
  xen-mapcache.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen-mapcache.c b/xen-mapcache.c
index 585b559..6e7e5ab 100644
--- a/xen-mapcache.c
+++ b/xen-mapcache.c
@@ -370,6 +370,9 @@ void xen_invalidate_map_cache(void)
              continue;
          }
+	if (entry->lock > 0)
+	    continue;
+
          if (munmap(entry->vaddr_base, entry->size) != 0) {
              perror("unmap fails");
              exit(-1);
-- 
Julien Grall

             reply	other threads:[~2012-03-15 16:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 16:18 Julien Grall [this message]
2012-03-15 16:18 ` [PATCH] xen-mapcache: don't unmap locked entry during mapcache invalidation Julien Grall
2012-03-15 17:14 ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:14   ` Stefano Stabellini
2012-03-15 17:10   ` [Qemu-devel] " Andres Lagar-Cavilla
2012-03-15 17:10     ` Andres Lagar-Cavilla
2012-03-15 17:10   ` [Qemu-devel] " Olaf Hering
2012-03-15 17:10     ` Olaf Hering
2012-03-15 17:33     ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:33       ` Stefano Stabellini
2012-03-15 17:30   ` [Qemu-devel] [Xen-devel] " Tim Deegan
2012-03-15 17:30     ` Tim Deegan
2012-03-15 17:32     ` [Qemu-devel] " Andres Lagar-Cavilla
2012-03-15 17:32       ` Andres Lagar-Cavilla
2012-03-15 17:37       ` [Qemu-devel] " Tim Deegan
2012-03-15 17:37         ` Tim Deegan
2012-03-15 17:46     ` [Qemu-devel] " Stefano Stabellini
2012-03-15 17:46       ` Stefano Stabellini

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=4F621649.4030702@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.