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. 19 7月, 2013 1 次提交
    • P
      virtio: Support transports which can specify the vring alignment · 6ce69d1c
      Peter Maydell 提交于
      Support virtio transports which can specify the vring alignment
      (ie where the guest communicates this to the host) by providing
      a new virtio_queue_set_align() function. (The default alignment
      remains as before.)
      
      Transports which wish to make use of this must set the
      has_variable_vring_alignment field in their VirtioBusClass
      struct to true; they can then change the alignment via
      virtio_queue_set_align().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
      6ce69d1c
  3. 25 4月, 2013 2 次提交
  4. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  5. 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
  6. 22 1月, 2013 2 次提交