1. 07 1月, 2014 1 次提交
  2. 25 12月, 2013 2 次提交
  3. 23 12月, 2013 2 次提交
    • M
      qdev: Do not let the user try to device_add when it cannot work · 7ea5e78f
      Markus Armbruster 提交于
      Such devices have always been unavailable and omitted from the list of
      available devices shown by device_add help.  Until commit 18b6dade
      silently broke the former, setting up nasty traps for unwary users,
      like this one:
      
          $ qemu-system-x86_64 -nodefaults -monitor stdio -display none
          QEMU 1.6.50 monitor - type 'help' for more information
          (qemu) device_add apic
          Segmentation fault (core dumped)
      
      I call that a regression.  Fix it.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      7ea5e78f
    • M
      qdev: Replace no_user by cannot_instantiate_with_device_add_yet · efec3dd6
      Markus Armbruster 提交于
      In an ideal world, machines can be built by wiring devices together
      with configuration, not code.  Unfortunately, that's not the world we
      live in right now.  We still have quite a few devices that need to be
      wired up by code.  If you try to device_add such a device, it'll fail
      in sometimes mysterious ways.  If you're lucky, you get an
      unmysterious immediate crash.
      
      To protect users from such badness, DeviceClass member no_user used to
      make device models unavailable with -device / device_add, but that
      regressed in commit 18b6dade.  The device model is still omitted from
      help, but is available anyway.
      
      Attempts to fix the regression have been rejected with the argument
      that the purpose of no_user isn't clear, and it's prone to misuse.
      
      This commit clarifies no_user's purpose.  Anthony suggested to rename
      it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
      I shorten somewhat to keep checkpatch happy.  While there, make it
      bool.
      
      Every use of cannot_instantiate_with_device_add_yet gets a FIXME
      comment asking for rationale.  The next few commits will clean them
      all up, either by providing a rationale, or by getting rid of the use.
      
      With that done, the regression fix is hopefully acceptable.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      efec3dd6
  4. 06 11月, 2013 6 次提交
  5. 12 10月, 2013 2 次提交
    • M
      qdev-monitor: Group "device_add help" and "info qdm" by category · a3400aee
      Markus Armbruster 提交于
      Output is a long, unsorted list.  Not very helpful.  Print one list
      per device category instead, with a header line identifying the
      category, plus a list of uncategorized devices.  Print each list in
      case-insenitive alphabetical order.
      
      Devices with multiple categories are listed multiple times.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Message-id: 1381410021-1538-3-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
      a3400aee
    • M
      Mostly revert "qemu-help: Sort devices by logical functionality" · 1fc224b4
      Markus Armbruster 提交于
      This reverts most of commit 3d1237fb.
      
      The commit claims to sort the output of "-device help" "by
      functionality rather than alphabetical".  Issues:
      
      * The output was unsorted before, not alphabetically sorted.
        Misleading, but harmless enough.
      
      * The commit doesn't just sort the output of "-device help" as it
        claims, it adds categories to each line of "-device help", and it
        prints devices once per category.  In particular, devices without a
        category aren't shown anymore.  Maybe such devices should not exist,
        but they do.  Regression.
      
      * Categories are also added to the output of "info qdm".  Silent
        change, not nice.  Output remains unsorted, unlike "-device help".
      
      I'm going to reimplement the feature we actually want, without the
      warts.  Reverting the flawed commit first should make it easier to
      review.  However, I can't revert it completely, since DeviceClass
      member categories has been put to use.  So leave that part in.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Message-id: 1381410021-1538-2-git-send-email-armbru@redhat.com
      Signed-off-by: NAnthony Liguori <aliguori@amazon.com>
      1fc224b4
  6. 29 7月, 2013 1 次提交
  7. 27 7月, 2013 1 次提交
  8. 07 5月, 2013 1 次提交
  9. 17 4月, 2013 2 次提交
  10. 01 3月, 2013 1 次提交
  11. 02 2月, 2013 1 次提交
    • P
      qdev: drop extra references at creation time · b09995ae
      Paolo Bonzini 提交于
      qdev_free and qbus_free have to do unparent+unref, because nobody else
      drops the initial reference (the one included by object_initialize)
      before them.
      
      For device_init_func and do_device_add, this is trivially correct,
      since the DeviceState goes out of scope.
      
      For qdev_create, qdev_try_create and qbus_init, it is a bit more tricky.
      What we are doing here is just assuming that the caller knows what it's
      doing, and won't call qdev_free/qbus_free while the device is still there.
      This is a pretty reasonable assumption and (behind the scenes) is also
      what GObject/GTK does.  GTK actually has a "floating reference" that
      goes away as soon as the caller does gtk_container_add or something
      like that, but in the end qbus_init and qdev_try_create are already
      adding the new object to its qdev parent!  So in the end the two solutions
      are the same.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b09995ae
  12. 22 1月, 2013 1 次提交
  13. 17 1月, 2013 1 次提交
  14. 13 1月, 2013 1 次提交
  15. 19 12月, 2012 4 次提交
  16. 29 11月, 2012 1 次提交
  17. 10 9月, 2012 1 次提交
    • J
      kvm: i386: Add classic PCI device assignment · c3ebd3ba
      Jan Kiszka 提交于
      This adds PCI device assignment for i386 targets using the classic KVM
      interfaces. This version is 100% identical to what is being maintained
      in qemu-kvm for several years and is supported by libvirt as well. It is
      expected to remain relevant for another couple of years until kernels
      without full-features and performance-wise equivalent VFIO support are
      obsolete.
      
      A refactoring to-do that should be done in-tree is to model MSI and
      MSI-X support via the generic PCI layer, similar to what VFIO is already
      doing for MSI-X. This should improve the correctness and clean up the
      code from duplicate logic.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Acked-by: NAcked-by: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c3ebd3ba
  18. 31 8月, 2012 1 次提交
    • G
      fix info qtree indention · da9fbe76
      Gerd Hoffmann 提交于
      Without the patch bus properties are are not in line with the other
      properties:
      
      [ ... ]
        dev: fw_cfg, id ""
          ctl_iobase = 0x510
          data_iobase = 0x511
            irq 0
            mmio ffffffffffffffff/0000000000000002
            mmio ffffffffffffffff/0000000000000001
      [ ... ]
      
      With the patch applied everything is lined up properly:
      
      [ ... ]
        dev: fw_cfg, id ""
          ctl_iobase = 0x510
          data_iobase = 0x511
          irq 0
          mmio ffffffffffffffff/0000000000000002
          mmio ffffffffffffffff/0000000000000001
      [ ... ]
      
      Needed to make the autotest qtree parser happy.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      da9fbe76
  19. 15 8月, 2012 1 次提交
  20. 03 8月, 2012 1 次提交
    • P
      Support 'help' as a synonym for '?' in command line options · c8057f95
      Peter Maydell 提交于
      For command line options which permit '?' meaning 'please list the
      permitted values', add support for 'help' as a synonym, by abstracting
      the check out into a helper function.
      
      This change means that in some cases where we were being lazy in
      our string parsing, "?junk" will now be rejected as an invalid option
      rather than being (undocumentedly) treated the same way as "?".
      
      Update the documentation to use 'help' rather than '?', since '?'
      is a shell metacharacter and thus prone to fail confusingly if there
      is a single character filename in the current working directory and
      the '?' has not been escaped. It's therefore better to steer users
      towards 'help', though '?' is retained for backwards compatibility.
      
      We do not, however, update the output of the system emulator's -help
      (or any documentation autogenerated from the qemu-options.hx which
      is the source of the -help text) because libvirt parses our -help
      output and will break. At a later date when QEMU provides a better
      interface so libvirt can avoid having to do this, we can update the
      -help text too.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c8057f95
  21. 18 6月, 2012 5 次提交
    • A
      s390x: fix s390 virtio aliases · 5f629d94
      Alexander Graf 提交于
      Some of the virtio devices have the same frontend name, but actually
      implement different devices behind the scenes through aliases.
      
      The indicator which device type to use is the architecture. On s390, we
      want s390 virtio devices. On everything else, we want PCI devices.
      
      Reflect this in the alias selection code. This way we fix commands like
      -device virtio-blk on s390x which with this patch applied select the
      correct virtio-blk-s390 device rather than virtio-blk-pci.
      Reported-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5f629d94
    • A
      qbus: Make child devices links · 0866aca1
      Anthony Liguori 提交于
      Make qbus children show up as link<> properties.  There is no stable
      addressing for qbus children so we use an unstable naming convention.
      
      This is okay in QOM though because the composition name is expected to
      be what's stable.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0866aca1
    • A
      qdev: Convert busses to QEMU Object Model · 0d936928
      Anthony Liguori 提交于
      This is far less interesting than it sounds.  We simply add an Object to each
      BusState and then register the types appropriately.  Most of the interesting
      refactoring will follow in the next patches.
      
      Since we're changing fundamental type names (BusInfo -> BusClass), it all needs
      to convert at once.  Fortunately, not a lot of code is affected.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      [AF: Made all new bus TypeInfos static const.]
      [AF: Made qbus_free() call object_delete(), required {qom,glib}_allocated]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0d936928
    • P
      qdev: Clean up global properties · 4b3582b0
      Paolo Bonzini 提交于
      Now that global properties do not depend on buses anymore, set
      them directly in the device instance_init function.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      4b3582b0
    • P
      qdev: Move bus properties to abstract superclasses · bce54474
      Paolo Bonzini 提交于
      In qdev, each bus in practice identified an abstract superclass, but
      this was mostly hidden.  In QOM, instead, these abstract classes are
      explicit so we can move bus properties there.
      
      All bus property walks are removed, and all device property walks
      are changed to look along the class hierarchy instead.
      
      We would have duplicates if class A defines some properties and its
      subclass B does not define any, because class_b->props will be
      left equal to class_a->props.
      
      The solution here is to reintroduce the class_base_init TypeInfo
      callback, that was present in one of the early QOM versions but
      removed (on my request...) before committing.
      
      This breaks global bus properties, an obscure feature when used
      with the command-line which is actually useful and used when used by
      backwards-compatible machine types.  So this patch also adjusts the
      global bus properties in hw/pc_piix.c to refer to the abstract class.
      
      Globals and other properties must be modified in the same patch to
      avoid complications related to initialization ordering.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      bce54474
  22. 05 6月, 2012 1 次提交
  23. 14 5月, 2012 1 次提交
  24. 12 5月, 2012 1 次提交