1. 18 6月, 2012 1 次提交
    • 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
  2. 08 6月, 2012 2 次提交
  3. 10 4月, 2012 1 次提交
    • L
      qdev: qdev_unplug(): use error_set() · 56f9107e
      Luiz Capitulino 提交于
      It currently uses qerror_report(), but next commit will convert
      the drive_del command to the QAPI and this requires using
      error_set().
      
      One particularity of qerror_report() is that it knows when it's
      running on monitor context or command-line context and prints the
      error message accordingly. error_set() doesn't do this, so we
      have to be careful not to drop error messages.
      
      qdev_unplug() has three kinds of usages:
      
       1. It's called when hot adding a device fails, to undo anything
          that has been done before hitting the error
      
       2. It's called by function monitor functions like device_del(),
          to unplug a device
      
       3. It's used by xen_platform.c in a way that doesn't _seem_ to
          be in monitor context
      
      Only item 2 can print an error message to the user, this commit
      maintains that.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      56f9107e
  4. 05 4月, 2012 1 次提交
    • S
      qdev: add blocksize property type · 02fda01c
      Stefan Hajnoczi 提交于
      Storage interfaces like virtio-blk can be configured with block size
      information so that the guest can take advantage of efficient I/O
      request sizes.
      
      According to the SCSI Block Commands (SBC) standard a device's block
      size is "almost always greater than one byte and may be a multiple of
      512 bytes".  QEMU currently has a 512 byte minimum block size because
      the block layer functions work at that granularity.  Furthermore, the
      block size should be a power of 2 because QEMU calculates bitmasks from
      the value.
      
      Introduce a "blocksize" property type so devices can enforce these
      constraints on block size values.  If the constraints are relaxed in the
      future then this property can be updated.
      
      Introduce the new PropertyValueNotPowerOf2 QError so QMP clients know
      exactly why a block size value was rejected.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      02fda01c
  5. 03 4月, 2012 1 次提交
  6. 07 2月, 2012 5 次提交
  7. 04 2月, 2012 10 次提交
  8. 02 2月, 2012 1 次提交
    • J
      qdev: Introduce lost tick policy property · 4e4fa398
      Jan Kiszka 提交于
      Potentially tick-generating timer devices will gain a common property:
      lock_tick_policy. It allows to encode 4 different ways how to deal with
      tick events the guest did not process in time:
      
      discard - ignore lost ticks (e.g. if the guest compensates for them
                already)
      delay   - replay all lost ticks in a row once the guest accepts them
                again
      merge   - if multiple ticks are lost, all of them are merged into one
                which is replayed once the guest accepts it again
      slew    - lost ticks are gradually replayed at a higher frequency than
                the original tick
      
      Not all timer device will need to support all modes. However, all need
      to accept the configuration via this common property.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4e4fa398
  9. 28 1月, 2012 6 次提交
  10. 22 1月, 2012 1 次提交
  11. 20 12月, 2011 5 次提交
  12. 15 12月, 2011 6 次提交