summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* milkymist-vgafb: add missing registerMichael Walle2012-04-011-1/+4
| | | | | | | | | This bug existed since the first commit. Fortunately, the affected registers have no functionality in qemu. This will only prevent the following warning: milkymist_vgafb: write access to unknown register 0x00000034 Signed-off-by: Michael Walle <michael@walle.cc>
* target-lm32: add simple disassemblerMichael Walle2012-04-015-0/+375
| | | | | | | Because binutils disassembler is based on libopcode, this is a rewrite from scratch. Signed-off-by: Michael Walle <michael@walle.cc>
* milkymist-sysctl: support for new core versionMichael Walle2012-03-311-9/+17
| | | | | | | | | The new version introduces the following new registers: - SoC clock frequency: read-only of system clock used on the SoC - debug scratchpad: 8 bit scratchpad register - debug write lock: write once register, without any function on QEMU Signed-off-by: Michael Walle <michael@walle.cc>
* target-lm32: init tcg only if availableMichael Walle2012-03-311-1/+1
| | | | | | Once qtest support for target-lm32 arrives, tcg may be disabled. Signed-off-by: Michael Walle <michael@walle.cc>
* tests: fix out-of-tree building for lm32 targetMichael Walle2012-03-312-6/+11
| | | | Signed-off-by: Michael Walle <michael@walle.cc>
* Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl2012-03-317-57/+84
|\ | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: pl031: switch clock base to rtc_clock pl031: rearm alarm timer upon load arm: switch real-time clocks to rtc_clock omap: switch omap_lpg to vm_clock rtc: add -rtc clock=rt
| * pl031: switch clock base to rtc_clockPaolo Bonzini2012-03-301-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets the user specify the desired semantics. By default, the RTC will follow adjustments from the host's NTP client, and will remain in sync when the virtual machine is stopped. The previous behavior, which provides determinism with both icount and qtest, remains available with "-rtc clock=vm". pl031 supports migration, so we need to convert the time base from rtc_clock to vm_clock and back for backwards compatibility. (The rtc_clock may not be synchronized on the two machines, especially with savevm/loadvm, so the conversion is needed anyway. And since any time base will do, why not pick the one base that is backwards compatible). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * pl031: rearm alarm timer upon loadPaolo Bonzini2012-03-301-15/+24
| | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * arm: switch real-time clocks to rtc_clockPaolo Bonzini2012-03-304-25/+26
| | | | | | | | | | | | | | | | | | | | This lets the user specify the desired semantics. By default, the RTC will follow adjustments from the host's NTP client. "-rtc clock=vm" will improve determinism with both icount and qtest. Finally, the previous behavior is available with "-rtc clock=rt". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * omap: switch omap_lpg to vm_clockPaolo Bonzini2012-03-301-3/+3
| | | | | | | | | | | | | | | | | | The output of the pulse generator needs to be deterministic when running in -icount mode, and to remain constant whenever the VM is stopped. So the right clock to use is vm_clock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * rtc: add -rtc clock=rtPaolo Bonzini2012-03-302-3/+6
| | | | | | | | | | | | | | | | This will let people use backwards-compatible semantics for devices that will be affected by the following patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge branch 'qom-cpu-unicore32.v3' of git://github.com/afaerber/qemu-cpuBlue Swirl2012-03-319-61/+186
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'qom-cpu-unicore32.v3' of git://github.com/afaerber/qemu-cpu: target-unicore32: Move CPU-dependent init into initfn target-unicore32: QOM'ify CPU target-unicore32: License future contributions under GPLv2+ target-unicore32: Relicense to GPLv2+ MAINTAINERS: Add entry for UniCore32
| * | target-unicore32: Move CPU-dependent init into initfnAndreas Färber2012-03-302-23/+14
| | | | | | | | | | | | | | | | | | | | | Instead of setting values in a CPUID switch, do so in initfn functions. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
| * | target-unicore32: QOM'ify CPUAndreas Färber2012-03-305-36/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | Embed CPUUniCore32State as first member of UniCore32CPU. Contributed under GPLv2+. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
| * | target-unicore32: License future contributions under GPLv2+Andreas Färber2012-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | This is to limit relicensing obstacles to the pending IBM investigation. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
| * | target-unicore32: Relicense to GPLv2+Andreas Färber2012-03-304-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adopt the license text suggested by Guan Xue-tao (with a minor simplification) for all target-unicore/ files except helper.c. To helper.c Anthony Liguori contributed a qemu_malloc() -> g_malloc() conversion, still pending IBM relicensing approval, so that remains GPLv2 for now. By relicensing all possible parts now, we avoid having to formally relicense new, e.g., QOM code. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Dor Laor <dlaor@redhat.com>
| * | MAINTAINERS: Add entry for UniCore32Andreas Färber2012-03-301-0/+5
| |/ | | | | | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
* | Merge branch 'target-arm.for-upstream' of ↵Blue Swirl2012-03-316-8/+143
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers. target-arm: Minimalistic CPU QOM'ification target-arm: Drop cpu_arm_close()
| * | ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.Andrew Towers2012-03-303-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces the ARM_FEATURE_VFP3 test when reading MVFR registers with a test for a new feature flag ARM_FEATURE_MVFR, and sets this feature for all ARMv6K cores (ARM1156 is not a v6K core, yet supports MVFR; qemu does not support ARM1156 at this time.) MVFR0 and MVFR1 were introduced in ARM1136JF-S r1p0 (ARMv6K, VFPv2) and are present in ARM1156T2F-S (non-v6K), ARM1176JZF-S, ARM11MPCore and newer cores. Reference: ARM DDI 0211H, 0290G, 0301H, 0360E. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0211h/Ffbefjag.html Without this change, the linux kernel will not boot with VFP support enabled under ARM1176 system emulation, due to the unconditional use of MVFR1 at the end of vfp_init() in arch/arm/vfp/vfpmodule.c: VFP support v0.3: implemetor 41 architecture 1 part 20 variant b rev 5 Internal error: Oops - undefined instruction: 0 [#1] Signed-off-by: Andrew Towers <atowers@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-arm: Minimalistic CPU QOM'ificationAndreas Färber2012-03-295-1/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce only one non-abstract type TYPE_ARM_CPU and do not touch cp15 registers to not interfere with Peter's ongoing remodelling. Embed CPUARMState as first (additional) field of ARMCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-arm: Drop cpu_arm_close()Andreas Färber2012-03-292-6/+0
| |/ | | | | | | | | | | | | It's unused, so no need to QOM'ify it later. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | buildfix: check for old pod2man versionsGerd Hoffmann2012-03-312-1/+8
| | | | | | | | | | | | | | | | Older pod2man don't have a --utf8 switch, check for this in conffigure and use it only when present. Fixes build on RHEL-5. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Fix conversion from lower to upper case with Turkish localeStefan Weil2012-03-313-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some locale settings let make fail or create wrong results because tr '[:lower:]' '[:upper:]' which is used to convert from lower to upper case depends on the locale. With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'. This results in wrong entries in config-host.h like these ones: #define CONFIG_QEMU_PREFiX "/usr/local" #define CONFIG_QEMU_BiNDiR "/usr/local/bin" This problem was reported by Emre Ersin. The same problem occurs when configure creates the target specific files config-target.mak. They get wrong declarations: TARGET_CRiS=y TARGET_i386=y TARGET_MiCROBLAZE=y TARGET_MiPS64=y TARGET_MiPS=y TARGET_UNiCORE32=y It is sufficient to restrict the conversion to the characters a-z. Using this explicit range avoids the dependency on the locale settings and is also shorter. v2: POSIX says that 'tr a-z' is unspecified outside of the POSIX locale, so we must set LC_ALL=C to make sure that we are using POSIX (hint from Eric Blake, thanks). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qtest: avoid a warning with RTC testBlue Swirl2012-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | Avoid this warning on OpenBSD: CC tests/rtc-test.o /src/qemu/tests/rtc-test.c: In function 'check_time': /src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' /src/qemu/tests/rtc-test.c:173: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t' Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qtest: fix 32-bit buildAnthony Liguori2012-03-301-1/+1
| | | | | | | | | | | | | | time_t appears to be an unsigned long so use %ld. Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: fix out of tree buildBlue Swirl2012-03-301-0/+2
| | | | | | | | | | | | | | Trace objects are also needed if tracing is enabled. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | qtest: add rtc-test test-caseAnthony Liguori2012-03-302-0/+268
| | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | rtc: split out macros into a header file and use in test caseAnthony Liguori2012-03-303-35/+63
| | | | | | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: add C version of test infrastructureAnthony Liguori2012-03-305-4/+748
| | | | | | | | | | | | | | | | | | This also includes a qtest wrapper script to make it easier to launch qtest tests directly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: add clock managementPaolo Bonzini2012-03-305-1/+69
| | | | | | | | | | | | | | | | | | | | This patch combines qtest and -icount together to turn the vm_clock into a source that can be fully managed by the client. To this end new commands clock_step and clock_set are added. Hooking them with libqtest is left as an exercise to the reader. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: IRQ interception infrastructurePaolo Bonzini2012-03-304-24/+93
| | | | | | | | | | | | | | | | | | Since /i440fx/piix3 is being removed from the composition tree, the IO-APIC is placed under /i440fx. This is wrong and should be changed as soon as the /i440fx/piix3 path is put back. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qtest: add test frameworkAnthony Liguori2012-03-308-4/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea behind qtest is pretty simple. Instead of executing a CPU via TCG or KVM, rely on an external process to send events to the device model that the CPU would normally generate. qtest presents itself as an accelerator. In addition, a new option is added to establish a qtest server (-qtest) that takes a character device. This is what allows the external process to send CPU events to the device model. qtest uses a simple line based protocol to send the events. Documentation of that protocol is in qtest.c. I considered reusing the monitor for this job. Adding interrupts would be a bit difficult. In addition, logging would also be difficult. qtest has extensive logging support. All protocol commands are logged with time stamps using a new command line option (-qtest-log). Logging is important since ultimately, this is a feature for debugging. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | test makefile overhaulPaolo Bonzini2012-03-3016-45/+123
| | | | | | | | | | | | | | | | | | | | | | | | This introduces new test reporting infrastructure based on gtester and gtester-report. Also, all existing tests are moved to tests/, and tests/Makefile is reorganized to factor out the commonalities in the rules. Signed-off-by: Anthony Liguori <aliguori@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-03-291-1/+0
|\ \ | |/ | | | | | | * origin/master: qemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defs
| * qemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defsLi Zhang2012-03-291-1/+0
| | | | | | | | | | | | | | | | | | | | There two entries of INDEX_op_ld_i64 in the ppc_op_defs. That causes an assertion failure in tcg_add_target_add_op_defs() when --enable-debug is used on a ppc64 backend (that's ppc64 host, not target). Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: malc <av1474@comtv.ru>
* | Merge remote-tracking branch 'sstabellini/disk_io' into stagingAnthony Liguori2012-03-281-5/+5
|\ \ | | | | | | | | | | | | | | | * sstabellini/disk_io: xen_disk: when using AIO flush after the operation is completed xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIO
| * | xen_disk: when using AIO flush after the operation is completedStefano Stabellini2012-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | If ioreq->postsync call bdrv_flush when the AIO operation is actually completed. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | xen_disk: open disk with BDRV_O_NOCACHE | BDRV_O_CACHE_WB | BDRV_O_NATIVE_AIOStefano Stabellini2012-03-231-2/+2
| | | | | | | | | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | | Merge remote-tracking branch 'sstabellini/xen-fixes' into stagingAnthony Liguori2012-03-282-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | * sstabellini/xen-fixes: xen_disk: detach the blkdev before bdrv_delete xen_console: ignore console disconnect events from console/0
| * | | xen_disk: detach the blkdev before bdrv_deleteStefano Stabellini2012-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to detach the blkdev from the BlockDriverState before calling bdrv_delete. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * | | xen_console: ignore console disconnect events from console/0Stefano Stabellini2012-03-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first console has a different location compared to other PV devices (console, rather than device/console/0) and doesn't obey the xenstore state protocol. We already special case the first console in con_init and con_initialise, we should also do it in con_disconnect. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | | | Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-03-2814-56/+407
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qmp/queue/qmp: qmp: document strict parsing qmp: parse commands in strict mode qmp: add and use q type specifier qapi: add strict mode to input visitor qapi: place outermost object on qiv stack qapi: untangle next_list qapi: allow freeing partially-allocated objects qapi: shortcut visits on errors qapi: fix memory leak on error qapi: fail hard on stack imbalance qapi: add a test case for type errors qapi: add struct-errors test case to test-qmp-output-visitor qapi: fix double free in qmp_output_visitor_cleanup()
| * | | | qmp: document strict parsingPaolo Bonzini2012-03-271-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qmp: parse commands in strict modePaolo Bonzini2012-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qmp: add and use q type specifierPaolo Bonzini2012-03-272-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "O" is being used by the transaction and qom-set commands to mean "any QObject", but it really means "do not validate the argument list". Add a new specifier with the correct meaning. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qapi: add strict mode to input visitorPaolo Bonzini2012-03-274-4/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While QMP in general is designed so that it is possible to ignore unknown arguments, in the case of the QMP server it is better to reject them to detect bad clients. In fact, we're already doing this at the top level in the argument checker. To extend this to complex structures, add a mode to the input visitor where it checks for unvisited keys and raises an error if it finds one. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qapi: place outermost object on qiv stackPaolo Bonzini2012-03-271-24/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a slight change in the implementation of QMPInputVisitor that helps when adding strict mode. Const QObjects cannot be inc/decref-ed, and that's why QMPInputVisitor relies heavily on weak references to inner objects. I'm not removing the weak references now, but since refcount+const is a lost battle in C (C++ has "mutable") I think removing const is fine in this case. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qapi: untangle next_listPaolo Bonzini2012-03-273-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, the semantics of next_list are complicated. The caller must: * call start_list * call next_list for each element *including the first* * on the first call to next_list, the second argument should point to NULL and the result is the head of the list. On subsequent calls, the second argument should point to the last node (last result of next_list) and next_list itself tacks the element at the tail of the list. This works for both input and output visitor, but having the visitor write memory when it is only reading the list is ugly. Plus, relying on *list to detect the first call is tricky and undocumented. We can initialize so->entry in next_list instead of start_list, leaving it NULL in start_list. This way next_list sees clearly whether it is on the first call---as a bonus, it discriminates the cases based on internal state of the visitor rather than external state. We can also pull the assignment of the list head from generated code up to next_list. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qapi: allow freeing partially-allocated objectsPaolo Bonzini2012-03-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Objects going through the dealloc visitor can be only partially allocated. Detect the situation and avoid a segfault. This also helps with the input visitor, when there are errors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | | qapi: shortcut visits on errorsPaolo Bonzini2012-03-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can exit very soon if we enter a visitor with a preexisting error. This simplifies some cases because we will not have to deal with obj being non-NULL while *obj is NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud