Page MenuHomeFreeBSD

DMAR2IODOM
ClosedPublic

Authored by br on Aug 3 2020, 1:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 6, 2:44 PM
Unknown Object (File)
Mon, May 6, 8:15 AM
Unknown Object (File)
Sun, May 5, 10:06 PM
Unknown Object (File)
Sat, May 4, 12:55 PM
Unknown Object (File)
Sun, Apr 28, 11:47 AM
Unknown Object (File)
Sat, Apr 27, 5:32 PM
Unknown Object (File)
Wed, Apr 24, 1:24 AM
Unknown Object (File)
Feb 13 2024, 6:49 AM
Subscribers

Details

Summary

o Add DMAR2IODOM() macro;
o Add IODOM2DMAR() macro.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br requested review of this revision.Aug 3 2020, 1:30 PM
br created this revision.

Basically I want to get rid of all conversion relying on the layout. And add macros for common conversions e.g. from domain to dmar unit etc.

sys/x86/iommu/intel_ctx.c
181

Can you add CTX2DMARDOM ?

182

This expression should be macro-ified as well (domain->dmar unit)

sys/x86/iommu/intel_dmar.h
94

I want this to look like &((domain)->iodom), i.e. stop relying on the dmar_domain layout whre iodom is the first member.

95

And this would be __container_of((iodom), struct dmar_domain, iodom). Unless I mixed arg order.

Add macroses:

DMAR2IOMMU()
IOMMU2DMAR()

DOM2IODOM()
IODOM2DOM()

CTX2IOCTX()
IOCTX2CTX()

kib added inline comments.
sys/dev/iommu/iommu_gas.c
177

Commit these assert improvements for gas.c separately.

sys/x86/iommu/intel_ctx.c
339

Do we want a constructor and destructor for iommu_domain ? I believe it makes sense.

This revision is now accepted and ready to land.Aug 4 2020, 8:24 PM