- Aug 04, 2011
-
-
Amit Shah authored
Passing on '0' as ballooning target to indicate retrieval of stats is bad API. It also makes 'balloon 0' in the monitor cause a segfault. Have two different functions handle the different functionality instead. Detailed explanation from Markus's review: 1. do_info_balloon() is an info_async() method. It receives a callback with argument, to be called exactly once (callback frees the argument). It passes the callback via qemu_balloon_status() and indirectly through qemu_balloon_event to virtio_balloon_to_target(). virtio_balloon_to_target() executes its balloon stats half. It stores the callback in the device state. If it can't send a stats request, it resets stats and calls the callback right away. Else, it sends a stats request. The device model runs the callback when it receives the answer. Works. 2. do_balloon() is a cmd_async() method. It receives a callback with argument, to be called when the command completes. do_balloon() calls it right before it succeeds. Odd, but should work. Nevertheless, it passes the callback on via qemu_ballon() and indirectly through qemu_balloon_event to virtio_balloon_to_target(). a. If the argument is non-zero, virtio_balloon_to_target() executes its balloon half, which doesn't use the callback in any way. Odd, but works. b. If the argument is zero, virtio_balloon_to_target() executes its balloon stats half, just like in 1. It either calls the callback right away, or arranges for it to be called later. Thus, the callback runs twice: use after free and double free. Test case: start with -S -device virtio-balloon, execute "balloon 0" in human monitor. Runs the callback first from virtio_balloon_to_target(), then again from do_balloon(). Reported-by:
Mike Cao <bcao@redhat.com> Signed-off-by:
Amit Shah <amit.shah@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
Amit Shah authored
Separate out the code to retrieve balloon info from the code that sets balloon values. This will be used to separate the two callbacks from balloon.c and help cope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a segfault in monitor_resume(). Signed-off-by:
Amit Shah <amit.shah@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
Amit Shah authored
Replace: if (foo) { ... } else { return 0; } by if (!foo) { return 0; } ... Signed-off-by:
Amit Shah <amit.shah@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
Amit Shah authored
Signed-off-by:
Amit Shah <amit.shah@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
Amit Shah authored
balloon.h had function declarations for a couple of functions that are local to balloon.c. Make them static. Drop the 'qemu_' prefix for balloon.c-local variables, and make them static. Signed-off-by:
Amit Shah <amit.shah@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
- Aug 03, 2011
-
-
Michael Walle authored
The QEMU keyboard and mouse reports themselves as full speed devices, though they are actually low speed devices. Until this is fixed, claim that we are supporting full speed devices. Acked-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Michael Walle <michael@walle.cc> Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
- Aug 01, 2011
-
-
Blue Swirl authored
Commit b14ef7c9 introduced cpu_unassigned_access() function. On Sparc, the function does not restore AREG0 used for global CPUState on function exit, causing bugs with non-faulting unassigned memory accesses. Alpha, Microblaze and MIPS are not affected. Fix by restoring AREG0 on exit. Remove excess saving by do_unassigned_access() functions. Also ignore unassigned accesses outside of CPU context. Reported-by:
Bob Breuer <breuerr@mc.net> Tested-by:
Bob Breuer <breuerr@mc.net> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Jul 31, 2011
-
-
Peter Crosthwaite authored
Fixes emulation with io-thread. Signed-off-by:
Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by:
Edgar E. Iglesias <edgar.iglesias@gmail.com>
-
- Jul 30, 2011
-
-
Blue Swirl authored
Fix incorrect logic and typos in previous commit 1bfd07bd. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Fix breakage by a640f031 and 55c0975c. Some TCG targets don't implement all TCG ops, so make optimizing those conditional. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Perform constant folding for NOT and EXT{8,16,32}{S,U} operations. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Perform constant forlding for SHR, SHL, SAR, ROTR, ROTL operations. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Perform constant folding for AND, OR, XOR operations. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Perform actual constant folding for ADD, SUB and MUL operations. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Make tcg_constant_folding do copy and constant propagation. It is a preparational work before actual constant folding. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Kirill Batuzov authored
Added file tcg/optimize.c to hold TCG optimizations. Function tcg_optimize is called from tcg_gen_code_common. It calls other functions performing specific optimizations. Stub for constant folding was added. Signed-off-by:
Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
Move softmmu_exec.h include directives from target-*/exec.h to target-*/op_helper.c. Move also various other stuff only used in op_helper.c there. Define global env in dyngen-exec.h. For i386, move wrappers for segment and FPU helpers from user-exec.c to op_helper.c. Implement raise_exception_err_env() to handle dynamic CPUState. Move the function declarations to cpu.h since they can be used outside of op_helper.c context. LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and env_to_regs(). ARM: make raise_exception() static. Convert #include "exec.h" to #include "cpu.h" #include "dyngen-exec.h" and remove now unused target-*/exec.h. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Michael Tokarev authored
This patch almost rewrites acpi_table_add() function (but still leaves it using old get_param_value() interface). The result is that it's now possible to specify whole table (together with a header) in an external file, instead of just data portion, with a new file= parameter, but at the same time it's still possible to specify header fields as before. Now with the checkpatch.pl formatting fixes, thanks to Stefan Hajnoczi for suggestions, with changes from Isaku Yamahata, and with my further refinements. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: John Baboval <john.baboval@virtualcomputer.com> Cc: Blue Swirl <blauwirbel@gmail.com> [yamahata@valinux.co.jp: fix compile error, comment fallthrough] Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Tsuneo Saito authored
Implement %fprs.DU/DL bits. The FPU sets %fprs.DL and %fprs.DU when values are assigned to %f0-31 and %f32-63 respectively. Signed-off-by:
Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Tsuneo Saito authored
Fix the problem that result values are not assigned to the destination registers. Signed-off-by:
Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Vincent Palatin authored
This leads to random off-by-one error. When the size of the SD is exactly 1GB, the emulation was returning a wrong SDHC CSD descriptor. Signed-off-by:
Vincent Palatin <vpalatin@chromium.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
The code which prints the debug usage message on '-d ?' for *-user has to come before the check for "not enough arguments", so that "qemu-foo -d ?" prints the list of possible debug log items rather than the generic usage message. (This was inadvertently broken in commit c235d738.) Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Jan Kiszka authored
For unknown reasons, Windows drivers (tested with XP and Win7) ignore usb-tablet events that move the pointer to 0/0. So always report 0/0 as 1/0. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Vasily Khoruzhick authored
Zipit Z2 is small PXA270 based handheld. Signed-off-by:
Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Andrzej Zaborowski authored
Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
The program actions onenand_prog_main() and onenand_prog_spare() can only set bits. This implies a rewrite of onenand_erase() to not use the program functions, since erase does need to set bits. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Handle the manufacturer, device and version IDs separately rather than smooshing them all together into a single uint32_t. Note that the ID registers are actually 16 bit, even though typically the top bits are 0 and the Read Identification Data command only returns the bottom 8 bits. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
Pass the BlockDriverState to the onenand init function so it doesn't need to look up the drive itself. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Qdevify the NAND device. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
Writing to a NAND device cannot set bits, it can only clear them; implement this rather than simply copying the data. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
After receiving READ STATUS command all subsequent IO reads should return the status register value until another command is issued. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Support NAND devices which are wider than 8 bits. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Andrzej Zaborowski authored
Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Add support for NAND devices of over 1Gb. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
Pass the BlockDeviceState to the nand_init() function rather than having it look it up via drive_get() itself. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
Since lm832x has been qdev'ified, its users will generally have a DeviceState pointer rather than an i2c_slave pointer, so adjust lm832x_key_event's prototype to suit. This allows the n810 (its only user) to actually pass a correct pointer to it rather than NULL. The effect is that we no longer segfault when a key is pressed. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Convert the OMAP GPIO module to qdev. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Peter Maydell authored
The OMAP2430 has a fifth GPIO module which earlier OMAP2 models lack; add the clock definition for it. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
Juha Riihimäki authored
Add helper function omap_l4_region_base() to return the base address of a particular region of an L4 target agent. Signed-off-by:
Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by:
Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Andrzej Zaborowski <andrew.zaborowski@intel.com>
-
- Jul 29, 2011
-
-
Anthony Liguori authored
-