[RFC 00/12] Overhaul of error handling and module init/uninit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux