HomeFreeBSD

vmm: Initialize AMD IOMMU command buffers

Description

vmm: Initialize AMD IOMMU command buffers

The driver communicates with the AMD IOMMU by writing to the tail of a
fixed length command ring buffer. After issuing cmd_max commands, the
tail pointer wraps back to the beginning of the ring buffer. Now, each
command buffer entry will contain content from previous commands which
may set bits in fields marked as Reserved for the current command. In
some cases, the hardware will return an ILLEGAL_COMMAND_ERROR event when
this occurs.

Fix is to memset the command buffer prior to use.

PR: 270966
Reviewed by: corvink, kib, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53692

Details

Provenance
chuckAuthored on Nov 12 2025, 3:39 PM
Reviewer
corvink
Differential Revision
D53692: vmm: Initialize AMD IOMMU command buffers
Parents
rG7bcd3a04c869: dtrace_priv.4: Document the DTrace priv provider
Branches
Unknown
Tags
Unknown