1. 26 1月, 2015 1 次提交
  2. 16 6月, 2014 1 次提交
  3. 06 5月, 2014 1 次提交
    • K
      PortioList: Store PortioList in device state · 848696bf
      Kirill Batuzov 提交于
      PortioList is an abstraction used for construction of MemoryRegionPortioList
      from MemoryRegionPortio. It can be used later to unmap created memory regions.
      It also requires proper cleanup because some of the memory inside is allocated
      dynamically.
      
      By moving PortioList ot device state we make it possible to cleanup later and
      avoid leaking memory.
      
      This change spans several target platforms.  The following testcases cover all
      changed lines:
        qemu-system-ppc -M prep
        qemu-system-i386 -vga qxl
        qemu-system-i386 -M isapc -soundhw adlib -device ib700,id=watchdog0,bus=isa.0
      Signed-off-by: NKirill Batuzov <batuzovk@ispras.ru>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      848696bf
  4. 23 8月, 2013 1 次提交
  5. 29 7月, 2013 1 次提交
  6. 04 7月, 2013 2 次提交
  7. 07 6月, 2013 1 次提交
  8. 29 4月, 2013 1 次提交
  9. 09 4月, 2013 2 次提交
  10. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  11. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  12. 19 12月, 2012 1 次提交
  13. 15 2月, 2012 1 次提交
  14. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  15. 28 1月, 2012 1 次提交
  16. 06 12月, 2011 1 次提交
  17. 21 3月, 2011 1 次提交
    • P
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      74475455
  18. 21 12月, 2010 1 次提交
  19. 12 12月, 2010 1 次提交
    • R
      Watchdog: disable watchdog timer when hard-rebooting a guest. · 36888c63
      Richard W.M. Jones 提交于
      This commit causes the watchdog timer to be reset when a guest is
      hard-rebooted.
      
      The failure case previously was as follows:
      
        (a) guest boots, watchdog is enabled
      
        (b) guest does a reset eg:
              echo 'b' > /proc/sysrq-trigger
          (note that an ordinary /sbin/reboot wouldn't hit this case
          since as the watchdog daemon is shut down, the daemon would
          properly disable the watchdog device)
      
        (c) the reboot takes longer than the remaining time on the
          watchdog
      
        (d) the watchdog therefore fires during the reboot
      
        (e) probably the VM would just reboot again at this point which
          is pretty benign, but it could depend on the action that the
          user had selected for the watchdog
      
      Now we use the qdev reset function to register a reset handler
      which disables the timer.  Note the handler is called _either_
      just after init _or_ when the guest reboots.
      
      In the i6300esb case there is a small refactoring of the code so
      that the device's internal state is now fully restored to defaults
      on a reboot.
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      36888c63
  20. 04 12月, 2009 1 次提交
  21. 28 10月, 2009 3 次提交
  22. 11 9月, 2009 1 次提交
  23. 28 8月, 2009 2 次提交
    • 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
    • M
      qdev: convert watchdogs · 09aaa160
      Markus Armbruster 提交于
      -watchdog NAME is now equivalent to -device NAME, except it treats
      option argument '?' specially, and supports only one watchdog.
      
      A side effect is that a device created with -watchdog may now receive
      a different PCI address.
      
      i6300esb is now available on any machine with a PCI bus, not just PCs.
      ib700 is still PC only, but that could be changed easily.
      
      The only remaining use of struct WatchdogTimerModel and
      watchdog_add_model() is supporting '-watchdog ?'.  Should be replaced
      by searching device_info_list for watchdog devices when we can
      identify them there.
      
      Also fixes ib700 not to use vm_clock before it is initialized: in
      wdt_ib700_init(), called from register_watchdogs(), which runs before
      init_timers().  The bug made ib700_write_enable_reg() crash in
      qemu_del_timer().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      09aaa160
  24. 17 7月, 2009 1 次提交
  25. 01 5月, 2009 1 次提交