From: Logan Gunthorpe <logang@deltatee.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>,
dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Subject: Re: [PATCH v1 1/5] PCI/P2PDMA: Don't enforce ACS check for functions of same device
Date: Tue, 15 Oct 2024 11:45:09 -0600 [thread overview]
Message-ID: <eddb423c-945f-40c9-b904-43ea8371f1c4@deltatee.com> (raw)
In-Reply-To: <20241012024524.1377836-2-vivek.kasireddy@intel.com>
On 2024-10-11 20:40, Vivek Kasireddy wrote:
> Functions of the same PCI device (such as a PF and a VF) share the
> same bus and have a common root port and typically, the PF provisions
> resources for the VF. Therefore, they can be considered compatible
> as far as P2P access is considered.
>
> Currently, although the distance (2) is correctly calculated for
> functions of the same device, an ACS check failure prevents P2P DMA
> access between them. Therefore, introduce a small function named
> same_pci_device_functions() to determine if the provider and
> client belong to the same device and facilitate P2P DMA between
> them by not enforcing the ACS check.
I'm not totally opposed to this. But the current code was done this way
for a reason: we can't be sure that functions on any given device can
talk to each other. So this change may break if used with other devices
with multiple functions that can't talk to each other.
That being said, the only alternative I can think of is another list of
allowed devices. However, given the pain it's been maintaining allowed
root ports, I'm not very enthusiastic about creating another list of
allowed devices in the kernel.
Logan
next prev parent reply other threads:[~2024-10-15 18:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 2:40 [PATCH v1 0/5] drm/xe/sriov: Don't migrate dmabuf BO to System RAM while running in VM Vivek Kasireddy
2024-10-12 2:40 ` [PATCH v1 1/5] PCI/P2PDMA: Don't enforce ACS check for functions of same device Vivek Kasireddy
2024-10-15 17:45 ` Logan Gunthorpe [this message]
2024-10-16 5:29 ` Kasireddy, Vivek
2024-10-16 19:29 ` Logan Gunthorpe
2024-10-12 2:40 ` [PATCH v1 2/5] drm/xe/dmabuf: Don't migrate BO to System RAM while running in VF mode Vivek Kasireddy
2024-10-12 2:40 ` [PATCH v1 3/5] drm/xe/pf: Add a helper function to get a VF's starting address in LMEM Vivek Kasireddy
2024-10-12 2:40 ` [PATCH v1 4/5] drm/xe/bo: Create a new sg for dmabuf BOs that are associated with a VF Vivek Kasireddy
2024-10-12 4:17 ` Matthew Brost
2024-10-16 5:41 ` Kasireddy, Vivek
2024-10-20 18:06 ` Matthew Brost
2024-10-12 2:40 ` [PATCH v1 5/5] drm/xe/pt: Add an additional check for dmabuf BOs while updating PTEs Vivek Kasireddy
2024-10-20 18:25 ` Matthew Brost
2024-10-12 3:16 ` ✓ CI.Patch_applied: success for drm/xe/sriov: Don't migrate dmabuf BO to System RAM while running in VM Patchwork
2024-10-12 3:16 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-12 3:18 ` ✓ CI.KUnit: success " Patchwork
2024-10-12 3:34 ` ✓ CI.Build: " Patchwork
2024-10-12 3:36 ` ✓ CI.Hooks: " Patchwork
2024-10-12 3:38 ` ✗ CI.checksparse: warning " Patchwork
2024-10-12 4:17 ` ✗ CI.BAT: failure " Patchwork
2024-10-12 9:27 ` ✗ CI.FULL: " Patchwork
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=eddb423c-945f-40c9-b904-43ea8371f1c4@deltatee.com \
--to=logang@deltatee.com \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-pci@vger.kernel.org \
--cc=vivek.kasireddy@intel.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