1. 06 Jan, 2014 1 commit
  2. 24 Dec, 2013 2 commits
  3. 22 Dec, 2013 2 commits
    • Markus Armbruster's avatar
      qdev: Do not let the user try to device_add when it cannot work · 7ea5e78f
      Markus Armbruster authored
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Markus Armbruster's avatar
      qdev: Replace no_user by cannot_instantiate_with_device_add_yet · efec3dd6
      Markus Armbruster authored
      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
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
  4. 05 Nov, 2013 6 commits
  5. 11 Oct, 2013 2 commits
    • Markus Armbruster's avatar
      qdev-monitor: Group "device_add help" and "info qdm" by category · a3400aee
      Markus Armbruster authored
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarMarcel Apfelbaum <marcel.a@redhat.com>
      Message-id: 1381410021-1538-3-git-send-email-armbru@redhat.com
      Signed-off-by: default avatarAnthony Liguori <aliguori@amazon.com>
    • Markus Armbruster's avatar
      Mostly revert "qemu-help: Sort devices by logical functionality" · 1fc224b4
      Markus Armbruster authored
      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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarMarcel Apfelbaum <marcel.a@redhat.com>
      Message-id: 1381410021-1538-2-git-send-email-armbru@redhat.com
      Signed-off-by: default avatarAnthony Liguori <aliguori@amazon.com>
  6. 29 Jul, 2013 1 commit
  7. 27 Jul, 2013 1 commit
  8. 06 May, 2013 1 commit
  9. 17 Apr, 2013 1 commit
  10. 16 Apr, 2013 1 commit
  11. 01 Mar, 2013 1 commit
    • Paolo Bonzini's avatar
      hw: move qdev-monitor.o to toplevel directory · b4a42f81
      Paolo Bonzini authored
      qdev-monitor.c is the only "core qdev" file that is not used in
      user-mode emulation, and it does not define anything that is used
      by hardware models.  Remove it from the hw/ directory and
      remove hw/qdev-monitor.h from hw/qdev.h too; this requires
      some files to have some new explicitly includes.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
  12. 01 Feb, 2013 1 commit
    • Paolo Bonzini's avatar
      qdev: drop extra references at creation time · b09995ae
      Paolo Bonzini authored
      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: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  13. 21 Jan, 2013 1 commit
  14. 17 Jan, 2013 1 commit
  15. 12 Jan, 2013 1 commit
  16. 19 Dec, 2012 4 commits
  17. 29 Nov, 2012 1 commit
  18. 10 Sep, 2012 1 commit
    • Jan Kiszka's avatar
      kvm: i386: Add classic PCI device assignment · c3ebd3ba
      Jan Kiszka authored
      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
      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: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Acked-by: default avatarAcked-by: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
  19. 31 Aug, 2012 1 commit
    • Gerd Hoffmann's avatar
      fix info qtree indention · da9fbe76
      Gerd Hoffmann authored
      Without the patch bus properties are are not in line with the other
      [ ... ]
        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: default avatarGerd Hoffmann <kraxel@redhat.com>
  20. 15 Aug, 2012 1 commit
  21. 02 Aug, 2012 1 commit
    • Peter Maydell's avatar
      Support 'help' as a synonym for '?' in command line options · c8057f95
      Peter Maydell authored
      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: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  22. 18 Jun, 2012 5 commits
    • Alexander Graf's avatar
      s390x: fix s390 virtio aliases · 5f629d94
      Alexander Graf authored
      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: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    • Anthony Liguori's avatar
      qbus: Make child devices links · 0866aca1
      Anthony Liguori authored
      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: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Anthony Liguori's avatar
      qdev: Convert busses to QEMU Object Model · 0d936928
      Anthony Liguori authored
      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: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: default avatarPaolo 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: default avatarAndreas Färber <afaerber@suse.de>
    • Paolo Bonzini's avatar
      qdev: Clean up global properties · 4b3582b0
      Paolo Bonzini authored
      Now that global properties do not depend on buses anymore, set
      them directly in the device instance_init function.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
    • Paolo Bonzini's avatar
      qdev: Move bus properties to abstract superclasses · bce54474
      Paolo Bonzini authored
      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: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
  23. 04 Jun, 2012 1 commit
  24. 14 May, 2012 1 commit
  25. 12 May, 2012 1 commit