iommu/vt-d: Preset Access bit for IOVA in FL non-leaf paging entries
Tina Zhang authored
commit 242b0aae upstream.

The A/D bits are preseted for IOVA over first level(FL) usage for both
kernel DMA (i.e, domain typs is IOMMU_DOMAIN_DMA) and user space DMA
usage (i.e., domain type is IOMMU_DOMAIN_UNMANAGED).

Presetting A bit in FL requires to preset the bit in every related paging
entries, including the non-leaf ones. Otherwise, hardware may treat this
as an error. For example, in a case of ECAP_REG.SMPWC==0, DMA faults might
occur with below DMAR fault messages (wrapped for line length) dumped.

 DMAR: DRHD: handling fault status reg 2
 DMAR: [DMA Read NO_PASID] Request device [aa:00.0] fault addr 0x10c3a6000
    [fault reason 0x90]
    SM: A/D bit update needed in first-level entry when set up in no snoop

Fixes: 289b3b00

 ("iommu/vt-d: Preset A/D bits for user space DMA usage")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarTina Zhang <tina.zhang@intel.com>
Link: https://lore.kernel.org/r/202...
c31a792a
Name Last commit Last update
Documentation KVM: s390: pv: don't allow userspace to set the clock under PV
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes"
arch MIPS: Loongson64: Add WARN_ON on kexec related kmalloc failed
block block: sed-opal: kmalloc the cmd/resp buffers
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist
crypto crypto: akcipher - default implementation for setting a private key
drivers iommu/vt-d: Preset Access bit for IOVA in FL non-leaf paging entries
fs cifs: add check for returning value of SMB2_set_info_init
include tracing/ring-buffer: Have polling block on watermark
init stack: Declare {randomize_,}kstack_offset to fix Sparse warnings
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
kernel tracing: kprobe: Fix potential null-ptr-deref on trace_array in kprobe_event_gen_test_exit()
lib lib/Kconfig.debug: Add check for non-constant .{s,u}leb128 support to DWARF5
mm maccess: Fix writing offset in case of fault in strncpy_from_kernel_nofault()
net net/x25: Fix skb leak in x25_lapb_receive_frame()
samples samples/landlock: Format with clang-format
scripts cert host tools: Stop complaining about deprecated OpenSSL functions
security capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
sound ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
tools selftests/intel_pstate: fix build for ARCH=x86_64
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage
virt kvm: Add support for arch compat vm ioctls
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes .gitattributes: use 'dts' diff driver for dts files
.gitignore .gitignore: ignore only top-level modules.builtin
.mailmap mailmap: add Andrej Shadura
COPYING COPYING: state that all contributions really are covered by this file
CREDITS MAINTAINERS: Move Daniel Drake to credits
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y
Kconfig kbuild: ensure full rebuild when the compiler is updated
MAINTAINERS Input: goodix - add a goodix.h header file
Makefile Linux 5.15.79
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.