summary refs log tree commit diff stats
path: root/hw/usb.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-08-22 09:09:51 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-04-17 10:23:21 +0200
commiteeb0cf9abf5992f35eca18c4cc63300df30521a4 (patch)
tree4da9091f1d93730507375385e0417846359c646d /hw/usb.h
parent158fd3ce98afd21f2e2639600f6414ea703a9121 (diff)
downloadfocaccia-qemu-eeb0cf9abf5992f35eca18c4cc63300df30521a4.tar.gz
focaccia-qemu-eeb0cf9abf5992f35eca18c4cc63300df30521a4.zip
usb/vmstate: add parent dev path
... to make vmstate id string truely unique with multiple host
controllers, i.e. move from "1/usb-ptr" to "0000:00:01.3/1/usb-ptr"
(usb tabled connected to piix3 uhci).

This obviously breaks migration.  To handle this the usb bus
property "full-path" is added.  When setting this to false old
behavior is maintained.  This way current qemu will be compatible
with old versions when started using '-M pc-$oldversion'.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb.h')
-rw-r--r--hw/usb.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb.h b/hw/usb.h
index e95085f0b3..ae7ccda18c 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -182,12 +182,17 @@ struct USBEndpoint {
     QTAILQ_HEAD(, USBPacket) queue;
 };
 
+enum USBDeviceFlags {
+    USB_DEV_FLAG_FULL_PATH,
+};
+
 /* definition of a USB device */
 struct USBDevice {
     DeviceState qdev;
     USBPort *port;
     char *port_path;
     void *opaque;
+    uint32_t flags;
 
     /* Actual connected speed */
     int speed;