From: Michael Ellerman <mpe@ellerman•id.au>
To: Oliver O'Halloran <oohall@gmail•com>, Bjorn Helgaas <helgaas@kernel•org>
Cc: Alexey Kardashevskiy <aik@ozlabs•ru>,
linuxppc-dev <linuxppc-dev@lists•ozlabs.org>,
Shawn Anastasio <shawn@anastas•io>,
linux-pci@vger•kernel.org
Subject: Re: [PATCH 1/3] powernv/iov: Ensure the pdn for VFs always contains a valid PE number
Date: Fri, 11 Oct 2019 19:27:09 +1100 [thread overview]
Message-ID: <8736fzwuua.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <CAOSf1CH0hmhrDNpi0TVeGD2uKfcEnv8+hd_z+KLuL-4=sOVeeA@mail.gmail.com>
"Oliver O'Halloran" <oohall@gmail•com> writes:
> On Tue, Oct 1, 2019 at 3:09 AM Bjorn Helgaas <helgaas@kernel•org> wrote:
>> On Mon, Sep 30, 2019 at 12:08:46PM +1000, Oliver O'Halloran wrote:
>> This is all powerpc, so I assume Michael will handle this. Just
>> random things I noticed; ignore if they don't make sense:
>>
>> > On PowerNV we use the pcibios_sriov_enable() hook to do two things:
>> >
>> > 1. Create a pci_dn structure for each of the VFs, and
>> > 2. Configure the PHB's internal BARs that map MMIO ranges to PEs
>> > so that each VF has it's own PE. Note that the PE also determines
>>
>> s/it's/its/
>>
>> > the IOMMU table the HW uses for the device.
>> >
>> > Currently we do not set the pe_number field of the pci_dn immediately after
>> > assigning the PE number for the VF that it represents. Instead, we do that
>> > in a fixup (see pnv_pci_dma_dev_setup) which is run inside the
>> > pcibios_add_device() hook which is run prior to adding the device to the
>> > bus.
>> >
>> > On PowerNV we add the device to it's IOMMU group using a bus notifier and
>>
>> s/it's/its/
>>
>> > in order for this to work the PE number needs to be known when the bus
>> > notifier is run. This works today since the PE number is set in the fixup
>> > which runs before adding the device to the bus. However, if we want to move
>> > the fixup to a later stage this will break.
>> >
>> > We can fix this by setting the pdn->pe_number inside of
>> > pcibios_sriov_enable(). There's no good to avoid this since we already have
>>
>> s/no good/no good reason/ ?
>>
>> Not quite sure what "this" refers to ... "no good reason to avoid
>> setting pdn->pe_number in pcibios_sriov_enable()"? The double
>> negative makes it a little hard to parse.
>
> I agree it's a bit vague, I'll re-word it.
So I'm expecting a v2?
cheers
next prev parent reply other threads:[~2019-10-11 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 2:08 IOMMU group creation for pseries hotplug, and powernv VFs Oliver O'Halloran
2019-09-30 2:08 ` [PATCH 1/3] powernv/iov: Ensure the pdn for VFs always contains a valid PE number Oliver O'Halloran
2019-09-30 17:09 ` Bjorn Helgaas
2019-10-01 1:33 ` Oliver O'Halloran
2019-10-11 8:27 ` Michael Ellerman [this message]
2019-10-01 5:39 ` Alexey Kardashevskiy
2019-09-30 2:08 ` [PATCH 2/3] powerpc/pci: Fix pcibios_setup_device() ordering Oliver O'Halloran
2019-10-01 5:39 ` Alexey Kardashevskiy
2019-09-30 2:08 ` [PATCH 3/3] powerpc/pci: Remove pcibios_setup_bus_devices() Oliver O'Halloran
2019-10-01 5:40 ` Alexey Kardashevskiy
2019-10-01 7:39 ` IOMMU group creation for pseries hotplug, and powernv VFs Shawn Anastasio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736fzwuua.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=aik@ozlabs$(echo .)ru \
--cc=helgaas@kernel$(echo .)org \
--cc=linux-pci@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=oohall@gmail$(echo .)com \
--cc=shawn@anastas$(echo .)io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox