1. 07 10月, 2009 1 次提交
    • M
      New qdev_init_nofail() · e23a1b33
      Markus Armbruster 提交于
      Like qdev_init(), but terminate program via hw_error() instead of
      returning an error value.
      
      Use it instead of qdev_init() where terminating the program on failure
      is okay, either because it's during machine construction, or because
      we know that failure can't happen.
      
      Because relying in the latter is somewhat unclean, and the former is
      not always obvious, it would be nice to go back to qdev_init() in the
      not-so-obvious cases, only with proper error handling.  I'm leaving
      that for another day, because it involves making sure that error
      values are properly checked by all callers.
      
      Patchworks-ID: 35168
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      e23a1b33
  2. 05 10月, 2009 7 次提交
  3. 02 10月, 2009 2 次提交
  4. 28 8月, 2009 1 次提交
    • G
      qdev: add return value to init() callbacks. · 81a322d4
      Gerd Hoffmann 提交于
      Sorry folks, but it has to be.  One more of these invasive qdev patches.
      
      We have a serious design bug in the qdev interface:  device init
      callbacks can't signal failure because the init() callback has no
      return value.  This patch fixes it.
      
      We have already one case in-tree where this is needed:
      Try -device virtio-blk-pci (without drive= specified) and watch qemu
      segfault.  This patch fixes it.
      
      With usb+scsi being converted to qdev we'll get more devices where the
      init callback can fail for various reasons.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      81a322d4
  5. 26 8月, 2009 1 次提交
  6. 23 8月, 2009 3 次提交
  7. 28 7月, 2009 1 次提交
    • G
      kill drives_table · 751c6a17
      Gerd Hoffmann 提交于
      First step cleaning up the drives handling.  This one does nothing but
      removing drives_table[], still it became seriously big.
      
      drive_get_index() is gone and is replaced by drives_get() which hands
      out DriveInfo pointers instead of a table index.  This needs adaption in
      *tons* of places all over.
      
      The drives are now maintained as linked list.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      751c6a17
  8. 17 7月, 2009 1 次提交
    • G
      qdev: rework device properties. · ee6847d1
      Gerd Hoffmann 提交于
      This patch is a major overhaul of the device properties.  The properties
      are saved directly in the device state struct now, the linked list of
      property values is gone.
      
      Advantages:
        * We don't have to maintain the list with the property values.
        * The value in the property list and the value actually used by
          the device can't go out of sync any more (used to happen for
          the pci.devfn == -1 case) because there is only one place where
          the value is stored.
        * A record describing the property is required now, you can't set
          random properties any more.
      
      There are bus-specific and device-specific properties.  The former
      should be used for properties common to all bus drivers.  Typical
      use case is bus addressing, i.e. pci.devfn and i2c.address.
      
      Properties have a PropertyInfo struct attached with name, size and
      function pointers to parse and print properties.  A few common property
      types have PropertyInfos defined in qdev-properties.c.  Drivers are free
      to implement their own very special property parsers if needed.
      
      Properties can have default values.  If unset they are zero-filled.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ee6847d1
  9. 30 6月, 2009 1 次提交
  10. 17 6月, 2009 1 次提交
  11. 09 6月, 2009 4 次提交
  12. 26 5月, 2009 1 次提交
  13. 23 5月, 2009 1 次提交
    • P
      Add common BusState · 02e2da45
      Paul Brook 提交于
      Implement and use a common device bus state.  The main side-effect is
      that creating a bus and attaching it to a parent device are no longer
      separate operations.  For legacy code we allow a NULL parent, but that
      should go away eventually.
      
      Also tweak creation code to veriry theat a device in on the right bus.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      02e2da45
  14. 22 5月, 2009 1 次提交
    • J
      Introduce reset notifier order · 8217606e
      Jan Kiszka 提交于
      Add the parameter 'order' to qemu_register_reset and sort callbacks on
      registration. On system reset, callbacks with lower order will be
      invoked before those with higher order. Update all existing users to the
      standard order 0.
      
      Note: At least for x86, the existing users seem to assume that handlers
      are called in their registration order. Therefore, the patch preserves
      this property. If someone feels bored, (s)he could try to identify this
      dependency and express it properly on callback registration.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8217606e
  15. 21 5月, 2009 1 次提交
  16. 15 5月, 2009 2 次提交
  17. 14 5月, 2009 1 次提交
    • P
      Remove vga_ram_size · fbe1b595
      Paul Brook 提交于
      The vga_ram_size argument to machine init functions always has the same
      value, and is ignored by many machines (including SPARC32 which has an
      obsolete ifdef for VGA_RAM_SIZE).
      
      Remove it and push VGA_RAM_SIZE into vga_int.h.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      fbe1b595
  18. 12 5月, 2009 2 次提交
    • P
      Push AUD_init down to devices · 22d83b14
      Paul Brook 提交于
      Now we can safely call AUD_init multiple times we can push it down to
      individual audio devices, rather than having to pass it from the board
      init.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      22d83b14
    • P
      Make AUD_init failure fatal · 0d9acba8
      Paul Brook 提交于
      Failure to initialize the audio subsystem is not handled consistently.
      Where it is handled it has guest visible effects, which is wrong.
      We already have a "nosound" audio driver as a last resort, so trying to
      proceed without an audio backend seems pointless.
      
      Also protect against multiple calls to AUD_init so that this can be
      pushed down into individual devices.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      0d9acba8
  19. 08 5月, 2009 1 次提交
  20. 18 4月, 2009 1 次提交
  21. 12 4月, 2009 1 次提交
  22. 10 4月, 2009 1 次提交
  23. 29 3月, 2009 1 次提交
  24. 13 3月, 2009 1 次提交
    • A
      DisplayAllocator interface (Stefano Stabellini) · 7b5d76da
      aliguori 提交于
      Hi all,
      this patch adds a DisplayAllocator interface that allows display
      frontends (sdl in particular) to provide a preallocated display buffer
      for the graphical backend to use.
      
      Whenever a graphical backend cannot use
      qemu_create_displaysurface_from because its own internal pixel format
      cannot be exported directly (text mode or graphical mode with color
      depth 8 or 24), it creates another display buffer in memory using
      qemu_create_displaysurface and does the conversion.
      This new buffer needs to be blitted into the sdl surface buffer every time
      we need to update portions of the screen.
      We can avoid this using the DisplayAllocator interace: sdl provides its
      own implementation of qemu_create_displaysurface, giving back the sdl
      surface buffer directly (as we used to do before the DisplayState
      changes).
      Since the buffer returned by sdl could be in bgr format we need to put
      back in the handlers of that case.
      
      This approach is good if the two following conditions are true:
      
      1) the sdl surface is a software surface that resides in main memory;
      
      2) the host display color depth is either 16 or 32 bpp.
      
      If first condition is false we can have bad performances using sdl
      and vnc together.
      If the second condition is false performances are certainly not going to
      improve but they shouldn't get worse either.
      
      The first condition is always true, at least on linux/X11 systems; but I
      believe is true also on other platforms.
      The second condition is true in the vast majority of the cases.
      
      This patch should also have the good side effect of solving the sdl
      2D slowness malc was reporting on MacOS, because SDL_BlitSurface is not
      going to be called anymore when the guest is in text mode or 24bpp.
      However the root problem is still present so I suspect we may
      still see some slowness on MacOS when the guest is in 32 or 16 bpp.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
      7b5d76da
  25. 11 3月, 2009 1 次提交
  26. 06 2月, 2009 1 次提交