aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-09-09 17:58:40 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-02-16 17:30:19 +0100
commit43771539d4666cba16298fc6b0ea63867425277c (patch)
tree1b04add361e2733f686068b498e7c989fb1e8f45 /include/exec
parent439c5e02d59659876e1a2cf019c55e419adab195 (diff)
exec: protect mru_block with RCU
Hence, freeing a RAMBlock has to be switched to call_rcu. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/cpu-all.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 2c4828694b..b8781d118a 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -24,6 +24,7 @@
#include "exec/memory.h"
#include "qemu/thread.h"
#include "qom/cpu.h"
+#include "qemu/rcu.h"
/* some important defines:
*
@@ -268,6 +269,7 @@ CPUArchState *cpu_copy(CPUArchState *env);
typedef struct RAMBlock RAMBlock;
struct RAMBlock {
+ struct rcu_head rcu;
struct MemoryRegion *mr;
uint8_t *host;
ram_addr_t offset;