1. 22 2月, 2012 2 次提交
    • P
      qdev: accept hex properties only if prefixed by 0x · 97aa6e9b
      Paolo Bonzini 提交于
      Hex properties are an obstacle to removal of old qdev string parsing, but
      even here we can lay down the foundations for future simplification.  In
      general, they are rarely used and their printed form is more interesting
      than the parsing.  For example you'd usually set isa-serial.index
      instead of isa-serial.iobase.  And luckily our main client, libvirt
      only cares about few of these, and always sets them with a 0x prefix.
      So the series stops accepting bare hexadecimal numbers, preparing for
      making legacy properties read-only in 1.3 or so.  The read side will
      stay as long as "info qtree" is with us.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      97aa6e9b
    • P
      qdev: accept both strings and integers for PCI addresses · 768a9ebe
      Paolo Bonzini 提交于
      Visitors allow a limited form of polymorphism.  Exploit it to support
      setting the non-legacy PCI address property both as a DD.F string
      and as an 8-bit integer.
      
      The 8-bit integer form is just too clumsy, it is unlikely that we will
      ever drop it.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      768a9ebe
  2. 15 2月, 2012 2 次提交
  3. 07 2月, 2012 12 次提交
  4. 04 2月, 2012 2 次提交
  5. 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
  6. 28 1月, 2012 2 次提交
  7. 27 1月, 2012 1 次提交
  8. 14 1月, 2012 1 次提交
  9. 20 12月, 2011 3 次提交
  10. 16 10月, 2011 1 次提交
  11. 23 9月, 2011 1 次提交
    • D
      pci-devfn: check that device/slot number is within range · ffe3ce11
      Donald Dutile 提交于
      Need to check that guest slot/device number is not > 31 or walk off
      the devfn table when checking if a devfn is available or not in a guest.
      
      before this fix, passing in an addr=abc  or addr=34,
      can crash qemu, sometimes fail gracefully if data past end
      of devfn table fails the availability test.
      
      with this fix, get clean error:
      Property 'pci-assign.addr' doesn't take value '34'
      
      also tested when no addr= param passed for guest (pcicfg) address,
      and that worked as well.
      Signed-off-by: NDon Dutile <ddutile@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ffe3ce11
  12. 06 9月, 2011 1 次提交
  13. 21 8月, 2011 1 次提交
  14. 28 4月, 2011 1 次提交
  15. 21 3月, 2011 1 次提交
  16. 21 2月, 2011 1 次提交
  17. 24 8月, 2010 1 次提交
    • B
      Rearrange block headers · 2446333c
      Blue Swirl 提交于
      Changing block.h or blockdev.h resulted in recompiling most objects.
      
      Move DriveInfo typedef and BlockInterfaceType enum definitions
      to qemu-common.h and rearrange blockdev.h use to decrease churn.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2446333c
  18. 23 8月, 2010 1 次提交
  19. 12 7月, 2010 1 次提交
  20. 02 7月, 2010 3 次提交
    • M
      block: Catch attempt to attach multiple devices to a blockdev · 18846dee
      Markus Armbruster 提交于
      For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo
      happily creates two SCSI disks connected to the same block device.
      It's all downhill from there.
      
      Device usb-storage deliberately attaches twice to the same blockdev,
      which fails with the fix in place.  Detach before the second attach
      there.
      
      Also catch attempt to delete while a guest device model is attached.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      18846dee
    • M
      qdev: Decouple qdev_prop_drive from DriveInfo · f8b6cc00
      Markus Armbruster 提交于
      Make the property point to BlockDriverState, cutting out the DriveInfo
      middleman.  This prepares the ground for block devices that don't have
      a DriveInfo.
      
      Currently all user-defined ones have a DriveInfo, because the only way
      to define one is -drive & friends (they go through drive_init()).
      DriveInfo is closely tied to -drive, and like -drive, it mixes
      information about host and guest part of the block device.  I'm
      working towards a new way to define block devices, with clean
      host/guest separation, and I need to get DriveInfo out of the way for
      that.
      
      Fortunately, the device models are perfectly happy with
      BlockDriverState, except for two places: ide_drive_initfn() and
      scsi_disk_initfn() need to check the DriveInfo for a serial number set
      with legacy -drive serial=...  Use drive_get_by_blockdev() there.
      
      Device model code should now use DriveInfo only when explicitly
      dealing with drives defined the old way, i.e. without -device.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f8b6cc00
    • M
      blockdev: Clean up automatic drive deletion · 14bafc54
      Markus Armbruster 提交于
      We automatically delete blockdev host parts on unplug of the guest
      device.  Too much magic, but we can't change that now.
      
      The delete happens early in the guest device teardown, before the
      connection to the host part is severed.  Thus, the guest part's
      pointer to the host part dangles for a brief time.  No actual harm
      comes from this, but we'll catch such dangling pointers a few commits
      down the road.  Clean up the dangling pointers by delaying the
      automatic deletion until the guest part's pointer is gone.
      
      Device usb-storage deliberately makes two qdev properties refer to the
      same drive, because it automatically creates a second device.  Again,
      too much magic we can't change now.  Multiple references worked okay
      before, but now free_drive() dies for the second one.  Zap the extra
      reference.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      14bafc54
  21. 01 7月, 2010 1 次提交