Skip to contentSkip to conversation

QMP: Really move the RESET event to qemu_system_reset()

PATCH Applied Luiz Capitulino 2 participants 3 messages Mar 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 QMP: Really move the RESET event to qemu_system_reset()

Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop().

Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first).

This commit moves (again) the RESET event into qemu_system_reset().

---
 vl.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
vl.c +1 -2
index d8328c7..fd89e50 100644
@@ -3148,8 +3148,6 @@ static void do_vm_stop(int reason)
         vm_state_notify(0, reason);
         monitor_protocol_event(QEVENT_STOP, NULL);
     }
-
-    monitor_protocol_event(QEVENT_RESET, NULL);
 }
 
 void qemu_register_reset(QEMUResetHandler *func, void *opaque)
@@ -3182,6 +3180,7 @@ void qemu_system_reset(void)
     QTAILQ_FOREACH_SAFE(re, &reset_handlers, entry, nre) {
         re->func(re->opaque);
     }
+    monitor_protocol_event(QEVENT_RESET, NULL);
     cpu_synchronize_all_post_reset();
 }
 
Signature · 1 line
1.7.0.2.182.ge007
#1 lore raw
Quoted 7 lines · Luiz Capitulino

Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop().

Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first).

It's not due to conflict resolution, it's due to patch applying with fuzz. I'm not sure I have a great solution to avoid this.

Regards,

Anthony Liguori

Quoted 29 lines

This commit moves (again) the RESET event into qemu_system_reset().

---
  vl.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
vl.c +1 -2
index d8328c7..fd89e50 100644
@@ -3148,8 +3148,6 @@ static void do_vm_stop(int reason)
          vm_state_notify(0, reason);
          monitor_protocol_event(QEVENT_STOP, NULL);
      }
-
-    monitor_protocol_event(QEVENT_RESET, NULL);
  }
 
  void qemu_register_reset(QEMUResetHandler *func, void *opaque)
@@ -3182,6 +3180,7 @@ void qemu_system_reset(void)
      QTAILQ_FOREACH_SAFE(re,&reset_handlers, entry, nre) {
          re->func(re->opaque);
      }
+    monitor_protocol_event(QEVENT_RESET, NULL);
      cpu_synchronize_all_post_reset();
  }
 
#2 lore raw
In reply to Luiz Capitulino
Quoted 11 lines · Luiz Capitulino

Something bad has happened in the merge of commit 0ee44250, as the log message says it's supposed to be in qemu_system_reset() but it is do_vm_stop().

Possibly, it was a problem with the conflict resolution with ea375f9a (which has been merged first).

This commit moves (again) the RESET event into qemu_system_reset().

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 26 lines
---
  vl.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
vl.c +1 -2
index d8328c7..fd89e50 100644
@@ -3148,8 +3148,6 @@ static void do_vm_stop(int reason)
          vm_state_notify(0, reason);
          monitor_protocol_event(QEVENT_STOP, NULL);
      }
-
-    monitor_protocol_event(QEVENT_RESET, NULL);
  }
 
  void qemu_register_reset(QEMUResetHandler *func, void *opaque)
@@ -3182,6 +3180,7 @@ void qemu_system_reset(void)
      QTAILQ_FOREACH_SAFE(re,&reset_handlers, entry, nre) {
          re->func(re->opaque);
      }
+    monitor_protocol_event(QEVENT_RESET, NULL);
      cpu_synchronize_all_post_reset();
  }