On 08/18/11 20:04, Daniel P. Berrange wrote: > I've been experimenting with multiple USB2 buses, and device physical port > addressing. It seems if you have 2 devices of the same type on the same > port, but in different buses, you get a bogus VMState assertion failure > qemu-system-x86_64: savevm.c:1260: vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id == 0' failed. > Aborted > AFAICT, the problem is that the 'se->idstr' field in the SaveStateEntry > struct is not getting a unique enough value. > > Both the USB devices get idstr named "1/usb-ccid", which IIUC is a > combination of the device type and the port number. Indeed. > IMHO, it needs to have the USB bus name in there too eg. in this > example it should have been > > ehci0.0/1/usb-ccid > ehci1.0/1/usb-ccid I assumed the savevm code walks up the device path and creates a unique name by prefixing the string with the parents pci address, but it doesn't :-( We can do that outself though, see attached patch. That gives us IDs like this: 0000:00:01.2/uhci (hcd, unchanged) 0000:00:01.2/1/usb-ptr (usb devs, now with hcd pci addr) Juan? Does that look sane? cheers, Gerd