iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* IOMMU software bounce buffers and their overhead
@ 2023-06-03 16:49 Chathura Rajapaksha
  2023-06-06  2:15 ` Baolu Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Chathura Rajapaksha @ 2023-06-03 16:49 UTC (permalink / raw)
  To: iommu

Hi All,

I have a few questions about IOMMU software bounce buffering.
Description of the kernel config IOMMU_DEFAULT_DMA_STRICT mentions that,
"Untrusted devices always use this mode, with an additional layer of
bounce-buffering such that they cannot gain access to any unrelated data
within a mapped page.".

What I am trying to do:
What I understood from the above description is that the STRICT mode
provides an additional layer of security for the hardware IOMMU.
I want to measure the overhead of this additional layer of protection
(software bounce buffers).

My questions are:
1. Is my understanding correct regarding the software bounce buffers
being used alongside hardware IOMMU, or do software bounce buffers replace
the hardware IOMMU?

2. Are untrusted PCI devices use SW bounce buffers by default in the upstream
kernel?

3. Are there already available numbers for the performance/memory overhead
of software bounce buffers?

3. How can I enable/disable software bounce buffers without
enabling/disabling strict IOTLB invalidations?
Details:
Since I want to measure the overhead of SW bounce buffers, I want to
know if there is a way to enable/disable only the bounce buffers while
keeping all other configurations the same. Any suggestions on how to
properly measure the overhead is welcome.

I tried to find answers to these questions in kernel mailing lists and
documentation but I could not find the exact answers.
References I looked at so far:
https://www.kernel.org/doc/Documentation/x86/x86_64/boot-options.txt
https://www.kernel.org/doc/html/v6.3/admin-guide/kernel-parameters.html
https://lore.kernel.org/lkml/20190730045229.3826-9-baolu.lu@linux.intel.com/T/
https://lwn.net/Articles/786558/

I really appreciate any help on this. Thank you in advance.

Regards,
Chathura

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-10 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-03 16:49 IOMMU software bounce buffers and their overhead Chathura Rajapaksha
2023-06-06  2:15 ` Baolu Lu
2023-06-10 20:50   ` Chathura Rajapaksha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).