From: Dor Laor <dor.laor@gmail.com>
To: kvm-devel <kvm-devel@lists.sourceforge.net>,
Anthony Liguori <aliguori@us.ibm.com>
Subject: [PATCH] Add virtio_net_id for evenry instance
Date: Tue, 04 Mar 2008 17:35:03 +0200 [thread overview]
Message-ID: <1204644903.19089.47.camel@localhost.localdomain> (raw)
repository: /home/dor/src/merge/kvm
branch: trunk
commit 27541e5166e4bb6d053b77f7fd7b3ed75db58138
Author: Dor Laor <dor.laor@qumranet.com>
Date: Tue Mar 4 08:59:03 2008 -0500
Add virtio_net_id for every instance, as suggested by Anthony Liguori
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index a05eafb..66ddfc4 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -333,6 +333,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
{
VirtIONet *n;
const char *info_str = "virtio-net";
+ static int virtio_net_id = 0;
n = (VirtIONet *)virtio_init_pci(bus, info_str, 6900, 0x1000,
0, VIRTIO_ID_NET,
@@ -361,7 +362,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
"%s macaddr=%02x:%02x:%02x:%02x:%02x:%02x", info_str,
nd->macaddr[0], nd->macaddr[1], nd->macaddr[2],
nd->macaddr[3], nd->macaddr[4], nd->macaddr[5]);
- register_savevm(info_str, 1, 1, virtio_net_save, virtio_net_load, n);
+ register_savevm(info_str, virtio_net_id++, 1, virtio_net_save, virtio_net_load, n);
return &n->vdev;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
reply other threads:[~2008-03-04 15:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1204644903.19089.47.camel@localhost.localdomain \
--to=dor.laor@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=dor.laor@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
/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