1. 15 8月, 2018 1 次提交
    • K
      block: Remove deprecated -drive geometry options · b24ec3c4
      Kevin Wolf 提交于
      This reinstates commit a7aff6dd,
      which was temporarily reverted for the 3.0 release so that libvirt gets
      some extra time to update their command lines.
      
      The -drive options cyls, heads, secs and trans were deprecated in
      QEMU 2.10. It's time to remove them.
      
      hd-geo-test tested both the old version with geometry options in -drive
      and the new one with -device. Therefore the code using -drive doesn't
      have to be replaced there, we just need to remove the -drive test cases.
      This in turn allows some simplification of the code.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      b24ec3c4
  2. 10 7月, 2018 2 次提交
  3. 15 6月, 2018 2 次提交
  4. 03 3月, 2018 1 次提交
  5. 19 12月, 2017 1 次提交
    • M
      hw/block: Fix the return type · 9d3b1551
      Mao Zhongyi 提交于
      When the function no success value to transmit, it usually make the
      function return void. It has turned out not to be a success, because
      it means that the extra local_err variable and error_propagate() will
      be needed. It leads to cumbersome code, therefore, transmit success/
      failure in the return value is worth.
      
      So fix the return type of blkconf_apply_backend_options(),
      blkconf_geometry() and virtio_blk_data_plane_create() to avoid it.
      
      Cc: John Snow <jsnow@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NMao Zhongyi <maozy.fnst@cn.fujitsu.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: ac0edc1fc70c4457e5cec94405eb7d1f89f9c2c1.1511317952.git.maozy.fnst@cn.fujitsu.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9d3b1551
  6. 01 3月, 2017 2 次提交
  7. 13 7月, 2016 2 次提交
  8. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  9. 20 1月, 2016 1 次提交
  10. 10 3月, 2015 1 次提交
  11. 20 10月, 2014 2 次提交
    • M
      blockdev: Fix blockdev-add not to create DriveInfo · 26f8b3a8
      Markus Armbruster 提交于
      blockdev_init() always creates a DriveInfo, but only drive_new() fills
      it in.  qmp_blockdev_add() leaves it blank.  This results in a drive
      with type = IF_IDE, bus = 0, unit = 0.  Screwed up in commit ee13ed1c.
      
      Board initialization code looking for IDE drive (0,0) can pick up one
      of these bogus drives.  The QMP command has to execute really early to
      be visible.  Not sure how likely that is in practice.
      
      Fix by creating DriveInfo in drive_new().  Block backends created by
      blockdev-add don't get one.
      
      Breaks the test for "has been created by qmp_blockdev_add()" in
      blockdev_mark_auto_del() and do_drive_del(), because it changes the
      value of dinfo && !dinfo->enable_auto_del from true to false.  Simply
      test !dinfo instead.
      
      Leaves DriveInfo member enable_auto_del unused.  Drop it.
      
      A few places assume a block backend always has a DriveInfo.  Fix them
      up.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      26f8b3a8
    • M
      hw: Convert from BlockDriverState to BlockBackend, mostly · 4be74634
      Markus Armbruster 提交于
      Device models should access their block backends only through the
      block-backend.h API.  Convert them, and drop direct includes of
      inappropriate headers.
      
      Just four uses of BlockDriverState are left:
      
      * The Xen paravirtual block device backend (xen_disk.c) opens images
        itself when set up via xenbus, bypassing blockdev.c.  I figure it
        should go through qmp_blockdev_add() instead.
      
      * Device model "usb-storage" prompts for keys.  No other device model
        does, and this one probably shouldn't do it, either.
      
      * ide_issue_trim_cb() uses bdrv_aio_discard() instead of
        blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
        which has only the BlockDriverState.
      
      * PC87312State has an unused BlockDriverState[] member.
      
      The next two commits take care of the latter two.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4be74634
  12. 26 8月, 2014 1 次提交
  13. 09 4月, 2013 2 次提交
  14. 30 1月, 2013 1 次提交
  15. 19 12月, 2012 2 次提交
  16. 17 7月, 2012 3 次提交