1. 31 10月, 2016 3 次提交
  2. 15 9月, 2016 1 次提交
    • M
      virtio-bus: Plug devices after features are negotiated · d1b4259f
      Maxime Coquelin 提交于
      Currently, devices are plugged before features are negotiated.
      If the backend doesn't support VIRTIO_F_VERSION_1, the transport
      needs to rewind some settings.
      
      This is the case for CCW, for which a post_plugged callback had
      been introduced, where max_rev field is just updated if
      VIRTIO_F_VERSION_1 is not supported by the backend.
      For PCI, implementing post_plugged would be much more
      complicated, so it needs to know whether the backend supports
      VIRTIO_F_VERSION_1 at plug time.
      
      Currently, nothing is done for PCI. Modern capabilities get
      exposed to the guest even if VIRTIO_F_VERSION_1 is not supported
      by the backend, which confuses the guest.
      
      This patch replaces existing post_plugged solution with an
      approach that fits with both transports.
      Features negotiation is performed before ->device_plugged() call.
      A pre_plugged callback is introduced so that the transports can
      set their supported features.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: qemu-stable@nongnu.org
      Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> [ccw]
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NMaxime Coquelin <maxime.coquelin@redhat.com>
      d1b4259f
  3. 10 9月, 2016 1 次提交
  4. 04 7月, 2016 1 次提交
  5. 24 6月, 2016 1 次提交
  6. 29 1月, 2016 1 次提交
  7. 03 12月, 2015 1 次提交
    • C
      virtio: handle non-virtio-1-capable backend for ccw · 11380b36
      Cornelia Huck 提交于
      If you run a qemu advertising VERSION_1 with an old kernel where
      vhost did not yet support VERSION_1, you'll end up with a device
      that is {modern pci|ccw revision 1} but does not advertise VERSION_1.
      This is not a sensible configuration and is rejected by the Linux
      guest drivers.
      
      To fix this, add a ->post_plugged() callback invoked after features
      have been queried that can handle the VERSION_1 bit being withdrawn
      and change ccw to fall back to revision 0 if VERSION_1 is gone.
      
      Note that pci is _not_ fixed; we'll need to rethink the approach
      for the next release but at least for pci it's not a regression.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      11380b36
  8. 27 7月, 2015 1 次提交
  9. 31 5月, 2015 2 次提交
  10. 26 2月, 2015 1 次提交
  11. 10 12月, 2014 1 次提交
  12. 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
  13. 06 11月, 2013 1 次提交
  14. 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
  15. 17 5月, 2013 1 次提交
  16. 25 4月, 2013 2 次提交
  17. 09 4月, 2013 2 次提交
  18. 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
  19. 22 1月, 2013 2 次提交