This would need some refactoring to do it correctly over all targets
involved. For now, simply prevent this from happening.

We do the check at beginning of function, so no need to call cleanup
routine.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 dump/dump.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dump/dump.c b/dump/dump.c
index 52be7258a5d..0ecff682dd4 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -1795,6 +1795,12 @@ static void dump_init(DumpState *s, int fd, bool 
has_format,
     int nr_cpus;
     int ret;
 
+    if (target_heterogeneous()) {
+        error_setg(errp,
+                   "dumping guest memory is not supported for heterogeneous 
emulation");
+        return;
+    }
+
     s->has_format = has_format;
     s->format = format;
     s->written_size = 0;
-- 
2.47.3


Reply via email to