![Page 1: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/1.jpg)
6/17/2011 1
![Page 2: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/2.jpg)
Device
CPU
MemoryChipset
Physical Address Physical Address
6/17/2011 2
Introduction Emulation Evaluation Conclusions
![Page 3: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/3.jpg)
Introduction Emulation Evaluation Conclusions
MMUIOMMU
Main Memory
CPUI/O
Device
I/OVirtualAddress
Physical Address
VirtualAddress
![Page 4: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/4.jpg)
6/17/2011 4
Introduction Emulation Evaluation Conclusions
![Page 5: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/5.jpg)
6/17/2011 5
Introduction Emulation Evaluation Conclusions
![Page 6: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/6.jpg)
6/17/2011 6
Introduction Emulation Evaluation Conclusions
![Page 7: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/7.jpg)
6/17/2011 7
Guest Domain Emulation Domain(Hypervisor)
System Domain
I/O Device
IOMMU
Memory
IOMMU Emulation
Phys. PTEs
I/O Buffer
9. Transaction to IOVA
7. MapIOVAHPA
11. TranslateIOVA
10. IOVA Access
12. HPA Access8. IOTLB Invd.
Mapping Layer
1. Request IOVAfor GPA
I/O DeviceDriver
Emul. PTEs3. Update Mappings (IOVAGPA)
5. Read
4. IOTLB Invd.of IOVA
2. Allocate IOVA
6. Pin pages
Introduction Emulation Evaluation Conclusions
![Page 8: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/8.jpg)
6/17/2011 8
Introduction Emulation Evaluation Conclusions
![Page 9: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/9.jpg)
6/17/2011 9
Introduction Emulation Evaluation Conclusions
![Page 10: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/10.jpg)
6/17/2011 10
Guest
Hypervisor(VMM)
Sidecore(VMM)
Emulated Registers
Write PollEmulate
Done(Write)
Done(Read)
Introduction Emulation Evaluation Conclusions
![Page 11: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/11.jpg)
6/17/2011 11
Introduction Emulation Evaluation Conclusions
![Page 12: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/12.jpg)
6/17/2011 12
Introduction Emulation Evaluation Conclusions
![Page 13: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/13.jpg)
6/17/2011 13
I/O virtual page 1Physical page
I/O virtual page 2
Introduction Emulation Evaluation Conclusions
![Page 14: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/14.jpg)
6/17/2011 14
Introduction Emulation Evaluation Conclusions
![Page 15: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/15.jpg)
6/17/2011 15
Introduction Emulation Evaluation Conclusions
![Page 16: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/16.jpg)
CPU Cycles
SW/HW Interaction
Logic Total
Bare-metal 2316 4593 6909
Trap & Emulate 30645 4324 34969
Sidecore 7321 1904 9225
6/17/2011 16
Average breakdown of (un)mapping a single page using the strict invalidation scheme
Introduction Emulation Evaluation Conclusions
![Page 17: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/17.jpg)
Setting Secure(No IOTLB Batching)
Relaxed(Linux Default; IOTLB Batching)
Optimistic(Patched; IOTLB Batching)
Bare-metal 43% 91% 100%
Trap & Emulate 10% 11% 82%
Sidecore 30% 49% 100%
6/17/2011 17
Measuring the Netperf TCP throughput relatively to the maximum attainable (9.3Gbps)
Introduction Emulation Evaluation Conclusions
![Page 18: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/18.jpg)
Setting Secure(No IOTLB Batching)
Relaxed(Linux Default; IOTLB Batching)
Optimistic(Patched; IOTLB Batching)
Bare-metal 84% 92% 94%
Trap & Emulate 38% 39% 56%
Sidecore 61% 63% 66%
6/17/2011 18
Measuring Apache throughput (25 concurrent requests); the baseline fornormalization is 6828 requests per second
Introduction Emulation Evaluation Conclusions
![Page 19: vIOMMU: Efficeint IOMMU Emulation · 11. Translate IOVA 10. IOVA Access 12. HPA Access 8. IOTLB Invd. Mapping Layer 1. Request IOVA for GPA I/O Device Driver Emul. PTEs 3. Update](https://reader034.vdocument.in/reader034/viewer/2022050421/5f9068b1e8e65826e006aa71/html5/thumbnails/19.jpg)
6/17/2011 19
Introduction Emulation Evaluation Conclusions