[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/25] COLO: notify net filters about checkpoint/fail
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PULL 17/25] COLO: notify net filters about checkpoint/failover event |
Date: |
Wed, 26 Sep 2018 11:16:42 +0800 |
From: zhanghailiang <address@hidden>
Notify all net filters about the checkpoint and failover event.
Signed-off-by: zhanghailiang <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
migration/colo.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/migration/colo.c b/migration/colo.c
index 59bb507189..57a85424fc 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -31,6 +31,7 @@
#include "qapi/qapi-events-migration.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/cpus.h"
+#include "net/filter.h"
static bool vmstate_loading;
static Notifier packets_compare_notifier;
@@ -83,6 +84,12 @@ static void secondary_vm_do_failover(void)
error_report_err(local_err);
}
+ /* Notify all filters of all NIC to do checkpoint */
+ colo_notify_filters_event(COLO_EVENT_FAILOVER, &local_err);
+ if (local_err) {
+ error_report_err(local_err);
+ }
+
if (!autostart) {
error_report("\"-S\" qemu option will be ignored in secondary side");
/* recover runstate to normal migration finish state */
@@ -782,6 +789,14 @@ void *colo_process_incoming_thread(void *opaque)
goto out;
}
+ /* Notify all filters of all NIC to do checkpoint */
+ colo_notify_filters_event(COLO_EVENT_CHECKPOINT, &local_err);
+
+ if (local_err) {
+ qemu_mutex_unlock_iothread();
+ goto out;
+ }
+
vmstate_loading = false;
vm_start();
trace_colo_vm_state_change("stop", "run");
--
2.17.1
- [Qemu-devel] [PULL 00/25] Net patches, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 25/25] e1000: indicate dropped packets in HW counters, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 24/25] net: ignore packet size greater than INT_MAX, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 23/25] pcnet: fix possible buffer overflow, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 22/25] rtl8139: fix possible out of bound access, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 19/25] docs: Add COLO status diagram to COLO-FT.txt, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 20/25] clean up callback when del virtqueue, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 14/25] COLO: flush host dirty ram from cache, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 21/25] ne2000: fix possible out of bound access in ne2000_receive, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 17/25] COLO: notify net filters about checkpoint/failover event,
Jason Wang <=
- [Qemu-devel] [PULL 18/25] COLO: quick failover process by kick COLO thread, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 13/25] savevm: split the process of different stages for loadvm/savevm, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 15/25] filter: Add handle_event method for NetFilterClass, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 11/25] qapi/migration.json: Rename COLO unknown mode to none mode., Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 05/25] COLO: Add block replication into colo process, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 07/25] COLO: Load dirty pages into SVM's RAM cache firstly, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 16/25] filter-rewriter: handle checkpoint and failover event, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 12/25] qapi: Add new command to query colo status, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 10/25] qmp event: Add COLO_EXIT event to notify users while exited COLO, Jason Wang, 2018/09/25
- [Qemu-devel] [PULL 09/25] COLO: Flush memory data from ram cache, Jason Wang, 2018/09/25