OSDN Git Service
Gerd Hoffmann [Tue, 10 Dec 2013 16:16:03 +0000 (17:16 +0100)]
input: move do_mouse_set to new core
This removes the last user of the lecagy input mouse handler list,
so we can remove more legacy bits with this.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 10 Dec 2013 16:09:36 +0000 (17:09 +0100)]
input: move qmp_query_mice to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 10:24:14 +0000 (11:24 +0100)]
input: add input_mouse_mode tracepoint
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 10:23:42 +0000 (11:23 +0100)]
input: move mouse mode notifier to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 10:21:21 +0000 (11:21 +0100)]
input-legacy: remove kbd_mouse_event
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 10:20:39 +0000 (11:20 +0100)]
input-legacy: remove kbd_mouse_is_absolute
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 07:19:02 +0000 (08:19 +0100)]
input-legacy: remove kbd_mouse_has_absolute
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Dec 2013 07:12:19 +0000 (08:12 +0100)]
input-legacy: remove kbd_put_keycode
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 14:20:05 +0000 (15:20 +0100)]
input: trace events
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 13:08:04 +0000 (14:08 +0100)]
input: mouse: switch cocoa ui to new core
Build fixes by Peter Maydell.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 11:53:44 +0000 (12:53 +0100)]
input: keyboard: switch cocoa ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 14:02:28 +0000 (15:02 +0100)]
input: mouse: switch monitor to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 11:46:34 +0000 (12:46 +0100)]
input: mouse: switch spice ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 2 Dec 2013 14:17:45 +0000 (15:17 +0100)]
input: mouse: switch vnc ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 11:27:40 +0000 (12:27 +0100)]
input: mouse: switch sdl ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 11:06:04 +0000 (12:06 +0100)]
input: mouse: switch gtk ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 16:41:40 +0000 (17:41 +0100)]
input: mouse: switch legacy handlers to new core
legacy mouse event handlers are registered in the new core,
so they receive events submitted to the new input core.
legacy kbd_mouse_event() continues to use the old code paths.
So new-core event handlers wouldn't see events submitted via
kbd_mouse_event.
This leads to the constrain that we we must transition all
kbd_mouse_event() users first to keep things working. But
that is easier to handle than translating legacy mouse events
into new-core mouse events ;)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 10:31:09 +0000 (11:31 +0100)]
input: mouse: add qemu_input_is_absolute()
Same as kbd_mouse_is_absolute(), but using new input core.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 10:29:33 +0000 (11:29 +0100)]
input: mouse: add graphic_rotate support
Transform absolute mouse events according to graphic_rotate.
Legacy input code does it for both absolute and relative events,
but the logic is broken for relative coordinates, so this is
most likely not used anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 17:24:29 +0000 (18:24 +0100)]
input: mouse: add helpers functions to core
Likewise a bunch of helper functions to manage mouse button
and movement events, again to make life easier for the ui code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 12:40:20 +0000 (13:40 +0100)]
input: keyboard: switch curses ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 4 Dec 2013 11:23:54 +0000 (12:23 +0100)]
input: keyboard: switch spice ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 2 Dec 2013 13:27:18 +0000 (14:27 +0100)]
input: keyboard: switch vnc ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 11:17:35 +0000 (12:17 +0100)]
input: keyboard: switch sdl ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 10:40:27 +0000 (11:40 +0100)]
input: keyboard: switch gtk ui to new core
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 11:11:13 +0000 (12:11 +0100)]
input: keyboard: switch qmp_send_key() to new core.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 10:59:25 +0000 (11:59 +0100)]
input: keyboard: switch legacy handlers to new core
legacy kbd event handlers are registered in the new core,
so they receive events from the new input core code.
keycode -> scancode translation needed here.
legacy kbd_put_keycode() sends events to the new core.
scancode -> keycode translation needed here.
So with this patch the new input core is fully functional
for keyboard events. New + legacy interfaces can be mixed
in any way.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 10:38:47 +0000 (11:38 +0100)]
input: keyboard: add helper functions to core
A bunch of helper functions to manage keyboard events,
to make life simpler for the ui code when submitting
keyboard events.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 09:35:26 +0000 (10:35 +0100)]
input: add core bits of the new input layer
Register and unregister handlers.
Event dispatcher code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 16 Dec 2013 09:34:53 +0000 (10:34 +0100)]
input: qapi: add pause key
It's missing.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Gerd Hoffmann [Fri, 13 Dec 2013 11:10:14 +0000 (12:10 +0100)]
input: qapi: add unmapped key
Simplifies building something -> QkeyCode mapping tables.
Uninitialized entries can easily identified then.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 08:08:40 +0000 (09:08 +0100)]
input: qapi: define event types
Define input event types, using qapi. So we get nicely autogenerated
types for our input events. And when it comes to qmp support some day
things will be a lot easier.
Types are modeled after the linux input layer. There are separate
event types for each value. There is a sync to indicate the end
of a event group.
Mouse events are split into motion events (one for each axis) and
button events, which are grouped by sync.
Keyboard events are using the existing KeyValue type.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Gerd Hoffmann [Wed, 27 Nov 2013 08:29:27 +0000 (09:29 +0100)]
input: rename file to legacy
Rename ui/input.c to ui/input-legacy.c.
We are going to replace it step by step.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 28 Nov 2013 08:58:18 +0000 (09:58 +0100)]
console: export QemuConsole index,width,height
Add functions to query QemuConsole properties.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Andreas Färber [Tue, 4 Mar 2014 20:00:28 +0000 (21:00 +0100)]
block/gluster: Add missing argument to qemu_gluster_init() call
Commit
adccfbcd6020e928db93b2b4faf0dbd05ffbe016 (block: gluster - add
reopen support.) did not supply the qemu_gluster_init() Error **
argument, needed since commit
a7451cb850d115f257080aff3fbc54f255ebf8f7
(gluster: correctly propagate errors).
Pass through qemu_gluster_reopen_prepare()'s errp, as done in
qemu_gluster_open().
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 18:12:01 +0000 (18:12 +0000)]
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-04' into staging
trivial patches for 2014-03-04
# gpg: Signature made Tue 04 Mar 2014 06:13:56 GMT using RSA key ID
74F0C838
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg: aka "Michael Tokarev <mjt@corpit.ru>"
# gpg: aka "Michael Tokarev <mjt@debian.org>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5
# Subkey fingerprint: E190 8639 3B10 B51B AC2C 8B73 5253 C5AD 74F0 C838
* remotes/mjt/tags/trivial-patches-2014-03-04:
vl: Remove unneeded include file
qga: Remove unneeded include file
qemu-img: Remove unneeded include files
exec: Remove unneeded include files
util/iov: Use qemu/sockets.h instead of conditional code
qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration
tests/test-int128: Don't use __noclone__ attribute on clang
stubs: Optimize dependencies for gdbstub.c
tcg: Fix typo in comment (dependancies -> dependencies)
bswap: Modify prototypes of st[wl]_{le, be}_p (avoid type conversions)
bswap: Modify prototype of stb_p (avoid type conversions)
object: Report type in error when not user creatable.
include/qemu/host-utils.h: Trivial typo: ctz->cto
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 17:01:07 +0000 (17:01 +0000)]
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: (32 commits)
qapi: Add missing null check to opts_start_struct()
qapi: Clean up superfluous null check in qapi_dealloc_type_str()
qapi: Clean up null checking in generated visitors
qapi: Drop unused code in qapi-commands.py
qapi: Drop nonsensical header guard in generated qapi-visit.c
qapi: Fix licensing of scripts
tests/qapi-schema: Cover flat union types
tests/qapi-schema: Cover union types with base
tests/qapi-schema: Cover complex types with base
tests/qapi-schema: Cover anonymous union types
tests/qapi-schema: Cover simple argument types
tests/qapi-schema: Cover optional command arguments
tests/qapi-schema: Actually check successful QMP command response
monitor: Remove left-over code in do_info_profile.
qerror: Improve QERR_DEVICE_NOT_ACTIVE message
qmp: Check for returned data from __json_read in get_events
dump: add 'query-dump-guest-memory-capability' command
Define the architecture for compressed dump format
dump: make kdump-compressed format available for 'dump-guest-memory'
dump: add API to write dump pages
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 16:33:25 +0000 (16:33 +0000)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
# gpg: Signature made Fri 28 Feb 2014 18:27:24 GMT using RSA key ID
81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
block/vmdk: do not report file offset for compressed extents
discard rbd error output when not relevant in qemu-iotests
block: use /var/tmp instead of /tmp for -snapshot
qemu-io-test: Disable Quorum test when not compiled in.
qmp: Make Quorum error events more palatable.
qmp: Fix BlockdevOptionQuorum.
block: gluster - add reopen support.
block: gluster - code movements, state storage changes
qemu-iotests: add more tests to the "quick" group
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 15:53:00 +0000 (15:53 +0000)]
Merge remote-tracking branch 'remotes/rth/i386-fix' into staging
* remotes/rth/i386-fix:
target-i386: Fix ucomis and comis memory access
target-i386: Fix SSE status flag corruption
target-i386: Fix CC_OP_CLR vs PF
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 14:50:46 +0000 (14:50 +0000)]
Merge remote-tracking branch 'remotes/borntraeger/tags/kvm-s390-
20140227' into staging
Several features, fixes and cleanups for kvm/s390:
- sclp event facility: cleanup structure. This allows to use
realize/unrealize as well as migration support via vmsd
- reboot: Two fixes that make reboot much more reliable
- ipl: make elf loading more robust
- flic interrupt controller: This allows to migrate floating
interrupts, as well as clear them on reset etc.
- enable async_pf feature of KVM on s390
- several sclp fixes and cleanups
- several sigp fixes and cleanups
* remotes/borntraeger/tags/kvm-s390-
20140227: (22 commits)
s390x/ipl: Fix crash of ELF images with arbitrary entry points
s390x/kvm: Rework priv instruction handlers
s390x/kvm: Add missing SIGP CPU RESET order
s390x/kvm: Rework SIGP INITIAL CPU RESET handler
s390x/cpu: Use ioctl to reset state in the kernel
s390-ccw.img: new binary rom to match latest fixes
s390-ccw.img: Fix sporadic errors with ccw boot image - initialize css
s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx
s390x/event-facility: exploit realize/unrealize
s390x/event-facility: add support for live migration
s390x/event-facility: code restructure
s390x/event-facility: some renaming
s390x/sclp: Fixed setting of condition code register
s390x/sclp: Add missing checks to SCLP handler
s390x/sclp: Fixed the size of sccb and code parameter
s390x/eventfacility: mask out commands
s390x/virtio-hcall: Specification exception for illegal subcodes
s390x/virtio-hcall: Add range check for hypervisor call
s390x/kvm: Fixed bad SIGP SET-ARCHITECTURE handler
s390x/async_pf: Check for apf extension and enable pfault
...
Conflicts:
linux-headers/linux/kvm.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 14:25:34 +0000 (14:25 +0000)]
Merge remote-tracking branch 'remotes/bonzini/scsi-next' into staging
* remotes/bonzini/scsi-next:
block/iscsi: fix segfault if writesame fails
scsi-disk: Add support for port WWN and index descriptors in VPD page 83h
block/iscsi: query for supported VPD pages
block/iscsi: fix deadlock on scsi check condition
scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b
scsi: report thin provisioning errors with werror=report
scsi: Change scsi sense buf size to 252
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 4 Mar 2014 13:09:06 +0000 (13:09 +0000)]
Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into staging
* remotes/mcayland/qemu-sparc:
sun4m: Add Sun CG3 framebuffer initialisation function
sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM
sun4m: fix slavio timer RUN/STOP bit
sun4m: Set HostID in NVRAM
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Stefan Weil [Thu, 27 Feb 2014 20:28:03 +0000 (21:28 +0100)]
Makefile: Add missing dependency for system emulation (fix build)
Comment from Makefile.objs:
The system emulation needs this dependency (which was missing in Makefile),
otherwise builds without tools (or massive parallel builds) fail.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Markus Armbruster [Sat, 1 Mar 2014 07:40:39 +0000 (08:40 +0100)]
qapi: Add missing null check to opts_start_struct()
Argument is null when visiting an unboxed struct. I can't see such a
visit in the current code. Fix it anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:38 +0000 (08:40 +0100)]
qapi: Clean up superfluous null check in qapi_dealloc_type_str()
Argument can't be null. No other Visitor method type_str() checks for
null.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:37 +0000 (08:40 +0100)]
qapi: Clean up null checking in generated visitors
Visitors get passed a pointer to the visited object. The generated
visitors try to cope with this pointer being null in some places, for
instance like this:
visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err);
visit_start_optional() passes its second argument to Visitor method
start_optional. Three out of three methods dereference it
unconditionally.
I fail to see how this pointer could legitimately be null.
All this useless null checking is highly redundant, which Coverity
duly reports. About 200 times.
Remove the useless null checks.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:36 +0000 (08:40 +0100)]
qapi: Drop unused code in qapi-commands.py
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:35 +0000 (08:40 +0100)]
qapi: Drop nonsensical header guard in generated qapi-visit.c
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:34 +0000 (08:40 +0100)]
qapi: Fix licensing of scripts
The scripts carry this copyright notice:
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
The sentences contradict each other, as COPYING.LIB contains the LGPL
2.1. Michael Roth says this was a simple pasto, and he meant to refer
COPYING. Let's fix that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:33 +0000 (08:40 +0100)]
tests/qapi-schema: Cover flat union types
The test demonstrates a generator bug: the generated struct
UserDefFlatUnion doesn't include members for the indirect base
UserDefZero.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:32 +0000 (08:40 +0100)]
tests/qapi-schema: Cover union types with base
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:31 +0000 (08:40 +0100)]
tests/qapi-schema: Cover complex types with base
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:30 +0000 (08:40 +0100)]
tests/qapi-schema: Cover anonymous union types
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:29 +0000 (08:40 +0100)]
tests/qapi-schema: Cover simple argument types
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:28 +0000 (08:40 +0100)]
tests/qapi-schema: Cover optional command arguments
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Markus Armbruster [Sat, 1 Mar 2014 07:40:27 +0000 (08:40 +0100)]
tests/qapi-schema: Actually check successful QMP command response
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Stefan Weil [Sun, 23 Feb 2014 17:02:11 +0000 (18:02 +0100)]
vl: Remove unneeded include file
This file does not depend on windows.h.
Cc: Anthony Liguori <aliguori@amazon.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Sun, 23 Feb 2014 17:02:10 +0000 (18:02 +0100)]
qga: Remove unneeded include file
This file does not depend on windows.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Sun, 23 Feb 2014 17:02:09 +0000 (18:02 +0100)]
qemu-img: Remove unneeded include files
There is no dependency on windows.h, and the standard include files are
already included by qemu-common.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Sun, 23 Feb 2014 17:02:08 +0000 (18:02 +0100)]
exec: Remove unneeded include files
This file does not depend on windows.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Sun, 23 Feb 2014 17:02:07 +0000 (18:02 +0100)]
util/iov: Use qemu/sockets.h instead of conditional code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Peter Maydell [Wed, 26 Feb 2014 23:51:46 +0000 (23:51 +0000)]
qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration
The function qobject_from_json() doesn't actually allow its
argument to be a format string -- it passes a NULL va_list*
to qobject_from_jsonv(), and the parser code will then never
actually interpret %-escape sequences (it tests whether the
va_list pointer is NULL and will stop with a parse error).
The spurious attribute markup causes clang warnings in some
of the test cases where we programmatically construct JSON
to feed to qobject_from_json():
tests/test-qmp-input-visitor.c:76:35: warning: format string is not a
string literal (potentially insecure) [-Wformat-security]
data->obj = qobject_from_json(json_string);
^~~~~~~~~~~
Remove the incorrect attribute.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Peter Maydell [Wed, 26 Feb 2014 23:39:46 +0000 (23:39 +0000)]
tests/test-int128: Don't use __noclone__ attribute on clang
clang doesn't support the __noclone__ attribute and emits a warning about
it. Fortunately clang also implements a mechanism for asking if a particular
attribute is implemented; use it. We assume that if the compiler doesn't
support __has_attribute() then it must be GCC and must support __noclone__.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Thu, 20 Feb 2014 19:08:31 +0000 (20:08 +0100)]
stubs: Optimize dependencies for gdbstub.c
It does not need qemu-common.h. Including exec/gdbstub.h fixes a warning
from static code analyzers and avoids mismatching declarations for
xml_builtin.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Fri, 21 Feb 2014 19:52:39 +0000 (20:52 +0100)]
tcg: Fix typo in comment (dependancies -> dependencies)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Wed, 19 Feb 2014 05:11:45 +0000 (06:11 +0100)]
bswap: Modify prototypes of st[wl]_{le, be}_p (avoid type conversions)
The functions use uint16_t or uint32_t values, so show this in the function
prototypes. Non-optimizing compilers will avoid unnecessary type
conversions when generating calls of these inline functions.
stq_le_p, stq_be_p already use similar prototypes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Weil [Wed, 19 Feb 2014 05:11:44 +0000 (06:11 +0100)]
bswap: Modify prototype of stb_p (avoid type conversions)
The function uses an uint8_t value, so show this in the function
prototype. Non-optimizing compilers will avoid unnecessary type
conversions from (u)int8_t to int and back to uint8_t when generating
calls of this inline function.
stw_p, stl_p and stq_p already use similar prototypes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Hani Benhabiles [Tue, 18 Feb 2014 22:42:36 +0000 (23:42 +0100)]
object: Report type in error when not user creatable.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Dr. David Alan Gilbert [Wed, 12 Feb 2014 17:14:33 +0000 (17:14 +0000)]
include/qemu/host-utils.h: Trivial typo: ctz->cto
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Hani Benhabiles [Wed, 26 Feb 2014 22:09:52 +0000 (23:09 +0100)]
monitor: Remove left-over code in do_info_profile.
This is a left-over from
4a1418e.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Hani Benhabiles [Tue, 25 Feb 2014 07:10:05 +0000 (08:10 +0100)]
qerror: Improve QERR_DEVICE_NOT_ACTIVE message
The error message as currently used is confusing as there are no "balloon" or
"spice" devices.
(qemu) balloon 1024
balloon: Device 'balloon' has not been activated
With this patch:
(qemu) balloon 1024
balloon: No balloon device has been activated
Signed-off-by: Hani Benhabiles <hani@linux.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Fam Zheng [Mon, 24 Feb 2014 05:45:01 +0000 (13:45 +0800)]
qmp: Check for returned data from __json_read in get_events
When QEMU process aborts and socket is closed, qmp client will not
detect it. When this happens, some qemu-iotests scripts will enter an
endless loop waiting for qmp events.
It's better we raise an exception in qmp.py to catch this and make the
test script stop.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Peter Lieven [Wed, 26 Feb 2014 09:47:57 +0000 (10:47 +0100)]
block/vmdk: do not report file offset for compressed extents
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Loic Dachary [Wed, 8 Jan 2014 20:05:38 +0000 (21:05 +0100)]
discard rbd error output when not relevant in qemu-iotests
Suppress rbd progress messages with --no-progress so they are not
confused with an error output when comparing test results ( progress is
displayed on stderr ).
Signed-off-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Amit Shah [Wed, 26 Feb 2014 09:42:37 +0000 (15:12 +0530)]
block: use /var/tmp instead of /tmp for -snapshot
If TMPDIR is not specified, the default was to use /tmp for the working
copy of the block devices. Update this to /var/tmp instead, so systems
using tmp-on-tmpfs don't end up inadvertently using RAM for the block
device.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Benoît Canet [Sat, 22 Feb 2014 17:43:42 +0000 (18:43 +0100)]
qemu-io-test: Disable Quorum test when not compiled in.
Quorum is not compiled by default: make the quorum 081 test aware of this.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Benoît Canet [Sat, 22 Feb 2014 17:43:41 +0000 (18:43 +0100)]
qmp: Make Quorum error events more palatable.
Insert quorum QMP events documentation alphabetically.
Also change the "ret" errno value by an optional "error" being an strerror(-ret)
in the QUORUM_REPORT_BAD qmp event.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Benoît Canet [Sat, 22 Feb 2014 17:43:40 +0000 (18:43 +0100)]
qmp: Fix BlockdevOptionQuorum.
Fix some nits before QEMU 2.0 freeze.
Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Mon, 17 Feb 2014 16:11:12 +0000 (11:11 -0500)]
block: gluster - add reopen support.
Gluster does parse open flags in its .bdrv_open() implementation,
and the .bdrv_reopen_* implementations need to do the same.
A new gluster connection to the image file to be created is established
in the .bdrv_reopen_prepare(), and the image file opened with the new
flags.
If this is successful, then the old image file is closed, and the
old connection torn down. The relevant structure pointers in the gluster
state structure are updated to the new connection.
If it is not successful, then the new file handle and connection is
abandoned (if it exists), while the old connection is not modified at
all.
With reopen supported, block-commit (and offline commit) is now also
supported for image files whose base image uses the native gluster
protocol driver.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Mon, 17 Feb 2014 16:11:11 +0000 (11:11 -0500)]
block: gluster - code movements, state storage changes
In preparation for supporting reopen on gluster, move flag
parsing out to a function. Also, add a NULL check in the
gconf cleanup.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Paolo Bonzini [Thu, 20 Feb 2014 17:28:03 +0000 (18:28 +0100)]
qemu-iotests: add more tests to the "quick" group
None of these needs QEMU_PROG, and they all take but a few seconds.
We need to point the launching script to qemu-nbd, though.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:38 +0000 (14:11 +0800)]
dump: add 'query-dump-guest-memory-capability' command
'query-dump-guest-memory-capability' is used to query the available formats for
'dump-guest-memory'. The output of the command will be like:
-> { "execute": "query-dump-guest-memory-capability" }
<- { "return": { "formats":
["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:37 +0000 (14:11 +0800)]
Define the architecture for compressed dump format
Signed-off-by: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:36 +0000 (14:11 +0800)]
dump: make kdump-compressed format available for 'dump-guest-memory'
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressed
format. The command's usage:
dump [-p] protocol [begin] [length] [format]
'format' is used to specified the format of vmcore and can be:
1. 'elf': ELF format, without compression
2. 'kdump-zlib': kdump-compressed format, with zlib-compressed
3. 'kdump-lzo': kdump-compressed format, with lzo-compressed
4. 'kdump-snappy': kdump-compressed format, with snappy-compressed
Without 'format' being set, it is same as 'elf'. And if non-elf format is
specified, paging and filter is not allowed.
Note:
1. The kdump-compressed format is readable only with the crash utility and
makedumpfile, and it can be smaller than the ELF format because of the
compression support.
2. The kdump-compressed format is the 6th edition.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:35 +0000 (14:11 +0800)]
dump: add API to write dump pages
functions are used to write page to vmcore. vmcore is written page by page.
page desc is used to store the information of a page, including a page's size,
offset, compression format, etc.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:34 +0000 (14:11 +0800)]
dump: add APIs to operate DataCache
DataCache is used to store data temporarily, then the data will be written to
vmcore. These functions will be called later when writing data of page to
vmcore.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:33 +0000 (14:11 +0800)]
dump: add API to write dump_bitmap
functions are used to write 1st and 2nd dump_bitmap of kdump-compressed format,
which is used to indicate whether the corresponded page is existed in vmcore.
1st and 2nd dump_bitmap are same, because dump level is specified to 1 here.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:32 +0000 (14:11 +0800)]
dump: add API to write dump header
the functions are used to write header of kdump-compressed format to vmcore.
Header of kdump-compressed format includes:
1. common header: DiskDumpHeader32 / DiskDumpHeader64
2. sub header: KdumpSubHeader32 / KdumpSubHeader64
3. extra information: only elf notes here
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:31 +0000 (14:11 +0800)]
dump: add members to DumpState and init some of them
add some members to DumpState that will be used in writing vmcore in
kdump-compressed format. some of them, like page_size, will be initialized
in the patch.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:30 +0000 (14:11 +0800)]
dump: add support for lzo/snappy
kdump-compressed format supports three compression format, zlib/lzo/snappy.
Currently, only zlib is available. This patch is used to support lzo/snappy.
'--enable-lzo/--enable-snappy' is needed to be specified with configure to make
lzo/snappy available for qemu
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:29 +0000 (14:11 +0800)]
dump: add API to write elf notes to buffer
the function can be used by write_elf32_notes/write_elf64_notes to write notes
to a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_notes
will write elf notes to vmcore directly. Instead, if buf_write_note is used,
elf notes will be written to opaque->note_buf at first.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:28 +0000 (14:11 +0800)]
dump: add API to write vmcore
Function is used to write vmcore in flatten format. In flatten format, data is
written block by block, and in front of each block, a struct
MakedumpfileDataHeader is stored there to indicate the offset and size of the
data block.
struct MakedumpfileDataHeader {
int64_t offset;
int64_t buf_size;
};
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:27 +0000 (14:11 +0800)]
dump: add API to write header of flatten format
flatten format will be used when writing kdump-compressed format. The format is
also used by makedumpfile, you can refer to the following URL to get more
detailed information about flatten format of kdump-compressed format:
http://sourceforge.net/projects/makedumpfile/
The two functions here are used to write start flat header and end flat header
to vmcore, and they will be called later when flatten format is used.
struct MakedumpfileHeader stored at the head of vmcore is used to indicate the
vmcore is in flatten format.
struct MakedumpfileHeader {
char signature[16]; /* = "makedumpfile" */
int64_t type; /* = 1 */
int64_t version; /* = 1 */
};
And struct MakedumpfileDataHeader, with offset and buf_size set to -1, is used
to indicate the end of vmcore in flatten format.
struct MakedumpfileDataHeader {
int64_t offset; /* = -1 */
int64_t buf_size; /* = -1 */
};
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:26 +0000 (14:11 +0800)]
dump: add argument to write_elfxx_notes
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes to
vmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choose
the method of writing elf notes
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qiaonuohan [Tue, 18 Feb 2014 06:11:25 +0000 (14:11 +0800)]
dump: const-qualify the buf of WriteCoreDumpFunction
WriteCoreDumpFunction is a function pointer that points to the function used to
write content in "buf" into core file, so "buf" should be const-qualify.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Richard Henderson [Mon, 24 Feb 2014 23:53:40 +0000 (15:53 -0800)]
target-i386: Fix ucomis and comis memory access
We were loading 16 bytes for both single and double-precision
scalar comparisons.
Reported-by: Alexander Bluhm <bluhm@openbsd.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Mon, 24 Feb 2014 22:59:54 +0000 (14:59 -0800)]
target-i386: Fix SSE status flag corruption
When we restore the mxcsr register with FXRSTOR, or set it with gdb,
we need to update the various SSE status flags in CPUX86State
Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Fri, 10 Jan 2014 20:38:40 +0000 (12:38 -0800)]
target-i386: Fix CC_OP_CLR vs PF
Parity should be set for a zero result.
Cc: qemu-stable@nongnu.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Luiz Capitulino [Tue, 18 Feb 2014 14:08:14 +0000 (09:08 -0500)]
MAINTAINERS: update status for HMP, QAPI and QMP trees
This commit updates the status for the HMP, QAPI and QMP trees from
"Supported" to "Maintained".
In practice this means that patch review and pull requests may take
longer. Also, I'll rely more on reviewers such as Eric Blake so that
I'm able to send pull requests regularly.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Fam Zheng [Wed, 12 Feb 2014 03:05:13 +0000 (11:05 +0800)]
QMP: Allow dot separated dict path arguments in qmp-shell
As another convenience to allow using commands that expect a dict as
argument, this patch adds support for foo.bar=value syntax, similar to
command line argument style:
(QEMU) blockdev-add options.driver=file options.id=drive1 options.filename=...
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>