From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/6] Unify memory allocation failure handling
Date: Thu, 5 Feb 2009 13:08:40 +0200 [thread overview]
Message-ID: <1233832126-9046-1-git-send-email-avi@redhat.com> (raw)
Memory allocation failures are a very rare condition on virtual-memory
hosts. They are also very difficult to handle correctly (especially in a
hardware emulation context). Because of this, it is better to gracefully
terminate emulation rather than executing untested or even unwritten recovery
code paths.
This patchset modifies qemu_malloc() and related functions to terminate
on error, and updates callers not to perform their own error handling. In
many cases error handling was already missing or incorrect.
Avi Kivity (6):
Terminate emulation on memory allocation failure
block: remove error handling from qemu_malloc() callers
audio: remove error handling from qemu_malloc() callers
hw: remove error handling from qemu_malloc() callers
targets: remove error handling from qemu_malloc() callers
toplevel: remove error handling from qemu_malloc() callers
aio.c | 2 -
audio/audio.c | 23 +--
audio/wavcapture.c | 5 -
block-bochs.c | 2 -
block-cloop.c | 9 +-
block-dmg.c | 6 +-
block-parallels.c | 2 -
block-qcow2.c | 58 +------
block-raw-posix.c | 2 -
block-vmdk.c | 10 -
block-vpc.c | 4 -
block-vvfat.c | 18 +-
block.c | 6 -
buffered_file.c | 2 -
console.c | 23 ---
cris-dis.c | 26 +--
curses.c | 2 -
device_tree.c | 4 -
exec.c | 25 +--
gdbstub.c | 8 -
hw/adlib.c | 7 -
hw/apic.c | 4 -
hw/arm_gic.c | 2 -
hw/arm_sysctl.c | 2 -
hw/baum.c | 10 -
hw/cs4231.c | 2 -
hw/cs4231a.c | 5 -
hw/ds1225y.c | 5 -
hw/eccmemctl.c | 2 -
hw/escc.c | 4 -
hw/esp.c | 2 -
hw/etraxfs_dma.c | 8 -
hw/etraxfs_eth.c | 8 -
hw/etraxfs_pic.c | 6 -
hw/etraxfs_ser.c | 2 -
hw/etraxfs_timer.c | 2 -
hw/fdc.c | 6 -
hw/fmopl.c | 27 +---
hw/fw_cfg.c | 8 -
hw/g364fb.c | 2 -
hw/gus.c | 11 -
hw/i8259.c | 2 -
hw/ide.c | 2 -
hw/integratorcp.c | 2 -
hw/iommu.c | 2 -
hw/jazz_led.c | 2 -
hw/m48t59.c | 6 -
hw/mac_dbdma.c | 2 -
hw/mac_nvram.c | 6 -
hw/mc146818rtc.c | 4 -
hw/mipsnet.c | 2 -
hw/mpcore.c | 2 -
hw/mst_fpga.c | 2 -
hw/musicpal.c | 14 --
hw/ne2000.c | 2 -
hw/parallel.c | 4 -
hw/pci.c | 2 -
hw/pcnet.c | 2 -
hw/pflash_cfi01.c | 2 -
hw/pflash_cfi02.c | 2 -
hw/pl031.c | 2 -
hw/ppc.c | 7 -
hw/ppc405_boards.c | 24 +--
hw/ppc405_uc.c | 422 ++++++++++++++++++++-----------------------
hw/ppc440_bamboo.c | 2 -
hw/ppc4xx_devs.c | 72 ++++----
hw/ppc4xx_pci.c | 2 -
hw/ppc_prep.c | 2 -
hw/r2d.c | 2 -
hw/rc4030.c | 2 -
hw/sb16.c | 5 -
hw/sbi.c | 2 -
hw/serial.c | 4 -
hw/sh_intc.c | 4 +-
hw/sh_serial.c | 2 -
hw/slavio_intctl.c | 4 -
hw/slavio_misc.c | 2 -
hw/slavio_timer.c | 2 -
hw/sparc32_dma.c | 2 -
hw/sun4c_intctl.c | 2 -
hw/tcx.c | 2 -
hw/usb-bt.c | 2 -
hw/usb-hid.c | 6 -
hw/usb-hub.c | 2 -
hw/usb-msd.c | 2 -
hw/usb-net.c | 2 -
hw/usb-serial.c | 2 -
hw/usb-uhci.c | 15 +-
hw/usb-wacom.c | 2 -
hw/versatilepb.c | 2 -
hw/vga.c | 4 -
hw/virtio-blk.c | 3 +-
hw/virtio.c | 3 +-
hw/vmmouse.c | 2 -
keymaps.c | 10 +-
kvm-all.c | 7 -
loader.c | 4 -
migration-exec.c | 5 -
migration-tcp.c | 2 -
monitor.c | 4 -
net.c | 14 --
qemu-char.c | 59 ------
qemu-malloc.c | 16 +-
qemu-nbd.c | 2 -
qemu-tool.c | 6 +-
readline.c | 2 -
savevm.c | 19 --
sdl.c | 2 -
target-alpha/translate.c | 2 -
target-arm/helper.c | 4 -
target-cris/translate.c | 2 -
target-i386/helper.c | 2 -
target-i386/kvm.c | 2 -
target-m68k/helper.c | 2 -
target-mips/translate.c | 2 -
target-ppc/helper.c | 2 -
target-ppc/kvm_ppc.c | 4 -
target-ppc/translate_init.c | 2 -
target-sh4/translate.c | 2 -
target-sparc/helper.c | 2 -
usb-bsd.c | 2 -
usb-linux.c | 24 +---
vl.c | 16 --
vnc.c | 9 +-
124 files changed, 314 insertions(+), 956 deletions(-)
next reply other threads:[~2009-02-05 11:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 11:08 Avi Kivity [this message]
2009-02-05 11:08 ` [Qemu-devel] [PATCH 1/6] Terminate emulation on memory allocation failure Avi Kivity
2009-02-05 12:01 ` Daniel P. Berrange
2009-02-05 12:22 ` Avi Kivity
2009-02-05 17:43 ` Ian Jackson
2009-02-05 11:08 ` [Qemu-devel] [PATCH 2/6] block: remove error handling from qemu_malloc() callers Avi Kivity
2009-02-05 11:08 ` [Qemu-devel] [PATCH 3/6] audio: " Avi Kivity
2009-02-05 11:08 ` [Qemu-devel] [PATCH 4/6] hw: " Avi Kivity
2009-02-05 11:08 ` [Qemu-devel] [PATCH 5/6] targets: " Avi Kivity
2009-02-05 11:08 ` [Qemu-devel] [PATCH 6/6] toplevel: " Avi Kivity
2009-02-05 17:43 ` [Qemu-devel] [PATCH 0/6] Unify memory allocation failure handling Ian Jackson
2009-02-05 22:07 ` [Qemu-devel] " Anthony Liguori
2009-02-06 8:47 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233832126-9046-1-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).