Skip to contentSkip to conversation

qmp: synchronize state of the cpu before memory reading

PATCH New Andrey Karpov 1 participant 2 messages Apr 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qmp: synchronize state of the cpu before memory reading

calling "memsave' through the qmp makes a zero filled dump. the hmp still works properly because hmp_memsave calls cpu_synchronize_state before calling qmp_memsave.

---

Andrey Karpov (1):
synchronize state of the cpu before memory reading

 cpus.c |    1 +
 1 file changed, 1 insertion(+)

--
Signature

#1 lore raw

PATCH 1/1 synchronize state of the cpu before memory reading

---
 cpus.c |    1 +
 1 file changed, 1 insertion(+)
cpus.c +1 -0
index 1104d61..4c53747 100644
@@ -1417,6 +1417,7 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename,
         return;
     }
 
+    cpu_synchronize_state(cpu);
     while (size != 0) {
         l = sizeof(buf);
         if (l > size)