vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro

Macro could be used to migrate a dynamically allocated buffer of known size.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1362923278-4080-2-git-send-email-i.mitsyanko@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 8070568b9aa8d93b3729ab7e9ca0ef8a6351d2bd)
vmstate: Add support for two dimensional arrays

Add support for migrating two dimensional arrays, by defining
a set of new macros VMSTATE_*_2DARRAY paralleling the existing
VMSTATE_*_ARRAY macros. 2D arrays are handled the same for actual
state serialization; the only difference is that the type check
has to change for a 2D array.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Message-id: 1363975375-3166-2-git-send-email-peter.maydell@linaro.org
(cherry picked from commit bd7f92e59e7f40ddaeda40e55f7818c8121ecf1a)
usb-redir: Fix crash on migration with no client connected

If no client is connected on the src side, then we won't receive a
parser during migrate, in this case usbredir_post_load() should be a nop,
rather then to try to derefefence the NULL dev->parser pointer.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 3713e1485e6eace7d48b9c790602cfd92c616e5f)
usb-redir: Add flow control support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c874ea97b9d0d079e9d65ef033b95afef0ed6532)
xhci: fix numintrs sanity checks

Make sure numintrs is a power of two, msi requires this.

https://bugzilla.redhat.com/show_bug.cgi?id=918035

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c94a7c6979cafa7a71f32b35e0ff71ed00c61a89)
xhci: remove leftover debug printf

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 61803996def82a05d8634dd9087f1712d04863fc)
xhci: remove unimplemented printfs

Replace them with a tracepoint, so they don't spam stderr by default.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 0ab966cfcc7000baa2e7ef6df7771e73a2eb8a88)
xhci: zap unused name field

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 4b7b2afae773f00c785724261079ef211fd6021b)
usb-hub: limit chain length

USB supports up to 5 hubs chained.
Catch attempts to chain more.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit c24e4aac3bd7dd6591e26b77985e5d3915ecbe4b)
usb-hub: report status changes only once

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit a309ee6e0a256f690760abfba44fceaa52a7c2f3)
usb: update docs for bus name change

At some point the default usb bus name changed from 'usb.0' to
'usb-bus.0' (probably as part of the qom conversion).  Update
the usb documentation accordingly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit f9618633a86cc74b33f178f05154d4edbc08c0fc)
usb-tablet: Don't claim wakeup capability for USB-2 version

Our ehci code does not implement wakeup support, so claiming support for
it with usb-tablet in USB-2 mode causes all tablet events to get lost.

http://bugzilla.redhat.com/show_bug.cgi?id=929068

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit aa1c9e971e80d25b92908dce3dec7c38b49480ea)
Merge branch 'qemu.dev.usb.79' of https://github.com/luohao-brian/qemu-kvm into qemu.dev.usb.79