OS & Hardware
What is the main role of an IOMMU?
- ATranslating CPU instructions into I/O device instructions and executing them
- BAutomatically cutting power to I/O devices while they are idle to save energy
- CTranslating device DMA addresses and blocking illegal access
Show answer and explanation
Answer: C. Translating device DMA addresses and blocking illegal access
Devices using DMA can read and write main memory directly, so a malfunctioning or malicious device could overwrite OS memory. Like an MMU for the CPU, an IOMMU translates device addresses into physical addresses and blocks access outside permitted ranges. It can also present scattered physical memory as contiguous to a device and is used when assigning devices directly to virtual machines. It neither translates instructions nor controls power.
- A. It does not translate instructions.
- B. Power control is handled by other mechanisms.
- C. Correct. It translates and protects device DMA addresses.