HomeFreeBSD

AMD-vi: Fortify IVHD device_identify process

Description

AMD-vi: Fortify IVHD device_identify process

  • Use malloc(9) to allocate ivhd_hdrs list. The previous assumption that there are at most 10 IVHDs in a system is not true. A counter example would be a system with 4 IOMMUs, and each IOMMU is related to IVHDs type 10h, 11h and 40h in the ACPI IVRS table.
  • Always scan through the whole ivhd_hdrs list to find IVHDs that has the same DeviceId but less prioritized IVHD type.

Sponsored by: The FreeBSD Foundation
MFC with: 74ada297e897
Reviewed by: grehan
Approved by: lwhsu (mentor)
Differential Revision: https://reviews.freebsd.org/D29525

(cherry picked from commit 6fe60f1d5c39c94fc87534e9dd4e9630594e0bec)

Details

Provenance
khngAuthored on Apr 19 2021, 8:07 AM
Reviewer
grehan
Differential Revision
D29525: AMD-vi: Fortify IVHD device_identify process
Parents
rG877ba067c0fb: vmm: Bump vmname buffer in struct vm to VM_MAX_NAMELEN + 1
Branches
Unknown
Tags
Unknown