qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] memory: check address space when a listener is registered
@ 2012-04-04 14:15 Julien Grall
  2012-04-05 10:10 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Grall @ 2012-04-04 14:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Julien Grall, avi, Stefano.Stabellini

This patch resolves a bug in memory listener registration.
"range_add" callback  was called on each section of the both
address space (IO and memory space) even if it doesn't match
the address space filter.

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

diff --git a/memory.c b/memory.c
index 22b0352..a9d237d 100644
--- a/memory.c
+++ b/memory.c
@@ -1444,6 +1444,11 @@ static void listener_add_address_space(MemoryListener *listener,
 {
     FlatRange *fr;
 
+    if (listener->address_space_filter
+        && listener->address_space_filter != as->root) {
+        return;
+    }
+
     if (global_dirty_log) {
         listener->log_global_start(listener);
     }
-- 
Julien Grall

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] memory: check address space when a listener is registered
  2012-04-04 14:15 [Qemu-devel] [PATCH] memory: check address space when a listener is registered Julien Grall
@ 2012-04-05 10:10 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-04-05 10:10 UTC (permalink / raw)
  To: Julien Grall; +Cc: qemu-devel, Stefano.Stabellini

On 04/04/2012 05:15 PM, Julien Grall wrote:
> This patch resolves a bug in memory listener registration.
> "range_add" callback  was called on each section of the both
> address space (IO and memory space) even if it doesn't match
> the address space filter.
>

Thanks, applied.

Did you find this bug by inspection, or did it bite you?  I thought all
listeners were registered before address spaces were materialized.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-05 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 14:15 [Qemu-devel] [PATCH] memory: check address space when a listener is registered Julien Grall
2012-04-05 10:10 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).