[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states()
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states() |
Date: |
Mon, 1 Jun 2020 19:40:00 +0100 |
From: Lukas Straub <lukasstraub2@web.de>
cpu_synchronize_all_pre_loadvm() marks all vcpus as dirty, so the
registers are loaded from CPUState before we continue running
the vm. However if we failover during checkpoint, CPUState is not
initialized and the registers are loaded with garbage. This causes
guest hangs and crashes.
Fix this by using cpu_synchronize_all_states(), which initializes
CPUState from the current cpu registers additionally to marking
the vcpus as dirty.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Message-Id:
<9675031ce557b73ebd10e7bd20ebbf57f30b177c.1589193382.git.lukasstraub2@web.de>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/colo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/colo.c b/migration/colo.c
index fe0d6e93e5..d00b3b9d6b 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -705,7 +705,7 @@ static void
colo_incoming_process_checkpoint(MigrationIncomingState *mis,
}
qemu_mutex_lock_iothread();
- cpu_synchronize_all_pre_loadvm();
+ cpu_synchronize_all_states();
ret = qemu_loadvm_state_main(mis->from_src_file, mis);
qemu_mutex_unlock_iothread();
--
2.26.2
- Re: [PULL 04/12] hmp: Simplify qom-set, (continued)
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, David Hildenbrand, 2020/06/03
- Re: [PULL 04/12] hmp: Simplify qom-set, Dr. David Alan Gilbert, 2020/06/03
- [PULL 01/12] migration/rdma: fix potential nullptr access in rdma_start_incoming_migration, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 05/12] virtiofsd: remove symlink fallbacks, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 08/12] migration/colo.c: Use cpu_synchronize_all_states(),
Dr. David Alan Gilbert (git) <=
- [PULL 06/12] migration/vmstate: Remove unnecessary MemoryRegion forward declaration, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 09/12] migration/colo.c: Flush ram cache only after receiving device state, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 10/12] migration/colo.c: Relaunch failover even if there was an error, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 07/12] migration/colo.c: Use event instead of semaphore, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 11/12] migration/colo.c: Move colo_notify_compares_event to the right place, Dr. David Alan Gilbert (git), 2020/06/01
- [PULL 12/12] migration/migration.c: Fix hang in ram_save_host_page, Dr. David Alan Gilbert (git), 2020/06/01
- Re: [PULL 00/12] migration/virtiofs/hmp queue, Peter Maydell, 2020/06/02