qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] VMState assertion for USB devices on multiple buses


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] VMState assertion for USB devices on multiple buses
Date: Mon, 22 Aug 2011 09:21:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Red Hat/3.1.12-1.el6_1 Thunderbird/3.1.12

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

Attachment: fix
Description: Text document


reply via email to

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