1. 24 6月, 2016 2 次提交
  2. 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
  3. 12 11月, 2015 1 次提交
    • J
      virtio-pci: fix 1.0 virtqueue migration · a6df8adf
      Jason Wang 提交于
      We don't migrate the followings fields for virtio-pci:
      
      uint32_t dfselect;
      uint32_t gfselect;
      uint32_t guest_features[2];
      struct {
          uint16_t num;
          bool enabled;
          uint32_t desc[2];
          uint32_t avail[2];
          uint32_t used[2];
      } vqs[VIRTIO_QUEUE_MAX];
      
      This will confuse driver if migrating during initialization. Solves
      this issue by:
      
      - introduce transport specific callbacks to load and store extra
        virtqueue states.
      - add a new subsection for virtio to migrate transport specific modern
        device state.
      - implement pci specific callbacks.
      - add a new property for virtio-pci for whether or not to migrate
        extra state.
      - compat the migration for 2.4 and elder machine types
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      a6df8adf
  4. 31 5月, 2015 2 次提交
  5. 28 4月, 2015 1 次提交
    • J
      virtio: introduce vector to virtqueues mapping · e0d686bf
      Jason Wang 提交于
      Currently we will try to traverse all virtqueues to find a subset that
      using a specific vector. This is sub optimal when we will support
      hundreds or even thousands of virtqueues. So this patch introduces a
      method which could be used by transport to get all virtqueues that
      using a same vector. This is done through QLISTs and the number of
      QLISTs was queried through a transport specific method. When guest
      setting vectors, the virtqueue will be linked and helpers for traverse
      the list was also introduced.
      
      The first user will be virtio pci which will use this to speed up
      MSI-X masking and unmasking handling.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e0d686bf
  6. 26 2月, 2015 1 次提交
  7. 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
  8. 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
  9. 25 4月, 2013 2 次提交
  10. 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
  11. 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
  12. 22 1月, 2013 2 次提交