1. 10 12月, 2013 2 次提交
    • P
      virtio-bus: cleanup plug/unplug interface · 5e96f5d2
      Paolo Bonzini 提交于
      Right now we have these pairs:
      
      - virtio_bus_plug_device/virtio_bus_destroy_device.  The first
        takes a VirtIODevice, the second takes a VirtioBusState
      
      - device_plugged/device_unplug callbacks in the VirtioBusClass
        (here it's just the naming that is inconsistent)
      
      - virtio_bus_destroy_device is not called by anyone (and since
        it calls qdev_free, it would be called by the proxies---but
        then the callback is useless since the proxies can do whatever
        they want before calling virtio_bus_destroy_device)
      
      And there is a k->init but no k->exit, hence virtio_device_exit is
      overwritten by subclasses (except virtio-9p).  This cleans it up by:
      
      - renaming the device_unplug callback to device_unplugged
      
      - renaming virtio_bus_plug_device to virtio_bus_device_plugged,
        matching the callback name
      
      - renaming virtio_bus_destroy_device to virtio_bus_device_unplugged,
        removing the qdev_free, making it take a VirtIODevice and calling it
        from virtio_device_exit
      
      - adding a k->exit callback
      
      virtio_device_exit is still overwritten, the next patches will fix that.
      
      Cc: qemu-stable@nongnu.org
      Acked-by: NAndreas Faerber <afaerber@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e96f5d2
    • P
      virtio-bus: remove vdev field · 06d3dff0
      Paolo Bonzini 提交于
      The vdev field is complicated to synchronize.  Just access the
      BusState's list of children.
      
      Cc: qemu-stable@nongnu.org
      Acked-by: NAndreas Faerber <afaerber@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      06d3dff0
  2. 06 11月, 2013 1 次提交
  3. 31 5月, 2013 1 次提交
    • A
      qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path · bbfa18fc
      Amos Kong 提交于
      Recent virtio refactoring in QEMU made virtio-bus become the parent bus
      of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,
      typename will be added to fw_dev_path by default, the new fw_dev_path
      could not be identified by seabios. It causes that bootindex parameter
      of scsi device doesn't work.
      
      This patch implements get_fw_dev_path() in BusClass, it will be called
      if bus doesn't implement the method, tyename will be added to
      fw_dev_path. If the implemented method returns NULL, nothing will be
      added to fw_dev_path.
      
      It also implements virtio_bus_get_fw_dev_path() to return NULL. Then
      QEMU will still pass original style of fw_dev_path to seabios.
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1369814202-10346-1-git-send-email-akong@redhat.com
      --
      v2: only add nothing to fw_dev_path when get_fw_dev_path() is
          implemented and returns NULL. then it will not effect other devices
          don't have get_fw_dev_path() implementation.
      v3: implement default get_fw_dev_path() in BusClass
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      bbfa18fc
  4. 17 5月, 2013 1 次提交
  5. 25 4月, 2013 2 次提交
  6. 09 4月, 2013 2 次提交
  7. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  8. 22 1月, 2013 2 次提交