1. 11 7月, 2017 2 次提交
    • A
      vfio/pci: Fixup v0 PCIe capabilities · 47985727
      Alex Williamson 提交于
      Intel 82599 VFs report a PCIe capability version of 0, which is
      invalid.  The earliest version of the PCIe spec used version 1.  This
      causes Windows to fail startup on the device and it will be disabled
      with error code 10.  Our choices are either to drop the PCIe cap on
      such devices, which has the side effect of likely preventing the guest
      from discovering any extended capabilities, or performing a fixup to
      update the capability to the earliest valid version.  This implements
      the latter.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      47985727
    • 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
  2. 10 7月, 2017 38 次提交