@@ -639,6 +639,24 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
qxl->guest_primary.commands++;
qxl_track_command(qxl, ext);
qxl_log_command(qxl, "cmd", ext);
+ {
+ void *msg = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id);
+ if (msg < (void *)qxl->vga.vram_ptr ||
+ msg > ((void *)qxl->vga.vram_ptr + qxl->vga.vram_size)) {
+#if 1
+ /* temporary, for 2.9 */
+ static int once;
+ if (!once) {
+ fprintf(stderr, "qxl: guest bug: command not in ram bar, "
+ "guest not migratable\n");
+ once = true;
+ }
+#else
+ qxl_set_guest_bug(qxl, "command not in ram bar");
+ return false;
+#endif
+ }
+ }
trace_qxl_ring_command_get(qxl->id, qxl_mode_to_string(qxl->mode));
return true;
default: