[Qemu-devel] [Bug 1305400] [NEW] qmp-version of memsave makes a zero filled dump

2014-04-09 Thread Andrey Karpov
Public bug reported: calling the memsave function through hmp and qmp makes a different results. it happened because hmp_memsave calls synchronization of cpu, but qmp_marshal_input_memsave does not. so virDomainMemoryPeek (libvirt api) does not work correctly 1) hmp: void hmp_memsave(Monitor *mon

[Qemu-devel] [PATCH] synchronize state of the cpu before memory reading

2014-04-08 Thread Andrey Karpov
--- cpus.c |1 + 1 file changed, 1 insertion(+) diff --git a/cpus.c b/cpus.c index 1104d61..4c53747 100644 --- a/cpus.c +++ b/cpus.c @@ -1417,6 +1417,7 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename, return; } +cpu_synchronize_state(cpu); while

[Qemu-devel] [PATCH] qmp: synchronize state of the cpu before memory reading

2014-04-08 Thread Andrey Karpov
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