Page MenuHomeFreeBSD

vmm: Fix AMD-vi using wrong rid range
ClosedPublic

Authored by khng on Jun 20 2021, 11:39 AM.
Tags
None
Referenced Files
F82797083: D30827.id92131.diff
Thu, May 2, 4:39 PM
F82797080: D30827.id.diff
Thu, May 2, 4:39 PM
F82797076: D30827.id92146.diff
Thu, May 2, 4:39 PM
F82797073: D30827.id91134.diff
Thu, May 2, 4:39 PM
F82797071: D30827.id91133.diff
Thu, May 2, 4:39 PM
F82797068: D30827.id91997.diff
Thu, May 2, 4:39 PM
F82797067: D30827.id91141.diff
Thu, May 2, 4:39 PM
Unknown Object (File)
Tue, Apr 30, 8:31 PM

Details

Summary

The ACPI parsing code around rid range was wrong on assuming there is
only one pair of start/end device id range. Besides, ivhd_dev_parse()
never work as supposed. The start/end rid info was always zero.

Restructure the code to build dynamic-sized tables for each IOMMU softc
holding device entries. The device entries are enumerated to find a
suitable IOMMU unit. Operations on devices not governed (e.g. the IOMMU
unit itself) are no-op from now on. There are also a minor fix on wrong
%b formatting string usage.

Tested on my EPYC 7282.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

khng requested review of this revision.Jun 20 2021, 11:39 AM

Handle ACPI_IVRS_TYPE_ALL as well.

sys/amd64/vmm/amd/amdvi_hw.c
1218

Hmmm, rev 3.* has been out for a while now: might be time to update spec references (just an fyi, not necessary for this review).

sys/amd64/vmm/amd/ivrs_drv.c
190

Test (or assignment) inverted ?

This revision is now accepted and ready to land.Jul 13 2021, 7:33 AM
This revision was automatically updated to reflect the committed changes.