]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: ensure completer aborts are marked as non-fatal after a resume
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 15 Oct 2018 19:18:28 +0000 (12:18 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 31 Oct 2018 17:37:32 +0000 (10:37 -0700)
commit1fc37198c63880f5e1d61e5486502a0aba8b1d55
tree5df4195fe9d70058325dd73acc61a0cc30453e57
parent3fad80dce659b837311c3905fd1868f3907b094c
fm10k: ensure completer aborts are marked as non-fatal after a resume

VF drivers can trigger PCIe completer aborts any time they read a queue
that they don't own. Even in nominal circumstances, it is not possible
to prevent the VF driver from reading queues it doesn't own. VF drivers
may attempt to read queues it previously owned, but which it no longer
does due to a PF reset.

Normally these completer aborts aren't an issue. However, on some
platforms these trigger machine check errors. This is true even if we
lower their severity from fatal to non-fatal. Indeed, we already have
code for lowering the severity.

We could attempt to mask these errors conditionally around resets, which
is the most common time they would occur. However this would essentially
be a race between the PF and VF drivers, and we may still occasionally
see machine check exceptions on these strictly configured platforms.

Instead, mask the errors entirely any time we resume VFs. By doing so,
we prevent the completer aborts from being sent to the parent PCIe
device, and thus these strict platforms will not upgrade them into
machine check errors.

Additionally, we don't lose any information by masking these errors,
because we'll still report VFs which attempt to access queues via the
FUM_BAD_VF_QACCESS errors.

Without this change, on platforms where completer aborts cause machine
check exceptions, the VF reading queues it doesn't own could crash the
host system. Masking the completer abort prevents this, so we should
mask it for good, and not just around a PCIe reset. Otherwise malicious
or misconfigured VFs could cause the host system to crash.

Because we are masking the error entirely, there is little reason to
also keep setting the severity bit, so that code is also removed.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_iov.c