qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 07ceaf: vfio-pci: Further fix BAR size overfl


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 07ceaf: vfio-pci: Further fix BAR size overflow
Date: Thu, 30 Apr 2015 02:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 07ceaf98800519ef9c5dc893af00f1fe1f9144e4
      
https://github.com/qemu/qemu/commit/07ceaf98800519ef9c5dc893af00f1fe1f9144e4
  Author: Alex Williamson <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio-pci: Further fix BAR size overflow

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: Laszlo Ersek <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: c6d231e2fd3773ef9a566ca24962f2314cb78f73
      
https://github.com/qemu/qemu/commit/c6d231e2fd3773ef9a566ca24962f2314cb78f73
  Author: Alex Williamson <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio-pci: Fix error path sign

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: Laszlo Ersek <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 5655f931abcfa5f100d12d021eaed606c2d4ef52
      
https://github.com/qemu/qemu/commit/5655f931abcfa5f100d12d021eaed606c2d4ef52
  Author: Alex Williamson <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio-pci: Reset workaround for AMD Bonaire and Hawaii GPUs

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 <address@hidden> for his guidance.

Signed-off-by: Alex Williamson <address@hidden>


  Commit: 52b7aba62f02cf90f57ee7e02f67d2d8445e7e40
      
https://github.com/qemu/qemu/commit/52b7aba62f02cf90f57ee7e02f67d2d8445e7e40
  Author: Peter Maydell <address@hidden>
  Date:   2015-04-28 (Tue, 28 Apr 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150428.0' 
into staging

VFIO updates
 - Correction to BAR overflow
 - Fix error sign
 - Reset workaround for AMD Bonaire & Hawaii GPUs

# gpg: Signature made Tue Apr 28 18:26:43 2015 BST using RSA key ID 3BB08B22
# gpg: Good signature from "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"

* remotes/awilliam/tags/vfio-update-20150428.0:
  vfio-pci: Reset workaround for AMD Bonaire and Hawaii GPUs
  vfio-pci: Fix error path sign
  vfio-pci: Further fix BAR size overflow

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/a9392bc93c86...52b7aba62f02

reply via email to

[Prev in Thread] Current Thread [Next in Thread]