block: Support Archipelago as a QEMU block backend
block: Free memory on AIO failure
block/gluster: Add missing argument to qemu_gluster_init() call
Commit adccfbcd6020e928db93b2b4faf0dbd05ffbe016 (block: gluster - addreopen support.) did not supply the qemu_gluster_init() Error **argument, needed since commit a7451cb850d115f257080aff3fbc54f255ebf8f7...
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-04' into staging
trivial patches for 2014-03-04
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Block pull request
Merge remote-tracking branch 'remotes/rth/i386-fix' into staging
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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...
Merge remote-tracking branch 'remotes/bonzini/scsi-next' into staging
Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into staging
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>...
qapi: Clean up superfluous null check in qapi_dealloc_type_str()
Argument can't be null. No other Visitor method type_str() checks fornull.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Add missing null check to opts_start_struct()
Argument is null when visiting an unboxed struct. I can't see such avisit in the current code. Fix it anyway.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qapi: Clean up null checking in generated visitors
Visitors get passed a pointer to the visited object. The generatedvisitors try to cope with this pointer being null in some places, forinstance like this:
visit_start_optional(m, obj ? &(*obj)->has_name : NULL, "name", &err);...
qapi: Drop unused code in qapi-commands.py
tests/qapi-schema: Actually check successful QMP command response
tests/qapi-schema: Cover optional command arguments
tests/qapi-schema: Cover simple argument types
tests/qapi-schema: Cover anonymous union types
tests/qapi-schema: Cover complex types with base
tests/qapi-schema: Cover union types with base
tests/qapi-schema: Cover flat union types
The test demonstrates a generator bug: the generated structUserDefFlatUnion doesn't include members for the indirect baseUserDefZero.
qapi: Fix licensing of scripts
The scripts carry this copyright notice:
The sentences contradict each other, as COPYING.LIB contains the LGPL...
qapi: Drop nonsensical header guard in generated qapi-visit.c
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>
exec: Remove unneeded include files
This file does not depend on windows.h.
qemu-img: Remove unneeded include files
There is no dependency on windows.h, and the standard include files arealready 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>...
qga: Remove unneeded include file
vl: Remove unneeded include file
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>...
qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration
The function qobject_from_json() doesn't actually allow itsargument to be a format string -- it passes a NULL va_list*to qobject_from_jsonv(), and the parser code will then never...
tests/test-int128: Don't use noclone attribute on clang
clang doesn't support the noclone attribute and emits a warning aboutit. Fortunately clang also implements a mechanism for asking if a particularattribute is implemented; use it. We assume that if the compiler doesn't...
stubs: Optimize dependencies for gdbstub.c
It does not need qemu-common.h. Including exec/gdbstub.h fixes a warningfrom static code analyzers and avoids mismatching declarations forxml_builtin.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tcg: Fix typo in comment (dependancies -> dependencies)
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>
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>
bswap: Modify prototype of stb_p (avoid type conversions)
The function uses an uint8_t value, so show this in the functionprototype. Non-optimizing compilers will avoid unnecessary typeconversions from (u)int8_t to int and back to uint8_t when generating...
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 functionprototypes. Non-optimizing compilers will avoid unnecessary typeconversions when generating calls of these inline functions....
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>
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 1024balloon: Device 'balloon' has not been activated
With this patch:
(qemu) balloon 1024balloon: No balloon device has been activated...
qmp: Check for returned data from __json_read in get_events
When QEMU process aborts and socket is closed, qmp client will notdetect it. When this happens, some qemu-iotests scripts will enter anendless loop waiting for qmp events.
It's better we raise an exception in qmp.py to catch this and make the...
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>
block: use /var/tmp instead of /tmp for -snapshot
If TMPDIR is not specified, the default was to use /tmp for the workingcopy of the block devices. Update this to /var/tmp instead, so systemsusing tmp-on-tmpfs don't end up inadvertently using RAM for the block...
discard rbd error output when not relevant in qemu-iotests
Suppress rbd progress messages with --no-progress so they are notconfused with an error output when comparing test results ( progress isdisplayed on stderr ).
Signed-off-by: Loic Dachary <loic@dachary.org>...
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>
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>
block: gluster - code movements, state storage changes
In preparation for supporting reopen on gluster, move flagparsing out to a function. Also, add a NULL check in thegconf cleanup.
Signed-off-by: Jeff Cody <jcody@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
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 establishedin the .bdrv_reopen_prepare(), and the image file opened with the new...
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>
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>...
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...
dump: add members to DumpState and init some of them
add some members to DumpState that will be used in writing vmcore inkdump-compressed format. some of them, like page_size, will be initializedin the patch.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>...
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 / DiskDumpHeader642. sub header: KdumpSubHeader32 / KdumpSubHeader64...
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....
dump: add APIs to operate DataCache
DataCache is used to store data temporarily, then the data will be written tovmcore. These functions will be called later when writing data of page tovmcore.
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
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.
dump: make kdump-compressed format available for 'dump-guest-memory'
Make monitor command 'dump-guest-memory' be able to dump in kdump-compressedformat. The command's usage:
dump [-p] protocol [begin] [length] [format]
'format' is used to specified the format of vmcore and can be:...
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>
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":...
dump: const-qualify the buf of WriteCoreDumpFunction
WriteCoreDumpFunction is a function pointer that points to the function used towrite content in "buf" into core file, so "buf" should be const-qualify.
dump: add argument to write_elfxx_notes
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes tovmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choosethe method of writing elf notes
dump: add API to write header of flatten format
flatten format will be used when writing kdump-compressed format. The format isalso used by makedumpfile, you can refer to the following URL to get moredetailed information about flatten format of kdump-compressed format:...
dump: add API to write vmcore
Function is used to write vmcore in flatten format. In flatten format, data iswritten block by block, and in front of each block, a structMakedumpfileDataHeader is stored there to indicate the offset and size of thedata block....
dump: add API to write elf notes to buffer
the function can be used by write_elf32_notes/write_elf64_notes to write notesto a buffer. If fd_write_vmcore is used, write_elf32_notes/write_elf64_noteswill write elf notes to vmcore directly. Instead, if buf_write_note is used,...
target-i386: Fix ucomis and comis memory access
We were loading 16 bytes for both single and double-precisionscalar comparisons.
Reported-by: Alexander Bluhm <bluhm@openbsd.org>Signed-off-by: Richard Henderson <rth@twiddle.net>
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>...
target-i386: Fix CC_OP_CLR vs PF
Parity should be set for a zero result.
Cc: qemu-stable@nongnu.orgReviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>Signed-off-by: Richard Henderson <rth@twiddle.net>
QMP: Allow dot separated dict path arguments in qmp-shell
As another convenience to allow using commands that expect a dict asargument, this patch adds support for foo.bar=value syntax, similar tocommand line argument style:
(QEMU) blockdev-add options.driver=file options.id=drive1 options.filename=......
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 takelonger. Also, I'll rely more on reviewers such as Eric Blake so that...
modules: Fix building with --enable-modules
Compiling util/modules.c with modules enabled fails now.
Fix it by including qemu-common.h before #ifdef testing in module.c.
Signed-off-by: Fam Zheng <famz@redhat.com>Message-id: 1393453893-12125-1-git-send-email-famz@redhat.com...
Merge remote-tracking branch 'remotes/kvm/uq/master' into staging
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140226.0' into staging
Updates include: - Coverify fixes for vfio & pci-assign (Markus) - VFIO blacklisting support for known brokwn PCI option ROMs (Bandan)
sun4m: fix slavio timer RUN/STOP bit
The sun4m architecture has one 'system' timer and one timer per CPU.The CPU timers can be configured in two modes:
sun4m: Add Sun CG3 framebuffer and corresponding OpenBIOS FCode ROM
The CG3 framebuffer is a simple 8-bit framebuffer for use with operatingsystems such as early Solaris that do not have drivers for TCX.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>...
sun4m: Add Sun CG3 framebuffer initialisation function
In order to allow the user to choose the framebuffer for sparc-softmmu, add-vga tcx and -vga cg3 options to the QEMU command line. If no option isspecified, the default TCX framebuffer is used.
Since proprietary FCode ROMs use a resolution of 1152x900, slightly relax the...
sun4m: Set HostID in NVRAM
On SparcStations, the HostID field in the NVRAM is equal to the lastthree bytes of the MAC address (which is also stored in the NVRAM).
This constant is used as an identification/serial number on Solaris.
Signed-off-by: Olivier Danet <odanet@caramail.com>...
s390-ccw.img: Fix sporadic errors with ccw boot image - initialize css
We have to set the cssid to 0, otherwise the stsch code willreturn an operand exception without the m bit. In the same waywe should set m=0.
This case was triggered in some cases during reboot, if for some...
s390-ccw.img: new binary rom to match latest fixes
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
s390x/cpu: Use ioctl to reset state in the kernel
Some of the state in the kernel can not be reset from QEMU yet.For this we've got to use the KVM_S390_INITIAL_RESET ioctl to makesure that the state in the kernel is set to the right values duringinitial CPU reset, too....
s390x/kvm: Rework SIGP INITIAL CPU RESET handler
The s390_cpu_initial_reset() function had two deficiencies: First, itused an ioctl for the destination CPU, and this ioctl could blocknearly forever, as long as the destination CPU was running in the SIE...
s390x/kvm: Add missing SIGP CPU RESET order
The SIGP order CPU RESET was still missing in the list of oursupported handler. This patch now adds a simple implementation,by using the cpu_reset() function that is already available intarget-s390x/cpu.c.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>...
s390x/kvm: Rework priv instruction handlers
The current implementation uses the second byte of the instructionto identify the instruction handler. This is not sufficient tosupport instructions not starting with 0xb2. This patchadds separate handlers for 0xb2, 0xb9 and 0xeb to be able to...
s390x/ipl: Fix crash of ELF images with arbitrary entry points
When loading S390 kernels, the current code expects an ELF file with thestart address 0x10000. Other ELF files cause a segmentation fault. To avoidthese crashes, we should get the start address from the ELF file instead...
s390x/kvm: implement floating-interrupt controller device
This patch implements a floating-interrupt controller device (flic)which interacts with the s390 flic kvm_device.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>...
s390x/async_pf: Check for apf extension and enable pfault
S390 can also use async page faults, to enhance guest scheduling.In case of live migration we want to disable the feature and letall pending request finish.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>...
s390x/kvm: Fixed bad SIGP SET-ARCHITECTURE handler
The SET-ARCHITECTURE handler in QEMU caused a program interruption.This is wrong according to the "Principles of Operations" specification(since SIGP should never cause a program interrupt) and was likely only...
s390x/virtio-hcall: Add range check for hypervisor call
The handler for diag 500 did not check whether the requested functionwas in the supported range, so illegal values could crash QEMU in theworst case.
s390x/virtio-hcall: Specification exception for illegal subcodes
So far, the DIAG 500 hypervisor call was only setting -EINVAL inR2 when a guest tried to call this function with an illegal subcode.This patch now changes the behavior so that a specification exception...
s390x/eventfacility: mask out commands
As a followup to commit 5f04c14a10fa7f259bc0808f35a0beda49f7821e(s390-sclp: Define New SCLP Codes) we should mask the sclp commandnot only in base sclp, but also in the event facility.
Based on an initial patch from Ralf Hoppe....
s390x/sclp: Fixed the size of sccb and code parameter
The pointer to the SCCB should not be limited to 32 bits only.In contrast to this, the command word parameter is only 32 bits(the upper 32 bits should be ignored).
s390x/sclp: Add missing checks to SCLP handler
If the 51 most significant bits of the SCCB address are zero or equal tothe prefix, we should throw an specification exception, too.Also moved the check for privileged mode to sclp_service_call() to haveall program checks in one place now....
s390x/sclp: Fixed setting of condition code register
In the SCLP handler function, the condition code register mustonly be set if no exception occured.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>...
s390x/event-facility: some renaming
Do some renaming to shorten some identifiers and to emphasize sclp.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
s390x/event-facility: code restructure
Code restructure in order to simplify class hierarchy - remove S390SCLPDevice abstract base class and move function pointers into new SCLPEventFacilityClass - implement SCLPEventFacility as SysBusDevice - use define constants for instance creation strings...
s390x/event-facility: add support for live migration
Add support for live migration using VMStateDescription.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
s390x/event-facility: exploit realize/unrealize
init/exit functionality of abstract SCLPEvent class is now exploitingrealize/unrealize.
s390-ccw.img: Fix sporadic reboot hangs: Initialize next_idx
The current code does not initialize next_idx in the virtio ring.As the ccw bios will always use guest memory at a fixed location,this queue might != 0 after a reboot.Lets make the initialization explicit....
update linux headers to kvm/next
This updates the kvm headers tocommit d3714010c307d26df251c45be9cd12ab6d41f0c4 KVM: x86: emulator_cmpxchg_emulated should mark_page_dirtyin kvm/next.
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140226' into staging
target-arm queue: * fixes for various Coverity-spotted bugs * support new KVM device control API for VGIC * support KVM VGIC save/restore/migration * more AArch64 system mode foundations...
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140225' into staging
migration/next for 20140225
Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging
Net patches