|
30 | 30 | #include "qemu/module.h"
|
31 | 31 | #include "hw/qdev-properties.h"
|
32 | 32 | #include "sysemu/runstate.h"
|
33 |
| -#include "migration/blocker.h" |
34 | 33 | #include "migration/vmstate.h"
|
35 | 34 | #include "trace.h"
|
36 | 35 |
|
@@ -666,30 +665,6 @@ static int interface_get_command(QXLInstance *sin, struct QXLCommandExt *ext)
|
666 | 665 | qxl->guest_primary.commands++;
|
667 | 666 | qxl_track_command(qxl, ext);
|
668 | 667 | qxl_log_command(qxl, "cmd", ext);
|
669 |
| - { |
670 |
| - /* |
671 |
| - * Windows 8 drivers place qxl commands in the vram |
672 |
| - * (instead of the ram) bar. We can't live migrate such a |
673 |
| - * guest, so add a migration blocker in case we detect |
674 |
| - * this, to avoid triggering the assert in pre_save(). |
675 |
| - * |
676 |
| - * https://cgit.freedesktop.org/spice/win32/qxl-wddm-dod/commit/?id=f6e099db39e7d0787f294d5fd0dce328b5210faa |
677 |
| - */ |
678 |
| - void *msg = qxl_phys2virt(qxl, ext->cmd.data, ext->group_id); |
679 |
| - if (msg != NULL && ( |
680 |
| - msg < (void *)qxl->vga.vram_ptr || |
681 |
| - msg > ((void *)qxl->vga.vram_ptr + qxl->vga.vram_size))) { |
682 |
| - if (!qxl->migration_blocker) { |
683 |
| - Error *local_err = NULL; |
684 |
| - error_setg(&qxl->migration_blocker, |
685 |
| - "qxl: guest bug: command not in ram bar"); |
686 |
| - migrate_add_blocker(qxl->migration_blocker, &local_err); |
687 |
| - if (local_err) { |
688 |
| - error_report_err(local_err); |
689 |
| - } |
690 |
| - } |
691 |
| - } |
692 |
| - } |
693 | 668 | trace_qxl_ring_command_get(qxl->id, qxl_mode_to_string(qxl->mode));
|
694 | 669 | return true;
|
695 | 670 | default:
|
@@ -1283,12 +1258,6 @@ static void qxl_hard_reset(PCIQXLDevice *d, int loadvm)
|
1283 | 1258 | qemu_spice_create_host_memslot(&d->ssd);
|
1284 | 1259 | qxl_soft_reset(d);
|
1285 | 1260 |
|
1286 |
| - if (d->migration_blocker) { |
1287 |
| - migrate_del_blocker(d->migration_blocker); |
1288 |
| - error_free(d->migration_blocker); |
1289 |
| - d->migration_blocker = NULL; |
1290 |
| - } |
1291 |
| - |
1292 | 1261 | if (startstop) {
|
1293 | 1262 | qemu_spice_display_start();
|
1294 | 1263 | }
|
@@ -2283,7 +2252,9 @@ static int qxl_pre_save(void *opaque)
|
2283 | 2252 | } else {
|
2284 | 2253 | d->last_release_offset = (uint8_t *)d->last_release - ram_start;
|
2285 | 2254 | }
|
2286 |
| - assert(d->last_release_offset < d->vga.vram_size); |
| 2255 | + if (d->last_release_offset < d->vga.vram_size) { |
| 2256 | + return 1; |
| 2257 | + } |
2287 | 2258 |
|
2288 | 2259 | return 0;
|
2289 | 2260 | }
|
|
0 commit comments