1. 16 10月, 2018 1 次提交
  2. 01 6月, 2018 1 次提交
  3. 06 3月, 2018 1 次提交
  4. 07 2月, 2018 1 次提交
  5. 27 7月, 2017 1 次提交
  6. 11 7月, 2017 1 次提交
    • A
      vfio: Test realized when using VFIOGroup.device_list iterator · 7da624e2
      Alex Williamson 提交于
      VFIOGroup.device_list is effectively our reference tracking mechanism
      such that we can teardown a group when all of the device references
      are removed.  However, we also use this list from our machine reset
      handler for processing resets that affect multiple devices.  Generally
      device removals are fully processed (exitfn + finalize) when this
      reset handler is invoked, however if the removal is triggered via
      another reset handler (piix4_reset->acpi_pcihp_reset) then the device
      exitfn may run, but not finalize.  In this case we hit asserts when
      we start trying to access PCI helpers since much of the PCI state of
      the device is released.  To resolve this, add a pointer to the Object
      DeviceState in our common base-device and skip non-realized devices
      as we iterate.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      7da624e2
  7. 18 10月, 2016 5 次提交
  8. 08 8月, 2016 1 次提交
  9. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  10. 11 3月, 2016 3 次提交
    • A
      vfio: Generalize region support · db0da029
      Alex Williamson 提交于
      Both platform and PCI vfio drivers create a "slow", I/O memory region
      with one or more mmap memory regions overlayed when supported by the
      device. Generalize this to a set of common helpers in the core that
      pulls the region info from vfio, fills the region data, configures
      slow mapping, and adds helpers for comleting the mmap, enable/disable,
      and teardown.  This can be immediately used by the PCI MSI-X code,
      which needs to mmap around the MSI-X vector table.
      
      This also changes VFIORegion.mem to be dynamically allocated because
      otherwise we don't know how the caller has allocated VFIORegion and
      therefore don't know whether to unreference it to destroy the
      MemoryRegion or not.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      db0da029
    • A
      vfio: Wrap VFIO_DEVICE_GET_REGION_INFO · 46900226
      Alex Williamson 提交于
      In preparation for supporting capability chains on regions, wrap
      ioctl(VFIO_DEVICE_GET_REGION_INFO) so we don't duplicate the code for
      each caller.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      46900226
    • A
      vfio: Add sysfsdev property for pci & platform · 7df9381b
      Alex Williamson 提交于
      vfio-pci currently requires a host= parameter, which comes in the
      form of a PCI address in [domain:]<bus:slot.function> notation.  We
      expect to find a matching entry in sysfs for that under
      /sys/bus/pci/devices/.  vfio-platform takes a similar approach, but
      defines the host= parameter to be a string, which can be matched
      directly under /sys/bus/platform/devices/.  On the PCI side, we have
      some interest in using vfio to expose vGPU devices.  These are not
      actual discrete PCI devices, so they don't have a compatible host PCI
      bus address or a device link where QEMU wants to look for it.  There's
      also really no requirement that vfio can only be used to expose
      physical devices, a new vfio bus and iommu driver could expose a
      completely emulated device.  To fit within the vfio framework, it
      would need a kernel struct device and associated IOMMU group, but
      those are easy constraints to manage.
      
      To support such devices, which would include vGPUs, that honor the
      VFIO PCI programming API, but are not necessarily backed by a unique
      PCI address, add support for specifying any device in sysfs.  The
      vfio API already has support for probing the device type to ensure
      compatibility with either vfio-pci or vfio-platform.
      
      With this, a vfio-pci device could either be specified as:
      
      -device vfio-pci,host=02:00.0
      
      or
      
      -device vfio-pci,sysfsdev=/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0
      
      or even
      
      -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:02:00.0
      
      When vGPU support comes along, this might look something more like:
      
      -device vfio-pci,sysfsdev=/sys/devices/virtual/intel-vgpu/vgpu0@0000:00:02.0
      
      NB - This is only a made up example path
      
      The same change is made for vfio-platform, specifying sysfsdev has
      precedence over the old host option.
      Tested-by: NEric Auger <eric.auger@linaro.org>
      Reviewed-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      7df9381b
  11. 29 1月, 2016 1 次提交
  12. 11 11月, 2015 1 次提交
  13. 06 10月, 2015 3 次提交
  14. 24 9月, 2015 1 次提交
  15. 11 9月, 2015 1 次提交
  16. 07 7月, 2015 1 次提交
  17. 18 6月, 2015 1 次提交
  18. 11 6月, 2015 1 次提交
  19. 08 6月, 2015 2 次提交