qga: add windows implementation for guest-get-time

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga: add windows implementation for guest-set-time

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga schema: mark optional GuestLogicalProcessor.can-offline with #optional

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga schema: document generic QERR_UNSUPPORTED

Part of the wording was shamelessly stolen from Michael Roth's email.

Suggested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows

Today we reset fd_counter if it wraps, but it's better to abort()
instead, as fd_counter should never reach INT64_MAX.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>

*fixed typo: s/resonable/reasonable/

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
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>
usb-redir: Add flow control support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
xhci: remove leftover debug printf

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
xhci: zap unused name field

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
usb-hub: report status changes only once

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
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>
vmxnet3: iPXE compatibility fixes

iPXE vmxnet3 driver makes a few assumptions regarding device operation
that were missed during testing with Linux and Windows drivers.
This patch adds following logic:
  1. Additional GET commands processing added
  2. Max number of RX chunks should be set to 1 when driver passes 0
     via corresponding shared memory field
  3. Enforecement for max chunks number added

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped

Byte swap is redundant because shared memory reading functions
already swap bytes when required

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Merge remote-tracking branch 'kraxel/usb.79' into staging

# By Gerd Hoffmann (7) and Hans de Goede (3)
# Via Gerd Hoffmann
* kraxel/usb.79:
  usb-tablet: Don't claim wakeup capability for USB-2 version
  usb: update docs for bus name change
  usb-hub: report status changes only once
  usb-hub: limit chain length
  xhci: zap unused name field
  xhci: remove unimplemented printfs
  xhci: remove leftover debug printf
  xhci: fix numintrs sanity checks
  usb-redir: Add flow control support
  usb-redir: Fix crash on migration with no client connected
Merge remote-tracking branch 'mdroth/qga-pull-4-2-13' into staging

# By Laszlo Ersek (2) and others
# Via Michael Roth
* mdroth/qga-pull-4-2-13:
  qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows
  qga schema: document generic QERR_UNSUPPORTED
  qga schema: mark optional GuestLogicalProcessor.can-offline with #optional
  qga: add windows implementation for guest-set-time
  qga: add windows implementation for guest-get-time
qemu-char: really fix behavior on can_read = 0

I misread the glib manual, g_source_remove does not let you re-attach
the source later.  This behavior (called "blocking" the source in glib)
is present in glib's source code, but private and not available outside
glib; hence, we have to resort to re-creating the source every time.

In fact, g_source_remove and g_source_destroy are the same thing,
except g_source_destroy is O(1) while g_source_remove scans a potentially
very long list of GSources in the current main loop.  Ugh.  Better
use g_source_destroy explicitly, and leave "tags" to those dummies who
cannot track their pointers' lifetimes.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1365426195-12596-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>