All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 00/12] Overhaul of error handling and module init/uninit
@ 2011-12-19 13:58 Sasha Levin
  2011-12-19 13:58 ` [RFC 01/12] kvm tools: Split kvm_cmd_run into init, work and uninit Sasha Levin
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Sasha Levin @ 2011-12-19 13:58 UTC (permalink / raw)
  To: penberg; +Cc: mingo, gorcunov, asias.hejun, kvm, Sasha Levin

This patch series is really a work in progress, but is mature enough to
cover most of the different modules we have in the tool, and receive
comments regarding the work done so far and any future work.

There were three main goals while doing this work:
1. Less die(), more clean exits. We are not interested in hitting a die()
during regular program flow. die() should be reserved to extreme cases where
we are not able to report the error back.

2. Adding actual error handling where it was missing. Starting from simple
things like checking malloc()s, through making functions report their failures
(this meant switching lots of functions from 'void' to 'int' since they can
actually fail), and all the way to being able to handle errors by
uninitializing and exiting gracefully.

3. Getting initialization and uninitialization of modules somewhat
standard. The main purpose here is to be able to either add __init functions
or to be able to call all initialization functions from a single place without
code duplication.

Sasha Levin (12):
  kvm tools: Split kvm_cmd_run into init, work and uninit
  kvm tools: Fixes for symbol resolving module
  kvm tools: Fixes for IRQ module
  kvm tools: Fixes for UI modules
  kvm tools: Fixes for ioport module
  kvm tools: Fixes for ioeventfd module
  kvm tools: Fixes for serial module
  kvm tools: Fixes for mptable module
  kvm tools: Fixes for ioeventfd module
  kvm tools: Fixes for disk image module
  kvm tools: Fixes for rtc module
  kvm tools: Fixes for ioeventfd module

 tools/kvm/builtin-run.c                 |  197 +++++++++++++++++++++++++------
 tools/kvm/disk/blk.c                    |   13 ++-
 tools/kvm/disk/core.c                   |   76 ++++++++-----
 tools/kvm/disk/qcow.c                   |    2 +-
 tools/kvm/disk/raw.c                    |    9 +-
 tools/kvm/framebuffer.c                 |    9 ++-
 tools/kvm/hw/pci-shmem.c                |    7 +-
 tools/kvm/hw/rtc.c                      |   27 ++++-
 tools/kvm/hw/serial.c                   |   43 ++++++-
 tools/kvm/hw/vesa.c                     |   17 ++-
 tools/kvm/include/kvm/8250-serial.h     |    3 +-
 tools/kvm/include/kvm/disk-image.h      |    2 +-
 tools/kvm/include/kvm/framebuffer.h     |    1 +
 tools/kvm/include/kvm/ioeventfd.h       |    8 +-
 tools/kvm/include/kvm/ioport.h          |    5 +-
 tools/kvm/include/kvm/irq.h             |    3 +-
 tools/kvm/include/kvm/kvm.h             |    9 +-
 tools/kvm/include/kvm/pci.h             |    5 +-
 tools/kvm/include/kvm/rbtree-interval.h |    1 +
 tools/kvm/include/kvm/rtc.h             |    5 +-
 tools/kvm/include/kvm/sdl.h             |    7 +-
 tools/kvm/include/kvm/symbol.h          |    7 +-
 tools/kvm/include/kvm/virtio-blk.h      |    5 +-
 tools/kvm/include/kvm/virtio-pci.h      |    1 +
 tools/kvm/include/kvm/virtio-rng.h      |    4 +-
 tools/kvm/include/kvm/virtio-trans.h    |    1 +
 tools/kvm/include/kvm/vnc.h             |   10 ++-
 tools/kvm/ioeventfd.c                   |  158 +++++++++++++++++--------
 tools/kvm/ioport.c                      |   69 ++++++++++-
 tools/kvm/kvm.c                         |  101 +++++++++++-----
 tools/kvm/mmio.c                        |    8 +-
 tools/kvm/pci.c                         |   58 +++++++---
 tools/kvm/powerpc/kvm.c                 |    9 ++-
 tools/kvm/symbol.c                      |   59 +++++++--
 tools/kvm/ui/sdl.c                      |   31 ++++-
 tools/kvm/ui/vnc.c                      |   22 +++-
 tools/kvm/util/rbtree-interval.c        |   11 +-
 tools/kvm/virtio/blk.c                  |   37 ++++--
 tools/kvm/virtio/pci.c                  |   46 ++++++-
 tools/kvm/virtio/rng.c                  |   27 ++++-
 tools/kvm/virtio/trans.c                |    4 +-
 tools/kvm/x86/include/kvm/mptable.h     |    3 +-
 tools/kvm/x86/irq.c                     |   52 ++++++--
 tools/kvm/x86/kvm-cpu.c                 |   10 +-
 tools/kvm/x86/kvm.c                     |   18 +++-
 tools/kvm/x86/mptable.c                 |   20 +++-
 46 files changed, 926 insertions(+), 294 deletions(-)

-- 
1.7.8


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-12-20  8:57 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19 13:58 [RFC 00/12] Overhaul of error handling and module init/uninit Sasha Levin
2011-12-19 13:58 ` [RFC 01/12] kvm tools: Split kvm_cmd_run into init, work and uninit Sasha Levin
2011-12-19 21:26   ` Pekka Enberg
2011-12-20 10:09     ` Sasha Levin
2011-12-20  8:55       ` Asias He
2011-12-19 13:58 ` [RFC 02/12] kvm tools: Fixes for symbol resolving module Sasha Levin
2011-12-19 13:58 ` [RFC 03/12] kvm tools: Fixes for IRQ module Sasha Levin
2011-12-19 13:58 ` [RFC 04/12] kvm tools: Fixes for UI modules Sasha Levin
2011-12-19 13:58 ` [RFC 05/12] kvm tools: Fixes for ioport module Sasha Levin
2011-12-19 13:58 ` [RFC 06/12] kvm tools: Fixes for ioeventfd module Sasha Levin
2011-12-19 13:58 ` [RFC 07/12] kvm tools: Fixes for serial module Sasha Levin
2011-12-19 13:58 ` [RFC 08/12] kvm tools: Fixes for mptable module Sasha Levin
2011-12-19 13:58 ` [RFC 09/12] kvm tools: Fixes for ioeventfd module Sasha Levin
2011-12-19 13:58 ` [RFC 10/12] kvm tools: Fixes for disk image module Sasha Levin
2011-12-19 13:58 ` [RFC 11/12] kvm tools: Fixes for rtc module Sasha Levin
2011-12-19 13:58 ` [RFC 12/12] kvm tools: Fixes for ioeventfd module Sasha Levin
2011-12-19 21:29 ` [RFC 00/12] Overhaul of error handling and module init/uninit Pekka Enberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.