Skip to content

Commit

Permalink
pci/iov: Remove skiboot VF tracking
Browse files Browse the repository at this point in the history
[ Upstream commit 22057f8 ]

This feature was added a few years ago in response to a request to make
the MaxPayloadSize (MPS) field of a Virtual Function match the MPS of the
Physical Function that hosts it.

The SR-IOV specification states the the MPS field of the VF is "ResvP".
This indicates the VF will use whatever MPS is configured on the PF and
that the field should be treated as a reserved field in the config space
of the VF. In other words, a SR-IOV spec compliant VF should always return
zero in the MPS field.  Adding hacks in OPAL to make it non-zero is...
misguided at best.

Additionally, there is a bug in the way pci_device structures are handled
by VFs that results in a crash on fast-reboot that occurs if VFs are
enabled and then disabled prior to rebooting. This patch fixes the bug by
removing the code entirely. This patch has no impact on SR-IOV support on
the host operating system.

Cc: Sergey Miroshnichenko <s.miroshnichenko@yadro.com>
Cc: skiboot-stable@lists.ozlabs.org
Tested-by: Santwana Samantray <santwana.samantray@in.ibm.com>
Tested-by: Satheesh Rajendran <satheera@in.ibm.com>
[oliver: added tested-bys]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
  • Loading branch information
oohal committed May 9, 2019
1 parent effc8a8 commit 749ce5c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 305 deletions.
2 changes: 1 addition & 1 deletion core/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SUBDIRS += core
CORE_OBJS = relocate.o console.o stack.o init.o chip.o mem_region.o
CORE_OBJS += malloc.o lock.o cpu.o utils.o fdt.o opal.o interrupts.o timebase.o
CORE_OBJS += opal-msg.o pci.o pci-iov.o pci-virt.o pci-slot.o pcie-slot.o
CORE_OBJS += opal-msg.o pci.o pci-virt.o pci-slot.o pcie-slot.o
CORE_OBJS += pci-opal.o fast-reboot.o device.o exceptions.o trace.o affinity.o
CORE_OBJS += vpd.o hostservices.o platform.o nvram.o nvram-format.o hmi.o
CORE_OBJS += console-log.o ipmi.o time-utils.o pel.o pool.o errorlog.o
Expand Down
265 changes: 0 additions & 265 deletions core/pci-iov.c

This file was deleted.

2 changes: 0 additions & 2 deletions core/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <cpu.h>
#include <pci.h>
#include <pci-cfg.h>
#include <pci-iov.h>
#include <pci-slot.h>
#include <pci-quirk.h>
#include <timebase.h>
Expand Down Expand Up @@ -214,7 +213,6 @@ void pci_init_capabilities(struct phb *phb, struct pci_device *pd)
{
pci_init_pcie_cap(phb, pd);
pci_init_aer_cap(phb, pd);
pci_init_iov_cap(phb, pd);
pci_init_pm_cap(phb, pd);
}

Expand Down
37 changes: 0 additions & 37 deletions include/pci-iov.h

This file was deleted.

0 comments on commit 749ce5c

Please sign in to comment.