On Mon, 2011-04-25 at 10:28 -0600, David Ahern wrote: > Running qemu-kvm.git as of today (ffce28f, April 18, 2011) the virtual > function passed to the VM is losing its assigned mac address. That is, > prior to launching qemu-kvm, the following command is run to set the MAC > address: > > ip link set dev eth2 vf 0 mac 02:12:34:56:79:20 > > Yet, when the VM boots the MAC address is random which is what happens > when the VF is reset. Looking through the commit logs between 0.13.0 -- > the version in Fedora 14 -- and latest git I found the following: > > commit d9488459ff2ab113293586c1c36b1679bb15deee > Author: Alex Williamson <alex.williamson@xxxxxxxxxx> > Date: Thu Mar 17 15:24:31 2011 -0600 > > device-assignment: Reset device on system reset > > On system reset, we currently try to quiesce DMA by clearing the > command register. This assumes that nothing re-enables bus master > support without first de-programming the device. Use a bigger > hammer to help the guest not shoot itself by issuing a function > reset via sysfs on each system reset. > > Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx> > Acked-by: Chris Wright <chrisw@xxxxxxxxxx> > Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> > > > Is this the cause of the MAC address reset and is this behavior intended? Ugh, I hope not, it's certainly not an intended side effect. Can you see if the problem still happens if you revert this patch? If it does, we might need more device specific reset functions to save and restore that extra bit of state. I assume this is still the 82576 VF you were asking about before? Thanks, Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html