qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] sending pci information over the wire


From: Glauber Costa
Subject: [Qemu-devel] sending pci information over the wire
Date: Thu, 18 Jun 2009 16:39:46 -0300
User-agent: Jack Bauer

Hi folks,

I have some trial code here for a proposal, which I'd like to hear your
opinions about (Well, I _had_, because I'm totally stupid and git reset'd --hard
the wrong location, that happened to contain part of the code for it)

Let me start by explaining what I'm trying to accomplish, and say that I myself
am not sure this is the best approach, it is just a crazy idea that poped up.

Right now, migration of pci devices work by a bit of luck. This is because the
other side of the wire can enumerate the devices in a different order, causing
them to end up at different addresses. Markus approach of pci_addr= patches
do help that fact. 

However, theoretically, there can be a case in which we:
 * start receiving guest, with parameters determined by pci_addr=
 * start live migration
 * add a device.

The receiving guest won't know about that device, and migration then fail.
This is not a problem _today_, as mgmt tools disallow addition of hardware
during migration. But this is a restriction that comes exactly from the lack
of robustness of migration! Furthermore, mgmt tools might want to change
that behaviour in the future...

That said, my proposal is as following:

in the savevm part of the pci bus, list properties of all present devices.
on the load part of the pci bus, scan the bus looking for devices that
should be present and are not, and create them, if needed.

A new machine type gets added, pc_migr, that does not put pci devices in the 
bus.
All pci devices will be missing, and them them all get created.

To do that, we also have to save/load some qemu internal state. For example,
nd_table has to be transferred, to guarantee that proper configuration will
exist on the other side. Ultimately, that can be used to transfer _all_ qemu
internal state. A side effect, is that a qemu instance receiving migration
can be shot with : qemu-system-x86_64 -M pc_migr -incoming addr -vnc :x.
It is not that important, if you use mgmt apps, but a nice side effect, 
otherwise.

I tested this with some network cards, and it kinda works. So, let me know what
is the general feeling about that. If there is a compelling case for it,
I can go back and hack it more. Otherwise, it was fun anyway.


----- End forwarded message -----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]