amd64/vmm.c: Fix an incorrect memory segment check in vm_iommu_{un}map
This change fixes two checks that conflated memory mapping and memory
segment idenitifers. In both cases the code iterates over all memory
mappings but passes the index to vm_memseg_sysmem, which is wrong.
Fix this by passing the memory mapping's segment identifier instead.
Differential Revision: https://reviews.freebsd.org/D54210
Reviewed by: markj
Fixes: c76c2a19ae37
PR: 290920
Approved by: so
Security: FreeBSD-EN-25:20.vmm
(cherry picked from commit f1809eab82a796845f126b703c01d4a31ccf2193)
(cherry picked from commit 4f7436bf297b93fd9e835ffca3d56288ce934dc5)