From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Hans de Goede <hdegoede@redhat.com>, Gerd Hoffman <kraxel@redhat.com>
Subject: [Qemu-devel] VMState assertion for USB devices on multiple buses
Date: Thu, 18 Aug 2011 11:04:41 -0700 [thread overview]
Message-ID: <20110818180441.GB2973@redhat.com> (raw)
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 \
-nodefconfig -nodefaults \
-vnc 127.0.0.1:0 -vga cirrus -monitor stdio \
-device ich9-usb-ehci1,addr=1d.7,multifunction=on,id=ehci0 \
-device ich9-usb-uhci1,addr=1d.0,multifunction=on,id=uhci0-1,masterbus=ehci0.0,firstport=0 \
-device ich9-usb-uhci2,addr=1d.1,multifunction=on,id=uhci0-2,masterbus=ehci0.0,firstport=2 \
-device ich9-usb-uhci3,addr=1d.2,multifunction=on,id=uhci0-3,masterbus=ehci0.0,firstport=4 \
-device usb-tablet,bus=ehci0.0,port=1,id=t1 \
-device ich9-usb-ehci1,addr=1c.7,multifunction=on,id=ehci1 \
-device ich9-usb-uhci1,addr=1c.0,multifunction=on,id=uhci1-1,masterbus=ehci1.0,firstport=0 \
-device ich9-usb-uhci2,addr=1c.1,multifunction=on,id=uhci1-2,masterbus=ehci1.0,firstport=2 \
-device ich9-usb-uhci3,addr=1c.2,multifunction=on,id=uhci1-3,masterbus=ehci1.0,firstport=4 \
-device usb-tablet,bus=ehci1.0,port=1,id=t2
*** EHCI support is under development ***
*** EHCI support is under development ***
qemu-system-x86_64: savevm.c:1260: vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id == 0' failed.
Aborted
If I have a CCID on one bus, and tablet on the other it works
# qemu-system-x86_64 \
-nodefconfig -nodefaults \
-vnc 127.0.0.1:0 -vga cirrus -monitor stdio \
-device ich9-usb-ehci1,addr=1d.7,multifunction=on,id=ehci0 \
-device ich9-usb-uhci1,addr=1d.0,multifunction=on,id=uhci0-1,masterbus=ehci0.0,firstport=0 \
-device ich9-usb-uhci2,addr=1d.1,multifunction=on,id=uhci0-2,masterbus=ehci0.0,firstport=2 \
-device ich9-usb-uhci3,addr=1d.2,multifunction=on,id=uhci0-3,masterbus=ehci0.0,firstport=4 \
-device usb-tablet,bus=ehci0.0,port=1,id=t1 \
-device ich9-usb-ehci1,addr=1c.7,multifunction=on,id=ehci1 \
-device ich9-usb-uhci1,addr=1c.0,multifunction=on,id=uhci1-1,masterbus=ehci1.0,firstport=0 \
-device ich9-usb-uhci2,addr=1c.1,multifunction=on,id=uhci1-2,masterbus=ehci1.0,firstport=2 \
-device ich9-usb-uhci3,addr=1c.2,multifunction=on,id=uhci1-3,masterbus=ehci1.0,firstport=4 \
-device usb-ccid,bus=ehci1.0,port=1,id=t2
But if I have 2 CCID devices, then I see failure again
# qemu-system-x86_64 \
-nodefconfig -nodefaults \
-vnc 127.0.0.1:0 -vga cirrus -monitor stdio \
-device ich9-usb-ehci1,addr=1d.7,multifunction=on,id=ehci0 \
-device ich9-usb-uhci1,addr=1d.0,multifunction=on,id=uhci0-1,masterbus=ehci0.0,firstport=0 \
-device ich9-usb-uhci2,addr=1d.1,multifunction=on,id=uhci0-2,masterbus=ehci0.0,firstport=2 \
-device ich9-usb-uhci3,addr=1d.2,multifunction=on,id=uhci0-3,masterbus=ehci0.0,firstport=4 \
-device usb-ccid,bus=ehci0.0,port=1,id=t1 \
-device ich9-usb-ehci1,addr=1c.7,multifunction=on,id=ehci1 \
-device ich9-usb-uhci1,addr=1c.0,multifunction=on,id=uhci1-1,masterbus=ehci1.0,firstport=0 \
-device ich9-usb-uhci2,addr=1c.1,multifunction=on,id=uhci1-2,masterbus=ehci1.0,firstport=2 \
-device ich9-usb-uhci3,addr=1c.2,multifunction=on,id=uhci1-3,masterbus=ehci1.0,firstport=4 \
-device usb-ccid,bus=ehci1.0,port=1,id=t2
*** EHCI support is under development ***
*** EHCI support is under development ***
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.
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
Regrads,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next reply other threads:[~2011-08-18 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 18:04 Daniel P. Berrange [this message]
2011-08-22 7:21 ` [Qemu-devel] VMState assertion for USB devices on multiple buses Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110818180441.GB2973@redhat.com \
--to=berrange@redhat.com \
--cc=hdegoede@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).