From: Christoph Hellwig <hch@infradead.org>
To: Chao Gao <chao.gao@intel.com>
Cc: Dongli Zhang <dongli.zhang@oracle.com>,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
hch@infradead.org, m.szyprowski@samsung.com,
robin.murphy@arm.com, jxgao@google.com, konrad.wilk@oracle.com
Subject: Re: [PATCH v2] swiotlb: avoid potential left shift overflow
Date: Mon, 22 Aug 2022 04:17:01 -0700 [thread overview]
Message-ID: <YwNlrVUYAC/pDmYX@infradead.org> (raw)
In-Reply-To: <YwA8DttmM7wgYuHv@gao-cwp>
On Sat, Aug 20, 2022 at 09:42:38AM +0800, Chao Gao wrote:
> In an internal effort to measure the impact of swiotlb size to IO
> performance of confidential VM (e.g., TDX VM), we simply added
> SWIOTLB_ANY to the default io_tlb_mem to lift the restriction on swiotlb
> size. Then we hit this issue and worked out this fix. I posted this
> fix because I think the fix by itself is helpful because it removes the
> implicit dependency of the left-shift in slot_addr() on swiotlb size and
> then someone trying to lift the size limitation won't hit the same issue.
SWIOTLB_ANY is used for real, so I think this is a legitimate fix.
I'll apply it.
next prev parent reply other threads:[~2022-08-22 11:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 8:45 Chao Gao
2022-08-19 13:44 ` Dongli Zhang
2022-08-20 1:42 ` Chao Gao
2022-08-20 2:50 ` Dongli Zhang
2022-08-22 11:17 ` Christoph Hellwig [this message]
2022-09-07 8:39 ` Christoph Hellwig
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=YwNlrVUYAC/pDmYX@infradead.org \
--to=hch@infradead.org \
--cc=chao.gao@intel.com \
--cc=dongli.zhang@oracle.com \
--cc=iommu@lists.linux.dev \
--cc=jxgao@google.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.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
all inboxes | Powered by JetHome®