mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
158fd3ce98
commit
eeb0cf9abf
3 changed files with 25 additions and 1 deletions
5
hw/usb.h
5
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue