DMAR: handle affinity for in-memory data structures
(cherry picked from commit 705090cba428525507fd0e8597cbf1cf8a68ae35)