No description
Find a file
Max Reitz 9e51c5306c qcow2: Limit total allocation range to INT_MAX
When the COW areas are included, the size of an allocation can exceed
INT_MAX.  This is kind of limited by handle_alloc() in that it already
caps avail_bytes at INT_MAX, but the number of clusters still reflects
the original length.

This can have all sorts of effects, ranging from the storage layer write
call failing to image corruption.  (If there were no image corruption,
then I suppose there would be data loss because the .cow_end area is
forced to be empty, even though there might be something we need to
COW.)

Fix all of it by limiting nb_clusters so the equivalent number of bytes
will not exceed INT_MAX.

Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit d1b9d19f99)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-11-04 08:15:25 -06:00
accel hmp: Print if memory section is registered with an accelerator 2019-07-19 19:04:49 +02:00
audio
authz
backends
block qcow2: Limit total allocation range to INT_MAX 2019-11-04 08:15:25 -06:00
bsd-user
capstone@22ead3e0bf
chardev
contrib libvhost-user: fix SLAVE_SEND_FD handling 2019-10-27 23:59:27 -05:00
crypto
default-configs
disas
docs virtio, pc: fixes, cleanups 2019-07-25 16:38:24 +01:00
dtc@88f18909db
dump
fpu
fsdev
gdb-xml
hw hw/core/loader: Fix possible crash in rom_copy() 2019-11-04 08:10:48 -06:00
include coroutine: Add qemu_co_mutex_assert_locked() 2019-10-30 11:34:26 -05:00
io
libdecnumber
linux-headers
linux-user linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
migration migration: fix migrate_cancel multifd migration leads destination hung forever 2019-07-24 14:47:21 +02:00
monitor
nbd
net vhost-user: save features if the char dev is closed 2019-11-04 08:09:49 -06:00
pc-bios
po
python/qemu
qapi
qga
qobject
qom Revert "Revert "globals: Allow global properties to be optional"" 2019-07-29 16:57:27 -04:00
replay
roms roms/Makefile.edk2: don't pull in submodules when building from tarball 2019-10-30 11:39:09 -05:00
scripts make-release: pull in edk2 submodules so we can build it from tarballs 2019-10-30 11:38:57 -05:00
scsi pr-manager: Fix invalid g_free() crash bug 2019-10-27 23:47:31 -05:00
slirp@126c04acba slirp: update with CVE-2019-14378 fix 2019-08-02 15:14:56 +04:00
stubs
target target/arm: Don't abort on M-profile exception return in linux-user mode 2019-10-27 23:58:01 -05:00
tcg
tests iotests: Test internal snapshots with -blockdev 2019-11-04 08:07:08 -06:00
trace
ui
util util/hbitmap: update orig_size on truncate 2019-08-06 13:17:20 +02:00
.cirrus.yml
.dir-locals.el
.editorconfig
.exrc
.gdbinit
.gitignore
.gitlab-ci.yml
.gitmodules
.gitpublish
.mailmap
.patchew.yml
.shippable.yml shippable: re-enable the windows cross builds 2019-07-23 15:53:25 +01:00
.travis.yml travis: enable travis_retry for check phase 2019-07-23 15:53:25 +01:00
arch_init.c
balloon.c
block.c block: Only the main loop can change AioContexts 2019-07-22 18:41:43 +02:00
blockdev-nbd.c
blockdev.c
blockjob.c blockjob: update nodes head while removing all bdrv 2019-10-30 11:34:26 -05:00
bootdevice.c
bt-host.c
bt-vhci.c
Changelog
CODING_STYLE
configure target-arm queue: 2019-07-22 15:16:48 +01:00
COPYING
COPYING.LIB
cpus-common.c
cpus.c
device-hotplug.c
device_tree.c
disas.c
dma-helpers.c dma-helpers: ensure AIO callback is invoked after cancellation 2019-10-27 23:28:10 -05:00
exec.c
gdbstub.c
gitdm.config
HACKING
hmp-commands-info.hx
hmp-commands.hx
ioport.c
iothread.c
job-qmp.c
job.c
Kconfig.host
LICENSE
MAINTAINERS MAINTAINERS: vfio-ccw: Remove myself as the maintainer 2019-07-25 09:36:14 +02:00
Makefile Makefile: remove DESTDIR from firmware file content 2019-08-03 09:52:32 +02:00
Makefile.objs
Makefile.target
memory.c hmp: Print if memory section is registered with an accelerator 2019-07-19 19:04:49 +02:00
memory_ldst.inc.c
memory_mapping.c
module-common.c
os-posix.c
os-win32.c
qdev-monitor.c
qemu-bridge-helper.c qemu-bridge-helper: move repeating code in parse_acl_file 2019-07-29 16:29:30 +08:00
qemu-deprecated.texi
qemu-doc.texi
qemu-edid.c
qemu-ga.texi
qemu-img-cmds.hx
qemu-img.c
qemu-img.texi
qemu-io-cmds.c
qemu-io.c
qemu-keymap.c
qemu-nbd.c
qemu-nbd.texi
qemu-option-trace.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx
qemu-seccomp.c
qemu-tech.texi
qemu.nsi NSIS: Add missing firmware blobs 2019-07-23 15:53:25 +01:00
qemu.sasl
qtest.c
README
replication.c
replication.h
rules.mak
thunk.c
tpm.c
trace-events
VERSION Update version for v4.1.0 release 2019-08-15 13:03:37 +01:00
version.rc
vl.c Mostly bugfixes, plus a patch to mark accelerator MemoryRegions in "info 2019-07-22 13:20:49 +01:00

         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

Additional information can also be found online via the QEMU website:

  https://qemu.org/Hosts/Linux
  https://qemu.org/Hosts/Mac
  https://qemu.org/Hosts/W32


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

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

   git clone https://git.qemu.org/git/qemu.git

When submitting patches, one common 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

  https://qemu.org/Contribute/SubmitAPatch
  https://qemu.org/Contribute/TrivialPatches

The QEMU website is also maintained under source control.

  git clone https://git.qemu.org/git/qemu-web.git
  https://www.qemu.org/2017/02/04/the-new-qemu-website-is-up/

A 'git-publish' utility was created to make above process less
cumbersome, and is highly recommended for making regular contributions,
or even just for sending consecutive patch series revisions. It also
requires a working 'git send-email' setup, and by default doesn't
automate everything, so you may want to go through the above steps
manually for once.

For installation instructions, please go to

  https://github.com/stefanha/git-publish

The workflow with 'git-publish' is:

  $ git checkout master -b my-feature
  $ # work on new commits, add your 'Signed-off-by' lines to each
  $ git publish

Your patch series will be sent and tagged as my-feature-v1 if you need to refer
back to it in the future.

Sending v2:

  $ git checkout my-feature # same topic branch
  $ # making changes to the commits (using 'git rebase', for example)
  $ git publish

Your patch series will be sent with 'v2' tag in the subject and the git tip
will be tagged as my-feature-v2.

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:

  https://qemu.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
   https://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:

  https://qemu.org/Contribute/StartHere

-- End