summary refs log tree commit diff stats
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-01-15 12:46:47 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-02-16 17:30:19 +0100
commit76e5c76f2e2e0d20bab2cd5c7a87452f711654fb (patch)
treef312a288fac7f37635618aacbc4303c81e5116fd /cpu-exec.c
parent8b5c216025c312ab01542c4595393e0fdcbed015 (diff)
downloadfocaccia-qemu-76e5c76f2e2e0d20bab2cd5c7a87452f711654fb.tar.gz
focaccia-qemu-76e5c76f2e2e0d20bab2cd5c7a87452f711654fb.zip
exec: introduce cpu_reload_memory_map
This for now is a simple TLB flush.  This can change later for two
reasons:

1) an AddressSpaceDispatch will be cached in the CPUState object

2) it will not be possible to do tlb_flush once the TCG-generated code
runs outside the BQL.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index fa506e628a..78fe382162 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -141,6 +141,12 @@ void cpu_resume_from_signal(CPUState *cpu, void *puc)
     cpu->exception_index = -1;
     siglongjmp(cpu->jmp_env, 1);
 }
+
+void cpu_reload_memory_map(CPUState *cpu)
+{
+    /* The TLB is protected by the iothread lock.  */
+    tlb_flush(cpu, 1);
+}
 #endif
 
 /* Execute a TB, and fix up the CPU state afterwards if necessary */