adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
Peter Maydell d17008bc29 hw/timer/hpet.c: Avoid signed integer overflow which results in bugs on OSX
Signed integer overflow in C is undefined behaviour, and the compiler
is at liberty to assume it can never happen and optimize accordingly.
In particular, the subtractions in hpet_time_after() and hpet_time_after64()
were causing OSX clang to optimize the code such that it was prone to
hangs and complaints about the main loop stalling (presumably because
we were spending all our time trying to service very high frequency
HPET timer callbacks). The clang sanitizer confirms the UB:

hw/timer/hpet.c:119:26: runtime error: signed integer overflow: -2146967296 - 2147003978 cannot be represented in type 'int'

Fix this by doing the subtraction as an unsigned operation and then
converting to signed for the comparison.

Reported-by: Aaron Elkins <threcius@yahoo.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1447080991-24995-1-git-send-email-peter.maydell@linaro.org
2015-11-09 15:48:21 +00:00
audio
backends
block * Guest ABI fixes for PC machines (hw_version) 2015-11-05 14:31:24 +00:00
bsd-user
contrib ivshmem-server: fix possible OVERRUN 2015-11-06 15:42:38 +03:00
crypto
default-configs
disas
docs replay: global variables and function stubs 2015-11-05 12:19:08 +01:00
dtc@65cc4d2748
fpu
fsdev
gdb-xml
hw hw/timer/hpet.c: Avoid signed integer overflow which results in bugs on OSX 2015-11-09 15:48:21 +00:00
include aio: Introduce aio-epoll.c 2015-11-09 09:59:47 +00:00
libdecnumber
linux-headers
linux-user linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup 2015-11-06 15:42:38 +03:00
migration migration: code clean up 2015-11-04 13:40:13 +01:00
net tap-bsd: use user-specified tap device if it already exists 2015-11-06 15:42:38 +03:00
pc-bios
pixman@87eea99e44
po
qapi qstring: Make conversion from QObject * accept null 2015-10-29 14:34:45 +01:00
qga qga: set file descriptor in qmp_guest_file_open non-blocking on Win32 2015-11-04 07:37:56 -06:00
qobject qstring: Make conversion from QObject * accept null 2015-10-29 14:34:45 +01:00
qom qom/object: fix 2 comment typos 2015-11-06 15:42:38 +03:00
replay replay: recording of the user input 2015-11-06 10:16:03 +01:00
roms
scripts * Guest ABI fixes for PC machines (hw_version) 2015-11-05 14:31:24 +00:00
slirp
stubs replay: initialization and deinitialization 2015-11-06 10:16:03 +01:00
target-alpha target-alpha: fix uninitialized variable 2015-11-06 15:42:38 +03:00
target-arm target-arm: Report S/NS status in the CPU debug logs 2015-11-03 13:49:42 +00:00
target-cris target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-i386 target-i386: Add clflushopt/clwb/pcommit to TCG_7_0_EBX_FEATURES 2015-11-06 12:19:33 -02:00
target-lm32 target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-m68k target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-microblaze target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-mips target-mips: fix updating XContext on mmu exception 2015-10-30 14:36:19 +00:00
target-moxie target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-openrisc target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-ppc taget-ppc: Fix read access to IBAT registers higher than IBAT3 2015-11-06 15:42:38 +03:00
target-s390x target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-sh4 target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-sparc target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-tilegx
target-tricore
target-unicore32 target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
target-xtensa target-*: Advance pc after recognizing a breakpoint 2015-10-28 10:57:16 -07:00
tcg
tests tests/i44fx-test: No need for zeroing memory before memset 2015-11-06 15:42:38 +03:00
trace
ui ui: Use g_new() & friends where that makes obvious sense 2015-11-06 15:42:38 +03:00
util qemu-sockets: do not test path with access() before unlinking 2015-11-06 15:42:38 +03:00
.dir-locals.el
.exrc
.gitignore maint: Ignore ivshmem binaries 2015-11-06 15:42:38 +03:00
.gitmodules
.mailmap
.travis.yml
CODING_STYLE
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS MAINTAINERS: Add new qemu-arm mailing list to ARM related entries 2015-11-03 13:49:42 +00:00
Makefile
Makefile.objs replay: global variables and function stubs 2015-11-05 12:19:08 +01:00
Makefile.target
README
VERSION
accel.c
aio-posix.c aio: Introduce aio-epoll.c 2015-11-09 09:59:47 +00:00
aio-win32.c aio: Introduce aio_context_setup 2015-11-09 09:59:32 +00:00
arch_init.c
async.c aio: Introduce aio_context_setup 2015-11-09 09:59:32 +00:00
balloon.c
block.c
blockdev-nbd.c
blockdev.c blockdev: acquire AioContext in hmp_commit() 2015-11-09 10:07:10 +00:00
blockjob.c
bootdevice.c
bt-host.c
bt-vhci.c
configure configure: remove help string for 'vnc-tls' option 2015-11-06 15:42:38 +03:00
cpu-exec-common.c
cpu-exec.c So here it is, let's see what happens. 2015-11-06 11:31:40 +00:00
cpus.c So here it is, let's see what happens. 2015-11-06 11:31:40 +00:00
cputlb.c
device-hotplug.c
device_tree.c
disas.c
dma-helpers.c
dump.c
exec.c exec: avoid unnecessary cacheline bounce on ram_list.mru_block 2015-11-06 15:42:38 +03:00
gdbstub.c gdbstub: Fix buffer overflows in gdb_handle_packet() 2015-11-06 15:42:37 +03:00
hmp-commands-info.hx
hmp-commands.hx
hmp.c tpm: Convert to new qapi union layout 2015-11-02 08:30:28 +01:00
hmp.h
iohandler.c
ioport.c ioport: do not use CPU_LOG_IOPORT 2015-11-04 15:02:30 +01:00
iothread.c
kvm-all.c Revert "Introduce cpu_clean_all_dirty" 2015-11-05 11:28:23 +01:00
kvm-stub.c
main-loop.c icount: improve counting for record/replay 2015-11-06 10:16:02 +01:00
memory.c memory: call begin, log_start and commit when registering a new listener 2015-11-04 15:56:01 +01:00
memory_mapping.c
module-common.c
monitor.c monitor: add missed aio_context_acquire into vm_completion call 2015-11-09 10:07:10 +00:00
nbd.c
numa.c memory: Convert to new qapi union layout 2015-11-02 08:30:28 +01:00
os-posix.c
os-win32.c
page_cache.c
qapi-schema.json replay: global variables and function stubs 2015-11-05 12:19:08 +01:00
qdev-monitor.c
qdict-test-data.txt
qemu-bridge-helper.c
qemu-char.c char: Convert to new qapi union layout 2015-11-02 08:30:27 +01:00
qemu-doc.texi backends/hostmem-file: Allow to specify full pathname for backing file 2015-11-04 15:56:05 +01:00
qemu-ga.texi
qemu-img-cmds.hx
qemu-img.c
qemu-img.texi
qemu-io-cmds.c
qemu-io.c
qemu-log.c qemu-log: remove -d ioport 2015-11-04 15:02:30 +01:00
qemu-nbd.c sockets: Convert to new qapi union layout 2015-11-02 08:30:27 +01:00
qemu-nbd.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx replay: command line options 2015-11-06 10:16:03 +01:00
qemu-seccomp.c
qemu-tech.texi
qemu-timer.c replay: checkpoints 2015-11-06 10:16:03 +01:00
qemu.nsi
qemu.sasl
qjson.c
qmp-commands.hx
qmp.c
qtest.c
rules.mak
softmmu_template.h
spice-qemu-char.c char: Convert to new qapi union layout 2015-11-02 08:30:27 +01:00
tcg-runtime.c
tci.c
thread-pool.c
thunk.c
tpm.c tpm: Convert to new qapi union layout 2015-11-02 08:30:28 +01:00
trace-events * Guest ABI fixes for PC machines (hw_version) 2015-11-05 14:31:24 +00:00
translate-all.c cpu-exec: allow temporary disabling icount 2015-11-05 12:19:09 +01:00
translate-all.h
translate-common.c
user-exec.c
version.rc
vl.c So here it is, let's see what happens. 2015-11-06 11:31:40 +00:00
xen-common-stub.c
xen-common.c
xen-hvm-stub.c
xen-hvm.c
xen-mapcache.c

README

         QEMU README
         ===========

QEMU is a generic and open source machine & userspace emulator and
virtualizer.

QEMU is capable of emulating a complete machine in software without any
need for hardware virtualization support. By using dynamic translation,
it achieves very good performance. QEMU can also integrate with the Xen
and KVM hypervisors to provide emulated hardware while allowing the
hypervisor to manage the CPU. With hypervisor support, QEMU can achieve
near native performance for CPUs. When QEMU emulates CPUs directly it is
capable of running operating systems made for one machine (e.g. an ARMv7
board) on a different machine (e.g. an x86_64 PC board).

QEMU is also capable of providing userspace API virtualization for Linux
and BSD kernel interfaces. This allows binaries compiled against one
architecture ABI (e.g. the Linux PPC64 ABI) to be run on a host using a
different architecture ABI (e.g. the Linux x86_64 ABI). This does not
involve any hardware emulation, simply CPU and syscall emulation.

QEMU aims to fit into a variety of use cases. It can be invoked directly
by users wishing to have full control over its behaviour and settings.
It also aims to facilitate integration into higher level management
layers, by providing a stable command line interface and monitor API.
It is commonly invoked indirectly via the libvirt library when using
open source applications such as oVirt, OpenStack and virt-manager.

QEMU as a whole is released under the GNU General Public License,
version 2. For full licensing details, consult the LICENSE file.


Building
========

QEMU is multi-platform software intended to be buildable on all modern
Linux platforms, OS-X, Win32 (via the Mingw64 toolchain) and a variety
of other UNIX targets. The simple steps to build QEMU are:

  mkdir build
  cd build
  ../configure
  make

Complete details of the process for building and configuring QEMU for
all supported host platforms can be found in the qemu-tech.html file.
Additional information can also be found online via the QEMU website:

  http://qemu-project.org/Hosts/Linux
  http://qemu-project.org/Hosts/W32


Submitting patches
==================

The QEMU source code is maintained under the GIT version control system.

   git clone git://git.qemu-project.org/qemu.git

When submitting patches, the preferred approach is to use 'git
format-patch' and/or 'git send-email' to format & send the mail to the
qemu-devel@nongnu.org mailing list. All patches submitted must contain
a 'Signed-off-by' line from the author. Patches should follow the
guidelines set out in the HACKING and CODING_STYLE files.

Additional information on submitting patches can be found online via
the QEMU website

  http://qemu-project.org/Contribute/SubmitAPatch
  http://qemu-project.org/Contribute/TrivialPatches


Bug reporting
=============

The QEMU project uses Launchpad as its primary upstream bug tracker. Bugs
found when running code built from QEMU git or upstream released sources
should be reported via:

  https://bugs.launchpad.net/qemu/

If using QEMU via an operating system vendor pre-built binary package, it
is preferable to report bugs to the vendor's own bug tracker first. If
the bug is also known to affect latest upstream code, it can also be
reported via launchpad.

For additional information on bug reporting consult:

  http://qemu-project.org/Contribute/ReportABug


Contact
=======

The QEMU community can be contacted in a number of ways, with the two
main methods being email and IRC

 - qemu-devel@nongnu.org
   http://lists.nongnu.org/mailman/listinfo/qemu-devel
 - #qemu on irc.oftc.net

Information on additional methods of contacting the community can be
found online via the QEMU website:

  http://qemu-project.org/Contribute/StartHere

-- End