[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] usb-ohci: add vmstate descriptor

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] usb-ohci: add vmstate descriptor
Date: Mon, 24 Mar 2014 11:26:00 +0100


> It looks like you don't need to save USBPacket or USBPort
> fields, since the other USB controllers don't (though I'm not
> sure why not -- Gerd, do you know why this is OK?).

Most state info is in guest memory.  Any unfinished usb transfers are
simply restarted on the target host.

This can be as simple doing nothing (ehci for example, and I think ohci
is simliar) as the next frame timer run will automatically pick up any
unfinished work from the usb host controller transfer descriptors in
guest memory.

xhci is a bit more complicated as it has to reload state from guest
memory data structures, setup timers etc.

> The idea is that after migration the device should be in
> exactly the same state as before, as far as the guest can
> tell. Your patch relies on the guest OS being able to cope
> with it being in the wrong state (probably by figuring out it's
> broken and resetting it, or perhaps you only tested migration
> when the device was pretty much idle).

Could also be that the device simply doesn't do anything on the target
due to the frame timer not being migrated.

Try the following:
 * configure linux guest with usb keyboard connected via ohci.
 * boot linux guest to the login prompt, then live-migrate
   (or save/restore).
 * check whenever the keyboard still works, check dmesg.

I expect you'll see either a dead keyboard or error messages in the
kernel log about ohci failure followed by a device reset & usb bus


reply via email to

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