Re: [PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars

2017-12-20 Thread Juan Alvarez
On 12/19/17 12:38 AM, Alexey Kardashevskiy wrote: > On 19/12/17 06:29, Juan Alvarez wrote: >> This is PF only path. Yes either we have a root returned otherwise >> will fall back to iomem_resource. > You have removed context from my response, do not do that please. My apolog

Re: [PATCH v2 2/7] powerpc/kernel: Add uevents in EEH error/resume

2017-12-20 Thread Juan Alvarez
On 12/19/17 12:27 AM, Benjamin Herrenschmidt wrote: > On Mon, 2017-12-18 at 22:50 -0600, Bjorn Helgaas wrote: >> [+cc Keith, Gabriele, Dongdong] >> >> On Mon, Dec 18, 2017 at 04:38:03PM -0600, Bryant G. Ly wrote: >>> Devices can go offline when EEH is reported. This patch adds >>> a change to the

Re: [PATCH v2 2/7] powerpc/kernel: Add uevents in EEH error/resume

2017-12-20 Thread Juan Alvarez
On 12/18/17 10:59 PM, Russell Currey wrote: > On Mon, 2017-12-18 at 22:50 -0600, Bjorn Helgaas wrote: >> [+cc Keith, Gabriele, Dongdong] >> >> On Mon, Dec 18, 2017 at 04:38:03PM -0600, Bryant G. Ly wrote: >>> Devices can go offline when EEH is reported. This patch adds >>> a change to the kernel o

Re: [PATCH v1 7/7] pseries/setup: Add Initialization of VF Bars

2017-12-18 Thread Juan Alvarez
This is PF only path. Yes either we have a root returned otherwise will fall back to iomem_resource. On 12/18/17 1:21 AM, Alexey Kardashevskiy wrote: > @dev here is a VF, right? I am not familiar with powervn much but from what > I see - the devices are sitting on a root bus of their own PHB and

Re: [PATCH v1 4/7] powerpc/kernel Add EEH operations to notify resume

2017-12-18 Thread Juan Alvarez
Yes, way less. So our current design only supports less than or equal to 256 VFs per PF. That is 256*2 bytes. On 12/17/17 11:02 PM, Alexey Kardashevskiy wrote: > It is kind of assumed that the number of VFs is always less than 2048 minus > rtas call parameters (RTAS_DATA_BUF_SIZE==4096 now)?

Re: [PATCH v1 3/7] platforms/pseries: Set eeh_pe of EEH_PE_VF type

2017-12-18 Thread Juan Alvarez
Here we need to set the config_addr as PHYP (platform) does not enable the PE until the PE is bound to a VM, reason why we disable VF autoprobe. On 12/17/17 10:34 PM, Alexey Kardashevskiy wrote: > powernv does this from eeh_ops::probe, and so does pseries_eeh_probe(), do > you still need this h

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-18 Thread Juan Alvarez
On 10/17/17 8:36 PM, Alexey Kardashevskiy wrote: > PowerNV KVM guest is a pseries machine so this code will execute there. > The configure sriov path will fail and not enable sriov if resources are not met. I.e. the IOV Bar is not set in PF IOV Resources, which in this case gets assigned by firmwar

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-17 Thread Juan Alvarez
On 10/17/17 1:52 PM, Bjorn Helgaas wrote: > Right. But that patch isn't really on the path to inclusion (mainly > because it's test framework and doesn't fix a bug or add support for > new hardware or features). I was not aware of this decision and this will cause changes to this patch. > > I'm s

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-17 Thread Juan Alvarez
On 10/17/17 11:26 AM, Bjorn Helgaas wrote: > To pop back up to the top of the stack, I think the main point of this > patch is to keep from binding a driver to the VFs in the kernel that > set PCI_SRIOV_CTRL_VFE. This patch does that by setting > pdev->match_driver to -1 in powerpc-specific code.

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-17 Thread Juan Alvarez
On 10/17/17 8:51 AM, Bjorn Helgaas wrote: > This is where I get confused. I guess the Linux that sets > PCI_SRIOV_CTRL_VFE to enable the VFs can also perform config accesses > to the VFs, since it can enumerate them and build pci_dev structs for > them, right? Correct, we are not changing anythi

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-17 Thread Juan Alvarez
On 10/17/17 8:51 AM, Bjorn Helgaas wrote: > This is where I get confused. I guess the Linux that sets > PCI_SRIOV_CTRL_VFE to enable the VFs can also perform config accesses > to the VFs, since it can enumerate them and build pci_dev structs for > them, right? Correct, we are not changing anythin