QEMU With E2K User Support
Go to file
Max Reitz 5e003f17ec block: Make bdrv_next() keep strong references
On one hand, it is a good idea for bdrv_next() to return a strong
reference because ideally nearly every pointer should be refcounted.
This fixes intermittent failure of iotest 194.

On the other, it is absolutely necessary for bdrv_next() itself to keep
a strong reference to both the BB (in its first phase) and the BDS (at
least in the second phase) because when called the next time, it will
dereference those objects to get a link to the next one.  Therefore, it
needs these objects to stay around until then.  Just storing the pointer
to the next in the iterator is not really viable because that pointer
might become invalid as well.

Both arguments taken together means we should probably just invoke
bdrv_ref() and blk_ref() in bdrv_next().  This means we have to assert
that bdrv_next() is always called from the main loop, but that was
probably necessary already before this patch and judging from the
callers, it also looks to actually be the case.

Keeping these strong references means however that callers need to give
them up if they decide to abort the iteration early.  They can do so
through the new bdrv_next_cleanup() function.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20171110172545.32609-1-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-11-17 18:21:31 +01:00
accel Miscellaneous bugfixes 2017-11-16 14:42:54 +00:00
audio buildsys: Move audio libs to per object 2017-09-22 10:20:34 +08:00
backends tpm: move recv_data_callback to TPM interface 2017-10-19 11:42:33 -04:00
block block: Make bdrv_next() keep strong references 2017-11-17 18:21:31 +01:00
bsd-user tcg: introduce regions to split code_gen_buffer 2017-10-24 13:53:42 -07:00
capstone@22ead3e0bf disas: Add capstone as submodule 2017-10-26 11:56:20 +02:00
chardev char: don't skip client cleanup if 'connected' flag is unset 2017-10-12 12:10:37 +02:00
contrib libvhost-user: Support VHOST_USER_SET_SLAVE_REQ_FD 2017-10-12 16:57:50 +02:00
crypto crypto: afalg: fix a NULL pointer dereference 2017-11-08 11:05:09 +00:00
default-configs build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets 2017-11-16 17:46:53 +02:00
disas target/arm: Move BE32 disassembler fixup 2017-10-25 11:54:52 +02:00
docs specs: Extend TPM spec with TPM emulator description 2017-11-15 06:47:35 -05:00
dtc@558cd81bdd
fpu
fsdev fsdev: fix memory leak in main() 2017-09-05 14:01:16 +02:00
gdb-xml
hw pc, pci, virtio: fixes for rc1 2017-11-16 19:06:07 +00:00
include block: Make bdrv_next() keep strong references 2017-11-17 18:21:31 +01:00
io trivial patches for 2017-10-16 2017-10-17 13:13:03 +01:00
libdecnumber build: remove CONFIG_LIBDECNUMBER 2017-10-16 18:03:52 +02:00
linux-headers linux-headers: sync against v4.14-rc1 2017-09-29 10:58:31 +02:00
linux-user sh4: simplify superh_cpu_class_by_name() 2017-10-27 16:03:55 +02:00
migration block: Make bdrv_next() keep strong references 2017-11-17 18:21:31 +01:00
nbd nbd/server: Fix structured read of length 0 2017-11-09 10:25:11 -06:00
net net/socket: fix coverity issue 2017-11-13 18:05:12 +08:00
pc-bios seabios: update to 1.11 final 2017-11-14 15:36:08 +01:00
po
qapi qapi/qnull: Add own header 2017-11-17 18:21:30 +01:00
qga qga-win: fix error-handling in getNameByStringSID() 2017-10-26 20:01:32 -05:00
qobject qapi: Add qobject_is_equal() 2017-11-17 18:21:30 +01:00
qom tcg: Add CPUState cflags_next_tb 2017-10-24 13:53:41 -07:00
replay migration: pre_save return int 2017-09-27 11:35:59 +01:00
roms seabios: update to 1.11 final 2017-11-14 15:36:08 +01:00
scripts qapi/qlist: Add qlist_append_null() macro 2017-11-17 18:21:30 +01:00
scsi qemu-pr-helper: use new libmultipath API 2017-10-18 10:15:09 +02:00
slirp slirp: don't zero the whole ti_i when m == NULL 2017-11-09 18:59:22 +01:00
stubs tpm: add stubs 2017-10-25 01:05:04 -04:00
target Miscellaneous bugfixes 2017-11-16 14:42:54 +00:00
tcg tcg/s390x: Use constant pool for prologue 2017-11-03 09:33:45 +01:00
tests qcow2: Refuse to get unaligned offsets from cache 2017-11-17 18:21:31 +01:00
trace Convert single line fprintf(.../n) to warn_report() 2017-09-19 14:09:34 +02:00
ui sdl2: Fix broken display updating after the window is hidden 2017-11-16 09:57:47 +01:00
util Miscellaneous bugfixes 2017-11-16 14:42:54 +00:00
.dir-locals.el
.editorconfig
.exrc
.gdbinit
.gitignore ui: add qemu-keymap and shader to .gitignore 2017-10-23 08:10:18 +02:00
.gitmodules disas: Add capstone as submodule 2017-10-26 11:56:20 +02:00
.mailmap MAINTAINERS: Update Paul Burton's email address 2017-11-06 07:36:43 -08:00
.shippable.yml
.travis.yml
arch_init.c
balloon.c
block.c block: Make bdrv_next() keep strong references 2017-11-17 18:21:31 +01:00
blockdev-nbd.c
blockdev.c block: move ThrottleGroup membership to ThrottleGroupMember 2017-09-05 16:47:51 +02:00
blockjob.c qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
bootdevice.c
bt-host.c
bt-vhci.c
Changelog
CODING_STYLE coding_style: add point about 0x in trace-events 2017-08-01 12:13:07 +01:00
configure Makefile: Capstone: Add support for cross compile ranlib 2017-11-09 08:47:14 +01:00
COPYING
COPYING.LIB
COPYING.PYTHON scripts: add argparse module for Python 2.6 compatibility 2017-08-30 12:02:11 +01:00
cpus-common.c
cpus.c tcg: enable multiple TCG contexts in softmmu 2017-10-24 13:53:42 -07:00
device_tree.c
device-hotplug.c
disas.c disas: Dump insn bytes along with capstone disassembly 2017-11-09 08:46:38 +01:00
dma-helpers.c
dump.c kdump: set vmcoreinfo location 2017-10-15 05:54:40 +03:00
exec.c Miscellaneous bugfixes 2017-11-16 14:42:54 +00:00
gdbstub.c
HACKING
hmp-commands-info.hx hmp-commands-info: Change "@findex FOO" to "@findex info FOO" 2017-10-05 10:08:39 +01:00
hmp-commands.hx migrate: HMP migate_continue 2017-10-23 18:03:31 +02:00
hmp.c hmp: Replace error_report_err 2017-10-30 18:29:45 +00:00
hmp.h migrate: HMP migate_continue 2017-10-23 18:03:31 +02:00
ioport.c
iothread.c iothread: delay the context release to finalize 2017-10-03 14:36:19 -04:00
LICENSE
MAINTAINERS MAINTAINERS: Add entries for Smartfusion2 2017-11-13 13:55:25 +00:00
Makefile Miscellaneous bugfixes 2017-11-16 14:42:54 +00:00
Makefile.objs tpm: add stubs 2017-10-25 01:05:04 -04:00
Makefile.target build: remove CONFIG_LIBDECNUMBER 2017-10-16 18:03:52 +02:00
memory_ldst.inc.c
memory_mapping.c
memory.c memory: reuse section_from_flat_range() 2017-10-18 10:15:00 +02:00
module-common.c
monitor.c monitor: fix dangling CPU pointer 2017-10-30 18:46:32 +00:00
numa.c NUMA: Enable adding NUMA node implicitly 2017-11-16 17:46:53 +02:00
os-posix.c os-posix: Drop misleading comment 2017-10-16 21:01:37 +03:00
os-win32.c
qapi-schema.json target/s390x: change CPU type name to "s390x-cpu" 2017-10-30 08:56:28 +01:00
qdev-monitor.c pci-assign: Remove 2017-11-05 14:52:10 +01:00
qdict-test-data.txt
qemu-bridge-helper.c
qemu-doc.texi xlnx-zcu102: Add an info message deprecating the EP108 2017-11-13 13:55:26 +00:00
qemu-ga.texi
qemu-img-cmds.hx qemu-img: add --shrink flag for resize 2017-09-26 15:00:32 +02:00
qemu-img.c qemu-img: Change img_compare() to be byte-based 2017-10-26 14:45:57 +02:00
qemu-img.texi qemu-img.1: Image invalidation on qemu-img commit 2017-10-26 14:59:18 +02:00
qemu-io-cmds.c qemu-io: Relax 'alloc' now that block-status doesn't assert 2017-10-26 14:45:57 +02:00
qemu-io.c qemu-io: Add -C for opening with copy-on-read 2017-10-06 16:28:58 +02:00
qemu-keymap.c tools: add qemu-keymap 2017-10-16 14:50:54 +02:00
qemu-nbd.c qapi: Change data type of the FOO_lookup generated for enum FOO 2017-09-04 13:09:13 +02:00
qemu-nbd.texi
qemu-option-trace.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx Add new PCI ID for i82559a 2017-11-13 15:48:54 +08:00
qemu-seccomp.c seccomp: add resourcecontrol argument to command line 2017-09-15 10:15:06 +02:00
qemu-tech.texi
qemu.nsi
qemu.sasl
qmp.c qmp: introduce query-memory-size-summary command 2017-09-14 15:52:10 +01:00
qtest.c qtest: Don't perform side effects inside assertion 2017-09-15 09:05:19 +02:00
README
replication.c
replication.h
rules.mak
thunk.c thunk: assert nb_fields is valid 2017-07-31 13:06:39 +03:00
tpm.c tpm: remove unnecessary #ifdef CONFIG_TPM 2017-10-25 01:05:35 -04:00
trace-events memory: trace FlatView creation and destruction 2017-09-22 01:06:51 +02:00
VERSION Update version for v2.11.0-rc1 release 2017-11-14 18:37:49 +00:00
version.rc
vl.c NUMA: Enable adding NUMA node implicitly 2017-11-16 17:46:53 +02: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:

  http://qemu-project.org/Hosts/Linux
  http://qemu-project.org/Hosts/Mac
  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