From: Jason Wang <jasowang@redhat.com>
To: aliguori@us.ibm.com, pbonzini@redhat.com, owasserm@redhat.com,
qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>, mst@redhat.com
Subject: [Qemu-devel] [PATCH V7 2/5] net: announce self after vm is started
Date: Thu, 7 Mar 2013 16:23:48 +0800 [thread overview]
Message-ID: <1362644631-23113-3-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1362644631-23113-1-git-send-email-jasowang@redhat.com>
Since we may want to send garp by guest if guest driver is capable of it. We
need trigger this event after vm is started. So this patch do this when the
state is changing from RUN_STATE_PRELAUNCH_MIGRATE to RUN_STATE_RUNINNG.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
migration.c | 1 -
vl.c | 4 ++++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/migration.c b/migration.c
index ecdf2c5..3599d2d 100644
--- a/migration.c
+++ b/migration.c
@@ -100,7 +100,6 @@ static void process_incoming_migration_co(void *opaque)
fprintf(stderr, "load of migration failed\n");
exit(0);
}
- qemu_announce_self();
DPRINTF("successfully loaded vm state\n");
bdrv_clear_incoming_migration_all();
diff --git a/vl.c b/vl.c
index 5dd2e0e..ccf6ea7 100644
--- a/vl.c
+++ b/vl.c
@@ -1681,11 +1681,15 @@ void vm_state_notify(int running, RunState state)
void vm_start(void)
{
if (!runstate_is_running()) {
+ RunState prev_run_state = current_run_state;
cpu_enable_ticks();
runstate_set(RUN_STATE_RUNNING);
vm_state_notify(1, RUN_STATE_RUNNING);
resume_all_vcpus();
monitor_protocol_event(QEVENT_RESUME, NULL);
+ if (prev_run_state == RUN_STATE_PRELAUNCH_MIGRATE) {
+ qemu_announce_self();
+ }
}
}
--
1.7.1
next prev parent reply other threads:[~2013-03-07 8:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 8:23 [Qemu-devel] [PATCH V7 0/5] Send the gratuitous by guest Jason Wang
2013-03-07 8:23 ` [Qemu-devel] [PATCH V7 1/5] runstate: introduce prelaunch-migrate state Jason Wang
2013-03-07 15:37 ` Eric Blake
2013-03-11 14:31 ` Jiri Denemark
2013-03-12 3:09 ` Jason Wang
2013-03-07 8:23 ` Jason Wang [this message]
2013-03-07 8:23 ` [Qemu-devel] [PATCH V7 3/5] net: model specific announcing support Jason Wang
2013-03-07 8:23 ` [Qemu-devel] [PATCH V7 4/5] virtio-net: notify guest to annouce itself Jason Wang
2013-03-07 8:23 ` [Qemu-devel] [PATCH V7 5/5] virtio-net: compat guest announce Jason Wang
2013-03-07 10:04 ` [Qemu-devel] [PATCH V7 0/5] Send the gratuitous by guest Michael S. Tsirkin
2013-03-07 10:13 ` Jason Wang
2013-03-07 10:25 ` Michael S. Tsirkin
2013-03-07 10:33 ` Jason Wang
2013-03-07 10:52 ` Michael S. Tsirkin
2013-03-08 3:41 ` Jason Wang
2013-03-08 11:03 ` Stefan Hajnoczi
2013-03-11 7:45 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362644631-23113-3-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=mst@redhat.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).