aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-12stubs: fully replace qemu-tool.c and qemu-user.cPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12qemu-option: move standard option definitions out of qemu-config.cPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-armBlue Swirl
* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Fix SWI (SVC) instruction in M profile. target-arm: use type_register() instead of type_register_static()
2013-01-12Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (31 commits) PPC: linux-user: Calculate context pointer explicitly target-ppc: Error out for -cpu host on unknown PVR target-ppc: Slim conversion of model definitions to QOM subclasses PPC: Bring EPR support closer to reality PPC: KVM: set has-idle in guest device tree kvm: Update kernel headers openpic: fix CTPR and de-assertion of interrupts openpic: move IACK to its own function openpic: IRQ_check: search the queue a word at a time openpic: fix sense and priority bits openpic: add some bounds checking for IRQ numbers openpic: use standard bitmap operations Revert "openpic: Accelerate pending irq search" openpic: always call IRQ_check from IRQ_get_next openpic/fsl: critical interrupts ignore mask before v4.1 openpic: make ctpr signed openpic: rework critical interrupt support openpic: make register names correspond better with hw docs ppc/booke: fix crit/mcheck/debug exceptions openpic: lower interrupt when reading the MSI register ...
2013-01-12Merge branch 's390-reorg' of git://repo.or.cz/qemu/rthBlue Swirl
* 's390-reorg' of git://repo.or.cz/qemu/rth: (149 commits) target-s390: Claim maintainership target-s390: Use noreturn for exception and load_psw target-s390: Use TCG_CALL_NO_WG for misc helpers target-s390: Use TCG_CALL_NO_WG for integer helpers target-s390: Use TCG_CALL_NO_WG for floating-point helpers target-s390: Use TCG_CALL_NO_WG for memory helpers target-s390: Perform COMPARE AND SWAP inline target-s390: Optimize get_address target-s390: Optimize ADDC/SUBB target-s390: Optimize ADDU/SUBU CC testing target-s390: Tidy comparisons target-s390: Optmize emitting discards target-s390: Optimize XC target-s390: Fix cpu_clone_regs target-s390: Implement LOAD/SET FP AND SIGNAL target-s390: Implement SET ROUNDING MODE target-s390: Use uint64_to_float128 target-s390: Implement LCDFR target-s390: Check insn operand specifications target-s390: Implement CPSDR ...
2013-01-12hw/pc.c: add ULL suffix in ioport80_read and ioportF0_read return valueJulien Grall
The commit c02e1eac887b1b0aee7361b1fcf889e7d47fed9d broke the compilation for i386. ULL need to be specify for uint64_t value. Signed-off-by: Julien Grall <julien.grall@citrix.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12tcg-i386: use LEA for 3-operand 64-bit additionPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12pixman: fix warningGerd Hoffmann
Cc: afaerber@suse.de Cc: agraf@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to ↵Gerd Hoffmann
CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12optionrom: build with discrete CPP and AS stepsBlue Swirl
Build option ROM .S files with separate preprocessor and assembler steps because the C compiler could be unsuitable. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12slirp: remove unused field ttBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12user: Consider symbolic links as possible directoriesRichard Henderson
Commit 2296f194dfde4c0a54f249d3fdb8c8ca21dc611b reduced the number of syscalls performed during user emulation startup, but failed to consider the use of symbolic links in creating directory structures. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12alpha-linux-user: Fix sigactionRichard Henderson
Unconditional bswap replaced by __get_user/__put_user. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12linux-user: Rewrite __get_user/__put_user with __builtin_choose_exprRichard Henderson
The previous formuation with multiple assignments to __typeof(*hptr) falls down when hptr is qualified const. E.g. with const struct S *p, p->f is also qualified const. With this formulation, there's no assignment to any local variable. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12bswap: Rewrite cpu_to_<endian><type>u with {ld,st}<type>_<endian>_pRichard Henderson
We've now optimized the ld/st versions; reuse that for the "legacy" versions. Always use inlines so that we get the type checking that we expect. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12bswap: Rewrite all ld<type>_<endian>_p functionsRichard Henderson
Use the new host endian unaligned access functions instead of open coding byte-by-byte references. Remove assembly special cases for i386 and ppc -- we've now exposed the operation to the compiler sufficiently for these to be optimized automatically. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12bswap: Add host endian unaligned access functionsRichard Henderson
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12bswap: Tidy base definitions of bswapNRichard Henderson
Move the bswap_N -> bswapN wrappers inside CONFIG_BYTESWAP_H. Change the ultimate fallback defintions from macros to inline functions. The proper types recieved by the function arguments means we can remove unnecessary casts, making the code more readable. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-12fdt: Use bswapN instead of bswap_NRichard Henderson
Fixes the libfdt enabled build for hosts that have <machine/bswap.h>. The code at the beginning of qemu/bswap.h is attempting to standardize on bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get. In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header and then wrap these with inline functions to get bswapN. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-11target-arm: Fix SWI (SVC) instruction in M profile.Alex_Rozenman@mentor.com
When do_interrupt_v7m is called with EXCP_SWI, the PC already points to the next instruction. Don't modify it here. Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-11target-arm: use type_register() instead of type_register_static()Eduardo Habkost
The type_register_static() interface is documented as: type_register_static: @info: The #TypeInfo of the new type. @info and all of the strings it points to should exist for the life time that the type is registered. But cpu_register() uses a stack variable for the 'info' argument, so it has to use type_register() instead of type_register_static(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-11Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
* stefanha/trivial-patches: hw/pc.c: Fix converting of ioport_register* to MemoryRegion Replace remaining gmtime, localtime by gmtime_r, localtime_r savevm: Remove MinGW specific code which is no longer needed qga/channel-posix.c: Explicitly include string.h configure: Fix comment (copy+paste bug) readline: avoid memcpy() of overlapping regions Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-11Merge remote-tracking branch 'kraxel/q35.1' into stagingAnthony Liguori
* kraxel/q35.1: Makefile: install the "acpi-dsdt.aml" and "q35-acpi-dsdt.aml" blobs too pc: rename machine types q35: document chipset devices q35: add ich9 intel hda controller Conflicts: hw/intel-hda.c aliguori: resolve conflict with static const change from Andreas. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-11Merge remote-tracking branch 'afaerber-or/prep-up' into stagingAnthony Liguori
* afaerber-or/prep-up: prep: Use pc87312 device instead of collection of random ISA devices prep: Add pc87312 Super I/O emulation prep: Include devices for ppc64 as well Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-11hw/pc.c: Fix converting of ioport_register* to MemoryRegionJulien Grall
The commit 258711 introduced MemoryRegion to replace ioport_region* for ioport 80h and F0h. A MemoryRegion needs to have both read and write callback otherwise a segfault will occur when an access is made. The previous behaviour of this both ioport is to return 0xffffffffffffffff. So keep this behaviour. Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Julien Grall <julien.grall@citrix.com> Tested-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-11Replace remaining gmtime, localtime by gmtime_r, localtime_rStefan Weil
This allows removing of MinGW specific code and improves reentrancy for POSIX hosts. [Removed unused ret variable in qemu_get_timedate() to fix warning: vl.c: In function ‘qemu_get_timedate’: vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] -- Stefan Hajnoczi] Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-11savevm: Remove MinGW specific code which is no longer neededStefan Weil
QEMU provides a portable function qemu_gettimeofday instead of gettimeofday and also an implementation of localtime_r for MinGW. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-11qga/channel-posix.c: Explicitly include string.hPeter Maydell
Explicitly include string.h to avoid warnings under MacOS X/clang about implicit declarations of strerror() and strlen(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-11configure: Fix comment (copy+paste bug)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-11Makefile: install the "acpi-dsdt.aml" and "q35-acpi-dsdt.aml" blobs tooLaszlo Ersek
The WARNING message from commit f7e4dd6c made me notice. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-11pc: rename machine typesGerd Hoffmann
Starting with release 1.4 we have a fully functional q35 machine type, i.e. "qemu -M q35" JustWorks[tm]. Update machine type names to reflect that: * pc-1.4 becomes pc-i440fx-1.4 * q35-next becomes pc-q35-1.4 The pc-1.3 (+older) names are maintained for compatibility reasons. For the same reason the "pc" and "q35" aliases are kept. pc-piix-1.4 continues to be the default machine type, again for compatibility reasons. Also updated the description (shown by "qemu -M ?") with host bridge name, south bridge name and chipset release year. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-11q35: document chipset devicesGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-11q35: add ich9 intel hda controllerGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-10virtio-scsi: abort in-flight I/O when the device is resetPaolo Bonzini
When the device is reset, the SCSI bus should also be reset so that in-flight I/O is cancelled. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10qdev: add qbus_reset_allPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10Make all static TypeInfos constAndreas Färber
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10Merge branch 'master' of git://git.qemu.org/qemu into prep-upAndreas Färber
Conflicts: hw/Makefile.objs hw/ppc_prep.c Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-01-10Merge remote-tracking branch 'kraxel/build.1' into stagingAnthony Liguori
* kraxel/build.1: m48t59-test: don't touch watchdog rtc-test: skip year-2038 overflow check in case time_t is 32bit only Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10Merge remote-tracking branch 'awilliam/tags/qemu-1.4-vfio-20130109.0' into ↵Anthony Liguori
staging vfio-pci: Fixes for qemu 1.4 & stable * awilliam/tags/qemu-1.4-vfio-20130109.0: vfio-pci: Loosen sanity checks to allow future features vfio-pci: Make host MSI-X enable track guest Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-10m48t59-test: don't touch watchdogGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-10rtc-test: skip year-2038 overflow check in case time_t is 32bit onlyGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-09Check return values from g_poll and selectFabien Chouteau
The current implementation of os_host_main_loop_wait() on Windows, returns 1 only when a g_poll() event occurs because the return value of select() is overridden. This is wrong as we may skip a socket event, as shown in this example: 1. select() returns 0 2. g_poll() returns 1 (socket event occurs) 3. os_host_main_loop_wait() returns 1 4. qemu_iohandler_poll() sees no socket event because select() has return before the event occurs 5. select() returns 1 6. g_poll() returns 0 (g_poll overrides select's return value) 7. os_host_main_loop_wait() returns 0 8. qemu_iohandler_poll() doesn't check for socket events because the return value of os_host_main_loop_wait() is zero. 9. goto 5 This patch use one variable for each of these return values, so we don't miss a select() event anymore. Also move the call to select() after g_poll(), this will improve latency as we don't have to go through two os_host_main_loop_wait() calls to detect a socket event. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-09Merge remote-tracking branch 'mdroth/qga-pull-1-8-2013' into stagingAnthony Liguori
* mdroth/qga-pull-1-8-2013: qemu-ga: sample fsfreeze hooks qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thaw qemu-ga: guest_suspend(): improve error reporting qemu-ga: bios_supports_mode(): improve error reporting qemu-ga: qmp_guest_network_get_interfaces(): get rid of snprintf() + error_set() qemu-ga: qmp_guest_fstrim(): get rid of sprintf() + error_set() qemu-ga: qmp_guest_fsfreeze_*(): get rid of sprintf() + error_set() qemu-ga: build_fs_mount_list(): take an Error argument qemu-ga: qmp_guest_shutdown(): improve error reporting qemu-ga: qmp_guest_file_*: improve error reporting qemu-ga: qmp_guest_file_close(): fix fclose() error check qemu-ga: guest_file_handle_find(): take an Error argument Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-08qemu-ga: sample fsfreeze hooksTomoki Sekiyama
Adds sample hook scripts for --fsfreeze-hook option of qemu-ga. - fsfreeze-hook : execute scripts in fsfreeze-hook.d/ - fsfreeze-hook.d/mysql-flush.sh.sample : quiesce MySQL before snapshot Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thawTomoki Sekiyama
To use the online disk snapshot for online-backup, application-level consistency of the snapshot image is required. However, currently the guest agent can provide only filesystem-level consistency, and the snapshot may contain dirty data, for example, incomplete transactions. This patch provides the opportunity to quiesce applications before snapshot is taken. If --fsfreeze-hook option is specified, the hook is executed with "freeze" argument before the filesystem is frozen by fsfreeze-freeze command. As for fsfreeze-thaw command, the hook is executed with "thaw" argument after the filesystem is thawed. This patch depends on patchset to improve error reporting by Luiz Capitulino: http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> *clarified usage in help output Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: guest_suspend(): improve error reportingLuiz Capitulino
Most errors are QERR_UNDEFINED_ERROR today. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: bios_supports_mode(): improve error reportingLuiz Capitulino
Most errors are QERR_UNDEFINED_ERROR today. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: qmp_guest_network_get_interfaces(): get rid of snprintf() + error_set()Luiz Capitulino
Convert them to error_setg_errno(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: qmp_guest_fstrim(): get rid of sprintf() + error_set()Luiz Capitulino
Convert them to error_setg_errno(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: qmp_guest_fsfreeze_*(): get rid of sprintf() + error_set()Luiz Capitulino
Convert them to error_setg_errno(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>