* [PATCH] Add virtio_net_id for evenry instance
@ 2008-03-04 15:35 Dor Laor
0 siblings, 0 replies; only message in thread
From: Dor Laor @ 2008-03-04 15:35 UTC (permalink / raw)
To: kvm-devel, Anthony Liguori
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/
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-04 15:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04 15:35 [PATCH] Add virtio_net_id for evenry instance Dor Laor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox