From: Bjorn Helgaas <helgaas@kernel.org>
To: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: alex.williamson@redhat.com, bhelgaas@google.com,
schnelle@linux.ibm.com, pmorel@linux.ibm.com, mpe@ellerman.id.au,
oohall@gmail.com, cohuck@redhat.com, kevin.tian@intel.com,
hca@linux.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
kvm@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v5 1/3] PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY
Date: Wed, 16 Sep 2020 16:55:13 -0500 [thread overview]
Message-ID: <20200916215513.GA1588138@bjorn-Precision-5520> (raw)
In-Reply-To: <1599749997-30489-2-git-send-email-mjrosato@linux.ibm.com>
On Thu, Sep 10, 2020 at 10:59:55AM -0400, Matthew Rosato wrote:
> For VFs, the Memory Space Enable bit in the Command Register is
> hard-wired to 0.
>
> Add a new bit to signify devices where the Command Register Memory
> Space Enable bit does not control the device's response to MMIO
> accesses.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> drivers/pci/iov.c | 1 +
> include/linux/pci.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
> index b37e08c..4afd4ee 100644
> --- a/drivers/pci/iov.c
> +++ b/drivers/pci/iov.c
> @@ -180,6 +180,7 @@ int pci_iov_add_virtfn(struct pci_dev *dev, int id)
> virtfn->device = iov->vf_device;
> virtfn->is_virtfn = 1;
> virtfn->physfn = pci_dev_get(dev);
> + virtfn->no_command_memory = 1;
>
> if (id == 0)
> pci_read_vf_config_common(virtfn);
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 8355306..3ff72312 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -445,6 +445,7 @@ struct pci_dev {
> unsigned int is_probed:1; /* Device probing in progress */
> unsigned int link_active_reporting:1;/* Device capable of reporting link active */
> unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */
> + unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */
> pci_dev_flags_t dev_flags;
> atomic_t enable_cnt; /* pci_enable_device has been called */
>
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2020-09-16 22:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 14:59 [PATCH v5 0/3] vfio/pci: Restore MMIO access for s390 detached VFs Matthew Rosato
2020-09-10 14:59 ` [PATCH v5 1/3] PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY Matthew Rosato
2020-09-16 21:55 ` Bjorn Helgaas [this message]
2020-09-10 14:59 ` [PATCH v5 2/3] s390/pci: Mark all " Matthew Rosato
2020-09-10 14:59 ` [PATCH v5 3/3] vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn Matthew Rosato
2020-09-21 12:43 ` Matthew Rosato
2020-09-22 16:40 ` Alex Williamson
2020-09-22 16:57 ` Matthew Rosato
2020-09-23 8:51 ` Pierre Morel
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=20200916215513.GA1588138@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
--cc=pmorel@linux.ibm.com \
--cc=schnelle@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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