summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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/+17Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | qapi: fix memory leak on errorPaolo Bonzini2012-03-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QmpInputVisitor would leak the malloced struct if the stack was overflowed. This can be easily fixed using error_propagate. 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: fail hard on stack imbalancePaolo Bonzini2012-03-271-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QmpOutputVisitor will segfault if an imbalanced end function is called. So we can abort in QmpInputVisitor too. 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 a test case for type errorsPaolo Bonzini2012-03-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no test case for parse errors, add one. 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 struct-errors test case to test-qmp-output-visitorPaolo Bonzini2012-03-272-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test case verifies that invalid native enums are caught, and causes qapi to tear down the QObject tree under construction, exercising the previous patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | qapi: fix double free in qmp_output_visitor_cleanup()Laszlo Ersek2012-03-271-3/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stack entries in QmpOutputVisitor are navigation links (weak references), except the bottom (ie. least recently added) entry, which owns the root QObject [1]. Make qmp_output_visitor_cleanup() drop the stack entries, then release the QObject tree by the root. Attempting to serialize an invalid enum inside a dictionary is an example for triggering the double free. [1] http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg03276.html Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | | Merge remote-tracking branch 'alon/libcacard' into stagingAnthony Liguori2012-03-281-10/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * alon/libcacard: libcacard/vcard_emul_nss: add warning for old coolkey libcacard/vcard_emul_nss: handle no readers at startup libcacard/vcard_emul_nss: don't stop thread when there are no slots
| * | | libcacard/vcard_emul_nss: add warning for old coolkeyAlon Levy2012-03-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older coolkey versions (before the future fix of RHBZ 802435) have a fake card reader created if no reader is detected during module initialization. Warn libcacard users if the faulty coolkey is detected by checking for the fake reader name "E-Gate 0 0". Signed-off-by: Alon Levy <alevy@redhat.com>
| * | | libcacard/vcard_emul_nss: handle no readers at startupAlon Levy2012-03-261-10/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting with no readers, coolkey should show no slots (with RHBZ 806038 fixed). Fix initialization to launch the event handling thread for each module that isn't the internal module regardless of the number of slots detected for it at initialization time, since slot number may start as 0 and is dynamic. RHBZ: 802435 Signed-off-by: Alon Levy <alevy@redhat.com>
| * | | libcacard/vcard_emul_nss: don't stop thread when there are no slotsAlon Levy2012-03-261-0/+11
| | | | | | | | | | | | | | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* | | | sparc: pass page aligned addresses to tlb_set_pageBlue Swirl2012-03-271-11/+8Star
| |/ / |/| | | | | | | | | | | | | | | | | | | | Mask incoming page address early so that resolved addresses are page aligned. Remove further address masking. Tested-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | Merge remote-tracking branch 'mdroth/qga-pull-3-26-12' into stagingAnthony Liguori2012-03-261-45/+66
|\ \ \ | | | | | | | | | | | | | | | | * mdroth/qga-pull-3-26-12: qemu-ga: fix bsd build, and re-org linux-specific implementations
| * | | qemu-ga: fix bsd build, and re-org linux-specific implementationsMichael Roth2012-03-251-45/+66
| |/ /
* | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-03-264-5/+3Star
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: trace-events: Fix broken build caused by wrong format specifier test: add test-qmp-commands to make check qapi: remove print statements from test-qmp-commands test: remove qemu-ga reference vl.c: fix '-cpu ?' segfault
| * | | trace-events: Fix broken build caused by wrong format specifierStefan Weil2012-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mem is an uint64_t value, so %lx was wrong. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | test: add test-qmp-commands to make checkMichael Roth2012-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the deps are here but the test was never added to the list of tests for make check Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | qapi: remove print statements from test-qmp-commandsMichael Roth2012-03-261-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is necessary for nicer make check integration. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | test: remove qemu-ga referenceMichael Roth2012-03-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added by mistake a while back. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | vl.c: fix '-cpu ?' segfaultEduardo Habkost2012-03-261-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix stupid copy&paste mistake at commit ecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept "optarg" on the cpu_list() call. Reported-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'spice/spice.v51' into stagingAnthony Liguori2012-03-261-11/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | * spice/spice.v51: ui/spice-display: use uintptr_t when casting qxl physical addresses ui/spice-display.c: Fix compilation warnings on 32 bit hosts
| * | | ui/spice-display: use uintptr_t when casting qxl physical addressesAlon Levy2012-03-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current intptr_t casts are a problem when the address's highest bit is 1, and it is cast to a intptr_t and then to uint64_t, such as at: surface.mem = (intptr_t)ssd->buf; This causes the sign bit to be extended which causes a wrong address to be passed on to spice, which then complains when it gets the wrong slot_id number, since the slot_id is taken from the higher bits. The assertion happens early - during the first primary surface creation. This fixes running "-vga qxl -spice" with 32 bit compiled qemu-system-i386. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | ui/spice-display.c: Fix compilation warnings on 32 bit hostsPeter Maydell2012-03-221-6/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Fix compilation failures ("cast from pointer to integer of different size [-Werror=pointer-to-int-cast]") by using uintptr_t instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | test: remove qemu-ga referenceMichael Roth2012-03-262-1/+2
| | | | | | | | | | | | | | | | | | | | | This was added by mistake a while back. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Man page: Add -global descriptionMiroslav Rezanina2012-03-261-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> v4: - break long line v3: - add use case description - use prop instead of property v2: - Use better value in example Patch: -- Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qapi: add c_fun to escape function namesFederico Simoncelli2012-03-264-12/+15
| |/ |/| | | | | | | Signed-off-by: Federico Simoncelli <fsimonce@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | tcg-sparc: Add debug_frame support.Richard Henderson2012-03-242-0/+78
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | tcg-hppa: Add debug_frame support.Richard Henderson2012-03-241-15/+88
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | tcg: Allow ELF_HOST_FLAGS and ELF_OSABI overrides in gdb-jit.Richard Henderson2012-03-241-0/+6
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | tcg: Add debug_info to JIT ELF image.Richard Henderson2012-03-241-75/+158
| | | | | | | | | | | | | | | | | | This allows us to actually supply a function name in softmmu builds; gdb doesn't pick up the minimal symbol table otherwise. Also add a bit of documentation and statically generate more of the ELF image. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Use noreturn marker in helper.h.Richard Henderson2012-03-241-1/+1
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Make use of fp_status.flush_inputs_to_zero.Richard Henderson2012-03-245-50/+26Star
| | | | | | | | | | | | | | | | | | This softfp feature post-dates the last major update to the Alpha fpu translation. We can make use of this to eliminate at least one helper function that was performing this operation by hand. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Move memory helpers to mem_helper.c.Richard Henderson2012-03-245-39/+30Star
| | | | | | | | | | | | | | | | This completes the transition away from AREG0. This patch must be last because it requires CONFIG_TCG_PASS_AREG0 set too. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Move palcode support helpers to sys_helper.c.Richard Henderson2012-03-245-78/+100
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Move integer overflow helpers to int_helper.c.Richard Henderson2012-03-244-75/+106
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Move fpcr helpers from op_helper.c to helper.c.Richard Henderson2012-03-244-17/+17
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | target-alpha: Move floating-point helpers to fpu_helper.c.Richard Henderson2012-03-245-929/+967
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>