HomeFreeBSD

iommu_gas: initialize start_gap as first node

Description

iommu_gas: initialize start_gap as first node

In iommu_gas.c, domain->start_gap points to one of the nodes on either
side of the first free, unallocated range. In iommu_gas_init_domain,
it is initialized to point to the node after the single free
range. Change it to point to the node before that free range, so that,
when 'lowaddr' is within the initial free range, the first allocation
search for free space below 'lowaddr' does not begin and end at an
address above 'lowaddr'. This fixes problems on a machine with Intel
DMAR enabled.

Reported by: jah
Reviewed by: dougm
Tested by: jah
Obtained from: jah
Fixes: commit db151ca0c343531256b8839f938a4ecbd8b4fd7e iommu_gas: start space search from 1st free space
MFC after: 1 day

(cherry picked from commit 87d405eab91169e0b650a7dd2e5097c0b990fac5)

Details

Provenance
dougmAuthored on Feb 8 2023, 5:04 PM
Parents
rGc592a3b0ae98: atrtc: expose power loss as sysctl
Branches
Unknown
Tags
Unknown