summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | qemu-iotests: Test converting to streamOptimized from small cluster sizeFam Zheng2014-05-092-0/+14
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | vmdk: Implement .bdrv_get_info()Fam Zheng2014-05-092-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will return cluster_size and needs_compressed_writes to caller, if all the extents have the same value (or there's only one extent). Otherwise return -ENOTSUP. cluster_size is only reported for sparse formats. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | vmdk: Implement .bdrv_write_compressedFam Zheng2014-05-091-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a wrapper function to support "compressed" path in qemu-img convert. Only support streamOptimized subformat case for now (num_extents == 1 and extent compression is true). Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | qemu-img: Convert by cluster size if target is compressedFam Zheng2014-05-092-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If target block driver forces compression, qemu-img convert needs to write by cluster size as well as "-c" option. Particularly, this applies for converting to VMDK streamOptimized format. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | block/iscsi: bump year in copyright noticePeter Lieven2014-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | block/nfs: Check for NULL server partMax Reitz2014-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the URL has been parsed make sure the server part is valid in order to avoid a segmentation fault when calling nfs_mount(). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | qemu-img: sort block formats in help messageMike Day2014-05-091-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The help message for qemu-img lists the supported block formats, of which there are 27 as of version 2.0.50. The formats are printed in the order of their driver's position in a linked list, which appears random. This patch prints the formats in sorted order, making it easier to read and to find a specific format in the list. [Added suggestions from Fam Zheng <famz@redhat.com> to declare variables at the top of the scope in help() and to omit explicit cast for void* opaque. --Stefan] Signed-off-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | iotests: Use configured pythonMax Reitz2014-05-0910-43/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, QEMU's iotests rely on /usr/bin/env to start the correct Python (that is, at least Python 2.4, but not 3). On systems where Python 3 is the default, the user has no clean way of making the iotests use the correct binary. This commit makes the iotests use the Python selected by configure. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | qcow2: Fix alloc_clusters_noref() overflow detectionMax Reitz2014-05-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the very first allocation has a length of 0, the free_cluster_index is still 0 after the for loop, which means that subtracting one from it will underflow and signal an invalid range of clusters by returning -EFBIG. However, there is no such range, as its length is 0. Fix this by preventing underflows on free_cluster_index during the check. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | | | microblaze: boot: Don't hack the elf entry pointPeter Crosthwaite2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some modulo logic to ensure that Microblaze always booted into physical RAM regardless of the elf entry. Removed it, as QEMU should fail gracefully when given a bad elf, rather than attempt to run it. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* | | | xilinx_timer: Fix writes into TCSR registerGuenter Roeck2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TCSR register has only 11 valid bits. This is now used by the linux kernel to auto-detect endianness, and causes Linux 3.15-rc1 and later to hang when run under qemu-microblaze. Mask valid bits before writing the register to solve the problem. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | | | xilinx_intc: Fix writes into MER registerGuenter Roeck2014-05-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MER register only has two valid bits. This is now used by the linux kernel to auto-detect endianness, and causes Linux 3.15-rc1 and later to hang when run under qemu-microblaze. Mask valid bits before writing the register to solve the problem. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> [Edgar: Untabified] Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | | | microblaze: Respect the reset vectorEdgar E. Iglesias2014-05-131-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* | | | microblaze: Support loading of u-boot initrd imagesEdgar E. Iglesias2014-05-131-3/+9
| |_|/ |/| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
* | | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-05-0995-665/+942
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: (38 commits) Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()" qapi: Document optional arguments' backwards compatibility qmp: use valid JSON in transaction example qmp: Don't use error_is_set() to suppress additional errors dump: Drop pointless error_is_set(), DumpState member errp qemu-option: Clean up fragile use of error_is_set() qga: Drop superfluous error_is_set() qga: Clean up fragile use of error_is_set() qapi: Clean up fragile use of error_is_set() tests/qapi-schema: Drop superfluous error_is_set() qapi: Drop redundant, unclean error_is_set() hmp: Guard against misuse of hmp_handle_error() qga: Use return values instead of error_is_set(errp) error: Consistently name Error ** objects errp, and not err qmp: Consistently name Error ** objects errp, and not err qga: Consistently name Error ** objects errp, and not err qmp hmp: Consistently name Error * objects err, and not errp pci-assign: assigned_initfn(): set monitor error in common error handler pci-assign: propagate errors from assign_intx() pci-assign: propagate errors from assign_device() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()"Peter Lieven2014-05-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 25a7017555f1b4aeb543b5d323ff4afb8f9c5437. Turns out the argument *can* be null: QEMU now segfaults if it receives an invalid parameter via a qmp command instead of throwing an error. For example: { "execute": "blockdev-add", "arguments": { "options" : { "driver": "invalid-driver" } } } CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: Document optional arguments' backwards compatibilityEric Blake2014-05-091-4/+28
| | | | | | | | | | | | | | | | | | Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp: use valid JSON in transaction exampleEric Blake2014-05-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our example should use the correct quotes to match what someone could actually pass over the wire. * qmp-commands.hx: Use correct JSON quotes. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp: Don't use error_is_set() to suppress additional errorsMarkus Armbruster2014-05-091-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using error_is_set(errp) that way can sweep programming errors under the carpet when we get called incorrectly with an error set. encrypted_bdrv_it() does it, because there's no way to make bdrv_iterate() break its loop. Actually safe, because qmp_cont() clears the error before the loop. Clean it up anyway: replace bdrv_iterate() by bdrv_next(), break the loop on error. Replace both occurrences, for consistency. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | dump: Drop pointless error_is_set(), DumpState member errpMarkus Armbruster2014-05-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qmp_dump_guest_memory(), the error must be clear on entry, and we always bail out after setting it, directly or via dump_init(). Therefore, both error_is_set() are always false. Drop them. DumpState member errp is now write-only. Drop it, too. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qemu-option: Clean up fragile use of error_is_set()Markus Armbruster2014-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using error_is_set(ERRP) to find out whether to bail out due to previous error is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see commit 84d18f0). The error_is_set(state->errp) in qemu_opts_from_qdict_1() is merely fragile, because the callers never pass state argument with null state->errp. Make the code more robust and more obviously correct: test *state->errp directly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qga: Drop superfluous error_is_set()Markus Armbruster2014-05-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acquire_privilege(), execute_async() and check_suspend_mode() do nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous tests. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qga: Clean up fragile use of error_is_set()Markus Armbruster2014-05-092-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see commit 84d18f0). The error_is_set(errp) in the guest agent command handler functions are merely fragile, because all chall chains (do_qmp_dispatch() via the generated marshalling functions) pass a non-null errp argument. Make the code more robust and more obviously correct: receive the error in a local variable, then propagate it through the parameter. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: Clean up fragile use of error_is_set()Markus Armbruster2014-05-091-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see commit 84d18f0). The error_is_set(errp) in do_qmp_dispatch() is merely fragile, because the caller never passes a null errp argument. Make the code more robust and more obviously correct: receive the error in a local variable, then propagate it through the parameter. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | tests/qapi-schema: Drop superfluous error_is_set()Markus Armbruster2014-05-091-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: Drop redundant, unclean error_is_set()Markus Armbruster2014-05-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do_qmp_dispatch()'s test for qmp_dispatch_check_obj() failure examines both the return value and the error object. The latter part is unclean; it works only when do_qmp_dispatch()'s caller passes a non-null errp argument. That's the case, but it's not locally obvious. Unclean. Cleanup would be easy enough, but since the unclean code is also redundant, let's just drop it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | hmp: Guard against misuse of hmp_handle_error()Markus Armbruster2014-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Null errp argument makes no sense. Assert it's not null, to make this explicit, and guard against misuse. All current callers pass non-null errp. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qga: Use return values instead of error_is_set(errp)Markus Armbruster2014-05-092-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using error_is_set(errp) to check whether a function call failed is fragile: it breaks when errp is null. ga_get_fd_handle() and guest_file_handle_add() don't return a useful value when they fail, but that's just stupid. Fix that, and check them instead. As far as I can tell, errp can't be null there, but this is more robust and more obviously correct. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | error: Consistently name Error ** objects errp, and not errMarkus Armbruster2014-05-092-15/+20
| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp: Consistently name Error ** objects errp, and not errMarkus Armbruster2014-05-091-8/+8
| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qga: Consistently name Error ** objects errp, and not errMarkus Armbruster2014-05-095-155/+161
| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp hmp: Consistently name Error * objects err, and not errpMarkus Armbruster2014-05-089-240/+240
| | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: assigned_initfn(): set monitor error in common error handlerLaszlo Ersek2014-05-081-16/+10
| | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from assign_intx()Laszlo Ersek2014-05-081-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among the callers, only assigned_initfn() should set the monitor's stored error. Other callers may run in contexts where the monitor's stored error makes no sense. For example: assigned_dev_pci_write_config() assigned_dev_update_msix() assign_intx() Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from assign_device()Laszlo Ersek2014-05-081-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change the return type to "void"; the function is static (with a sole caller) and the negative errno values are not distinguished from each other. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from assigned_dev_register_regions()Laszlo Ersek2014-05-081-10/+13
| | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from assigned_dev_register_msix_mmio()Laszlo Ersek2014-05-081-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return type is also changed from "int" to "void", because it was used in a success vs. failure sense only (the caller didn't distinguish error codes from each other, and even assigned_dev_register_msix_mmio() masked mmap()'s errno values with a common -EFAULT). Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from assigned_device_pci_cap_init()Laszlo Ersek2014-05-081-26/+19
| | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from get_real_device()Laszlo Ersek2014-05-081-20/+20
| | | | | | | | | | | | | | | | | | Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: assignment should fail if we can't read config spaceLaszlo Ersek2014-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assigned_initfn() get_real_device() read() Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: accept Error from pci_add_capability2()Laszlo Ersek2014-05-081-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate any errors while adding PCI capabilities to assigned_device_pci_cap_init(). We'll continue the propagation upwards when assigned_device_pci_cap_init() becomes a leaf itself (when none of its callees will report errors internally any longer when detecting and returning them). Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci: add Error-propagating pci_add_capability2()Laszlo Ersek2014-05-082-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | ... and rebase pci_add_capability() to it. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate Error from check_irqchip_in_kernel()Laszlo Ersek2014-05-081-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename check_irqchip_in_kernel() to verify_irqchip_in_kernel(), so that the name reflects our expectation better. Rather than returning a bool, make it do nothing or set an Error. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: propagate errors from get_real_id()Laszlo Ersek2014-05-081-18/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_real_id() has two thin wrappers (and no other callers), get_real_vendor_id() and get_real_device_id(); it's easiest to convert them in one fell swoop. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: make assign_failed_examine() just format the causeLaszlo Ersek2014-05-081-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to report the entire error with one error_report() call, easing future error propagation. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | pci-assign: accept Error from monitor_handle_fd_param2()Laszlo Ersek2014-05-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate any errors in monitor fd handling up to get_real_device(), and report them there. We'll continue the propagation upwards when get_real_device() becomes a leaf itself (when none of its callees will report errors internally any longer when detecting and returning an error). Signed-off-by: Laszlo Ersek <lersek@redhat.com> eviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | monitor: add Error-propagating monitor_handle_fd_param2()Laszlo Ersek2014-05-082-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and rebase monitor_handle_fd_param() to it. (Note that this will slightly change the behavior when the qemu_parse_fd() branch is selected and it fails: we now report (and in case of QMP, set) the error immediately, rather than allowing the caller to set its own error message (if any)). Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | cutils: tighten qemu_parse_fd()Laszlo Ersek2014-05-081-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu_parse_fd() used to handle at least the following strings incorrectly: o "-2": simply let through o "2147483648": returned as LONG_MAX==INT_MAX on ILP32 (with ERANGE ignored); implementation-defined behavior on LP64 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: treat all negative return of strtosz_suffix() as errorAmos Kong2014-05-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strtosz_suffix() might return negative error, this patch fixes the error handling. This patch also changes to handle error in the if statement rather than handle success specially, this will make this use of strtosz_suffix consistent with all other uses. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: Add a primitive to include other files from a QAPI schema fileLluís Vilanova2014-05-0844-13/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud