1. 29 4月, 2015 3 次提交
    • A
      vfio-pci: Reset workaround for AMD Bonaire and Hawaii GPUs · 5655f931
      Alex Williamson 提交于
      Somehow these GPUs manage not to respond to a PCI bus reset, removing
      our primary mechanism for resetting graphics cards.  The result is
      that these devices typically work well for a single VM boot.  If the
      VM is rebooted or restarted, the guest driver is not able to init the
      card from the dirty state, resulting in a blue screen for Windows
      guests.
      
      The workaround is to use a device specific reset.  This is not 100%
      reliable though since it depends on the incoming state of the device,
      but it substantially improves the usability of these devices in a VM.
      
      Credit to Alex Deucher <alexander.deucher@amd.com> for his guidance.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      5655f931
    • A
      vfio-pci: Fix error path sign · c6d231e2
      Alex Williamson 提交于
      This is an impossible error path due to the fact that we're reading a
      kernel provided, rather than user provided link, which will certainly
      always fit in PATH_MAX.  Currently it returns a fixed 26 char path
      plus %d group number, which typically maxes out at double digits.
      However, the caller of the initfn certainly expects a less-than zero
      return value on error, not just a non-zero value.  Therefore we
      should correct the sign here.
      Reported-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      c6d231e2
    • A
      vfio-pci: Further fix BAR size overflow · 07ceaf98
      Alex Williamson 提交于
      In an analysis by Laszlo, the resulting type of our calculation for
      the end of the MSI-X table, and thus the start of memory after the
      table, is uint32_t.  We're therefore not correctly preventing the
      corner case overflow that we intended to fix here where a BAR >=4G
      could place the MSI-X table to end exactly at the 4G boundary.  The
      MSI-X table offset is defined by the hardware spec to 32bits, so we
      simply use a cast rather than changing data structure types.  This
      scenario is purely theoretically, typically the MSI-X table is located
      at the front of the BAR.
      Reported-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      07ceaf98
  2. 28 4月, 2015 13 次提交
  3. 27 4月, 2015 7 次提交
  4. 26 4月, 2015 17 次提交