From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Vineeth Pillai (Google)" <vineeth@bitbyteword.org>
Cc: dmaluka@google.com, shraash@google.com, efremov@linux.com,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/vt-d: set INTEL_IOMMU_FLOPPY_WA depend on BLK_DEV_FD
Date: Tue, 18 Nov 2025 09:42:09 +0800 [thread overview]
Message-ID: <8cc26739-99bf-46bb-bf33-90b4ad0052c0@linux.intel.com> (raw)
In-Reply-To: <20251002161625.1155133-1-vineeth@bitbyteword.org>
On 10/3/25 00:16, Vineeth Pillai (Google) wrote:
> INTEL_IOMMU_FLOPPY_WA workaround was introduced to create direct mappings
> for first 16MB for floppy devices as the floppy drivers were not using
> dma apis. We need not do this direct map if floppy driver is not
> enabled.
>
> INTEL_IOMMU_FLOPPY_WA is generally not a good idea. Iommu will be
> mapping pages in this address range while kernel would also be
> allocating from this range(mostly on memory stress). A misbehaving
> device using this domain will have access to the pages that the
> kernel might be actively using. We noticed this while running a test
> that was trying to figure out if any pages used by kernel is in iommu
> page tables.
>
> This patch reduces the scope of the above issue by disabling the
> workaround when floppy driver is not enabled. But we would still need to
> fix the floppy driver to use dma apis so that we need not do direct map
> without reserving the pages. Or the other option is to reserve this
> memory range in firmware so that kernel will not use the pages.
>
> Fixes: d850c2ee5fe22 ("iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions")
> Fixes: 49a0429e53f2 ("Intel IOMMU: Iommu floppy workaround")
>
> Signed-off-by: Vineeth Pillai (Google)<vineeth@bitbyteword.org>
> ---
> drivers/iommu/intel/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Queued for v6.19-rc1. Thanks!
prev parent reply other threads:[~2025-11-18 1:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 16:16 [PATCH] iommu/vt-d: set INTEL_IOMMU_FLOPPY_WA depend on BLK_DEV_FD Vineeth Pillai (Google)
2025-11-18 1:42 ` Baolu Lu [this message]
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=8cc26739-99bf-46bb-bf33-90b4ad0052c0@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dmaluka@google.com \
--cc=efremov@linux.com \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=shraash@google.com \
--cc=vineeth@bitbyteword.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