The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	xen-devel@lists.xenproject.org,
	Jan Vejvalka <jan.vejvalka@lfmotol.cuni.cz>,
	linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH 1/2] xen/swiotlb: relax alignment requirements
Date: Wed, 12 Feb 2025 12:04:24 +0100	[thread overview]
Message-ID: <f6822b63-ebda-4134-b91e-b189006d072a@suse.com> (raw)
In-Reply-To: <5255102c-de9f-4cd8-8311-5d5b5eb26832@suse.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 860 bytes --]

On 12.02.25 07:53, Jan Beulich wrote:
> On 11.02.2025 13:04, Juergen Gross wrote:
>> When mapping a buffer for DMA via .map_page or .map_sg DMA operations,
>> there is no need to check the machine frames to be aligned according
>> to the mapped areas size. All what is needed in these cases is that the
>> buffer is contiguous at machine level.
> 
> Is this really true in all cases? Can't e.g. compound pages make it here,
> with the caller then still being permitted to assume higher than page
> alignment? Alignment checking in xen_swiotlb_map_page() would perhaps
> need doing with the base address of the incoming page, i.e. excluding
> the incoming offset.

The DMA interfaces in question (.map_page and .map_sg) are explicitly
designed for DMA streaming mode. I don't think streaming mode requires a
special page alignment.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2025-02-12 11:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 12:04 [PATCH 0/2] xen/swiotlb: one fix and one optimization Juergen Gross
2025-02-11 12:04 ` [PATCH 1/2] xen/swiotlb: relax alignment requirements Juergen Gross
2025-02-12  1:23   ` Stefano Stabellini
2025-02-12  6:53   ` Jan Beulich
2025-02-12 11:04     ` Jürgen Groß [this message]
2025-02-11 12:04 ` [PATCH 2/2] xen/swiotlb: don't destroy contiguous region in all cases Juergen Gross
2025-02-12  1:30   ` Stefano Stabellini
2025-02-12 11:15     ` Jürgen Groß
2025-02-12 21:14       ` Stefano Stabellini
2025-02-12  7:38   ` Jan Beulich
2025-02-12 11:11     ` Jürgen Groß
2025-02-12 11:49       ` Jan Beulich

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=f6822b63-ebda-4134-b91e-b189006d072a@suse.com \
    --to=jgross@suse.com \
    --cc=iommu@lists.linux.dev \
    --cc=jan.vejvalka@lfmotol.cuni.cz \
    --cc=jbeulich@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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