summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-20Update OpenBIOS images for Sparc32 and Sparc64Blue Swirl3-4/+3
Update Sparc32 and Sparc64 OpenBIOS images to SVN revision 1045. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20Fix unassigned memory access handlingBlue Swirl10-35/+48
cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory access handling. Fix them by always passing CPUState to the handlers. Reported-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20Avoid CPU endian memory accesses in devicesBlue Swirl4-10/+22
Don't compile virtio.c in hwlib, it depends on memory accesses performed in CPU endianness. Make loads and stores in CPU endianness unavailable to devices and poison them to avoid further bugs. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.Tsuneo Saito1-1/+2
UA2007 ASI_BLK_* should be added in is_translating_asi(). Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20checkpatch: Fix bracing false positives on #ifBlue Swirl1-0/+1
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else, fix also #if. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20tcg/mips: Fix regression caused by typo (copy + paste bug)Stefan Weil1-1/+1
cppcheck reports an error: qemu/tcg/mips/tcg-target.c:1487: error: Invalid number of character (() The unpatched code won't compile on mips hosts starting with commit cea5f9a28faa528b6b1b117c9ab2d8828f473fef. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20ds1225y: convert to qdev device, and use it in MIPS Jazz emulationHervé Poussineau3-31/+82
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20ds1225y: use trace frameworkHervé Poussineau2-11/+9
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20ds1225y: Remove protection stuff, which doesn't belong to this deviceHervé Poussineau2-42/+1
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20SPARC64: add missing break on fmovdccTsuneo Saito1-0/+1
"break" is missing on V9 fmovdcc (%icc). Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20SPARC64: fix VIS1 SIMD signed compare instructionsTsuneo Saito3-28/+31
The destination registers of SIMD signed compare instructions (fcmp*<16|32>) are not FP registers but general purpose r registers. Comparisons should be freg_rs1 CMP freg_rs2, that were reversed. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20Merge branch 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-armBlue Swirl8-493/+753
* 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Fix BASEPRI, BASEPRI_MAX, and FAULTMASK access target-arm: Minimal implementation of performance counters Revert "Makefile.target: Allow target helpers to be in any *_helper.c file" Revert "target-arm: Use global env in neon_helper.c helpers" target-arm: Pass fp status pointer explicitly to neon fp helpers target-arm: Make VFP binop helpers take pointer to fpstatus, not CPUState target-arm: Add helper function to generate code to get fpstatus pointer Revert "target-arm: Use global env in iwmmxt_helper.c helpers" Conflicts: Makefile.target
2011-07-19Merge remote-tracking branch 'agraf/xen-next' into stagingAnthony Liguori17-137/+221
2011-07-19Merge remote-tracking branch 'kraxel/usb.19' into stagingAnthony Liguori13-235/+523
2011-07-19Merge remote-tracking branch 'spice/spice.v38' into stagingAnthony Liguori4-18/+46
2011-07-19Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori5-9/+21
2011-07-19Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori22-97/+549
2011-07-18virtio-console: Prevent abort()s in case of host chardev closeAmit Shah1-1/+15
A host chardev could close just before the guest sends some data to be written. This will cause an -EPIPE error. This shouldn't be propagated to virtio-serial-bus. Ideally we should close the port once -EPIPE is received, but since the chardev interface doesn't return such meaningful values to its users, all we get is -1 for any kind of error. Just return 0 for now and wait for chardevs to return better error messages to act better on the return messages. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-serial-bus: Fix trailing \n in error_report stringAmit Shah1-1/+1
Markus fixed offenders in the file but one instance sneaked in via another patch. Fix it. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-console: Add some trace eventsAmit Shah2-1/+13
Add some trace events for messages passed between the char layer and the virtio-serial bus. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18virtio-serial-bus: Add trace eventsAmit Shah2-0/+13
Add some trace events for messages passed between the guest and host. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-17virtio: fix indirect descriptor buffer overflowMichael S. Tsirkin1-0/+8
We were previously allowing arbitrarily-long indirect descriptors, which could lead to a buffer overflow in qemu-kvm process. CVE-2011-2212 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17xen: move to new pci initializersMichael S. Tsirkin1-8/+7
move ids to pci info structure Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17hw/piix_pci.c: Fix PIIX3-xen to initialize idsAnthony PERARD1-0/+3
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17pci_ids: tweak names to match linux/pci_ids.hMichael S. Tsirkin2-5/+6
Sync xen names to ones used by linux. Add xen platform device id as well. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17vhost: fix double free on device stopMichael S. Tsirkin1-0/+1
vhost dev stop failed to clear the log field. Typically not an issue as dev start overwrites this field, but if logging gets disabled before the following start, it doesn't so this causes a double free. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-07-17xen_console: fall back to qemu serial deviceAlexander Graf1-4/+7
The new xen_console protocol changed the default xen_console output device from whatever Qemu chose to whatever xenstore choses and "pty" as fallback. This is not how Qemu works. It has its own serial redirection semantics. So it xenstore doesn't contain information on what to do, Qemu is the place to ask. Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_console: support the new extended xenstore protocolStefano Stabellini5-6/+87
Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. From the Qemu point of view, very few modifications are needed to correctly support the protocol: read from xenstore the "output" node that tell us what the output of the PV console is going to be. In case the output is a tty, write to xenstore the device name. Changes in v2: - fix error paths: free malloc'ed strings and close the xenstore connection before returning; - remove useless snprintf in xenstore_store_pv_console_info if i == 0. Changes in v3: - replace xs_daemon_open/xs_daemon_close with xs_open/xs_close. Changes in v4: - add a compatibility implementation of xs_open/xs_close. Changes in v5: - fix code style. [agraf] fix build error due to missing stub Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17checkpatch: don't error out on },{ linesAlexander Graf1-1/+3
When having code like this: static PCIDeviceInfo piix_ide_info[] = { { .qdev.name = "piix3-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371SB_1, .class_id = PCI_CLASS_STORAGE_IDE, },{ .qdev.name = "piix4-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1, .init = pci_piix_ide_initfn, .vendor_id = PCI_VENDOR_ID_INTEL, .device_id = PCI_DEVICE_ID_INTEL_82371AB, .class_id = PCI_CLASS_STORAGE_IDE, },{ /* end of list */ } }; checkpatch currently errors out, claiming that spaces need to follow commas. However, this particular style of defining structs is pretty common in qemu code and very readable. So let's declare it as supported for the above case. Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_disk: treat "aio" as "raw"Stefano Stabellini1-0/+3
Sometimes the toolstack uses "aio" without an additional format identifier, in such cases use "raw". Updated in v2: - fix code style. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17qemu_ram_ptr_length: take ram_addr_t as argumentsStefano Stabellini2-8/+15
qemu_ram_ptr_length should take ram_addr_t as argument rather than target_phys_addr_t because is doing comparisons with RAMBlock addresses. cpu_physical_memory_map should create a ram_addr_t address to pass to qemu_ram_ptr_length from PhysPageDesc phys_offset. Remove code after abort() in qemu_ram_ptr_length. Changes in v2: - handle 0 size in qemu_ram_ptr_length; - rename addr1 to raddr; - initialize raddr to ULONG_MAX. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_disk: cope with missing xenstore "params" nodeStefano Stabellini1-7/+27
When disk is a cdrom and the drive is empty the "params" node in xenstore might be missing completely: cope with it instead of segfaulting. Updated in v2: - actually removed the strchr(blkdev->params, ':') that caused the segfault; - free all the allocated strings from xenstore before returning; Updated in v3: - set blkdev fields to NULL after free'ing them. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: add vkbd support for PV on HVM guestsStefano Stabellini2-7/+13
Register the vkbd backend even when running as device emulator for HVM guests: it is useful because it doesn't need a frequent timer like usb. Check whether the XenInput DisplayState has been set in the initialise state, rather than the input state. In case the DisplayState hasn't been set and there is no vfb for this domain, then set the XenInput DisplayState to the default one. Changed in v2: - use qemu_free instead of free; Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen_console: fix memory leakStefano Stabellini1-2/+6
con_init leaks the string "type", fix it. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: enable console and disk backend in HVM modeStefano Stabellini1-0/+8
Initialize the Xen console backend and the Xen disk backend even when running in HVM mode so that PV on HVM drivers can connect to them. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XENJan Kiszka4-58/+9
Xen won't be enabled if there is no backend support available for the host. And that also means the map cache will work. So drop the separate config switch and move the required stubs over to xen-stub.c. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: Clean up map cache API namingJan Kiszka6-44/+50
The map cache is a Xen thing, so its API should make this clear. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-17xen: Clean up build systemJan Kiszka3-13/+6
Introduce CONFIG_XEN_BACKEND so that this new config solely controls the target-independent backend build and CONFIG_XEN can focus on per-target building. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-07-16Fix signal handling of SIG_IPI when io-thread is enabledAlexandre Raymond1-1/+9
Both the signal thread (via sigwait()) and the cpu thread (via a normal signal handler) were attempting to catch SIG_IPI. This resulted in random freezes under Darwin. This patch separates SIG_IPI from the rest of the signals handled by the signal thread, because it is independently caught by the cpu thread. Signed-off-by: Alexandre Raymond <cerbere@gmail.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-16Fix signal handling when io-thread is disabledAlexandre Raymond1-1/+1
Changes since v1: - take pthread_sigmask() out of the ifdef as it is now common to both parts. This fix effectively blocks, in the main thread, the signals handled by signalfd or the compatibility signal thread. This way, such signals are received synchronously in the main thread through sigfd_handler() instead of triggering the signal handler directly, asynchronously. Signed-off-by: Alexandre Raymond <cerbere@gmail.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-16tcg/README: Expand advice on number of TCG ops per target insnPeter Maydell1-1/+9
Expand the note on the number of TCG ops generated per target insn, to be clearer about the range of applicability of the 20 op rule of thumb. Also add a note about the hard MAX_OP_PER_INSTR limit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14set ELF_HWCAP for SPARC and SPARC64Artyom Tarasenko1-2/+4
setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64 This patch allows loading busybox from Debian 6 initrd Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14Sparc: fix FPU and AM enable checks for translationBlue Swirl2-23/+35
Translation used incorrectly CPUState fields directly to check for FPU enable state and 32 bit address masking on Sparc64. Fix by using TB flags instead. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: C99 comment fix for block-transfer ASIsTsuneo Saito1-14/+14
Fixed C99 comments on block-tranfer ASIs. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: Add JPS1 ASI_BLK_AIU[PS]L ASIs for ldfa and stfaTsuneo Saito1-0/+4
Support JPS1 little endian block transfer ASIs. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfaTsuneo Saito1-1/+5
Support UA2007 block store ASIs for stfa instructions. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfaTsuneo Saito1-1/+5
Support UA2007 block load ASIs for ldfa instructions. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: fp_disabled checks on stfa/stdfa/stqfaTsuneo Saito1-0/+9
stfa/stdfa/stqfa instructions should raise fp_disabled exceptions if %pstate.PEF==0 or %fprs.FEF==0. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: Implement stfa/stdfa/stqfa instrcutions properlyTsuneo Saito2-6/+11
This patch implements sparcv9 stfa/stdfa/stqfa instructions with non block-store ASIs. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-14SPARC64: fp_disabled checks on ldfa/lddfa/ldqfaTsuneo Saito1-0/+9
ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptions if %pstate.PEF==0 or %fprs.FEF==0. Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>