CHAPTER 06
6. IOMMU interrupt remapping과 가상 APIC 경계를 읽는다
remappable MSI format, IRTE의 source validation, destination/vector와 posted interrupt descriptor를 device Requester ID부터 host/guest LAPIC까지 추적합니다.
IRTE
interrupt source와 destination/vector를 remapper가 검증·변환합니다.
source validation
Requester ID가 허용된 entry와 일치하지 않으면 fault가 납니다.
posted interrupt
가상 CPU가 실행 중일 때 notification과 PIR을 이용해 VM exit를 줄일 수 있습니다.
remap invalidate
IRTE 변경 후 interrupt-entry cache invalidation이 필요할 수 있습니다.
레지스터·번호·소유권 대조
| 항목 | 소유자 | 값의 의미 | 정상 증거 | 오류 해석 |
|---|---|---|---|---|
| IRTA/root config | IOMMU | interrupt remap table base | enabled와 aligned base | remapper off/table 오류 |
| IRTE | IOMMU | present, source, vector, destination | MSI/IOAPIC source와 일치 | fault/wrong target |
| fault record | IOMMU | source validation/index 오류 | 정상 0 | Requester/index 문제 |
| posted descriptor PIR | virtualization | guest pending vector | device 사건과 bit 일치 | notification/guest delivery |
| guest APIC state | vLAPIC | IRR/ISR/EOI | host translation과 일치 | virtual completion |
실패 경계 판정
| 증상 | 직전 통과 | 우선 확인 | 반증 시험 | 판정 |
|---|---|---|---|---|
| remap on에서만 MSI 실패 | remap off 정상 | IRTE present/source | fault log와 entry index | remapper programming |
| 다른 device가 fault | target device 정상 | Requester ID alias | PCI requester/ACS topology 확인 | source validation |
| guest latency만 큼 | host MSI 정상 | posted interrupt/VM exit | posted on/off trace | virtual delivery |
| vCPU 이동 중 loss | steady state 정상 | IRTE/posted descriptor target | migration sequence 시험 | 가상 affinity |
| EOI 후 재진입 | guest handler 실행 | virtual EOI/device clear | host/guest ISR와 status 비교 | 완료 propagation |
실제 검증 절차
| 순서 | 실행 | 남길 증거 | 판정 목적 |
|---|---|---|---|
| 1 | Requester ID→IRTE index→destination/vector를 표로 만듭니다. | remap ledger | translation 확인 |
| 2 | IOMMU fault를 MSI 사건과 timestamp로 맞춥니다. | source/index 증거 | 실패 판정 |
| 3 | posted interrupt on/off에서 VM exit와 latency를 비교합니다. | 경로 차이 | 가상화 검증 |
| 4 | vCPU migration 중 sequence interrupt를 보냅니다. | loss/duplicate 0 | target update |
주의interrupt remapping fault를 일반 DMA translation fault와 섞지 않습니다. 별도 fault reason과 source ID를 보존합니다.
공개적으로 다시 확인할 수 있는 자료
공개되지 않은 vendor register나 integration별 offset을 추측해서 채우지 않았습니다. 아래 제조사 자료, architecture 문서와 Linux v6.18.37 원본에서 다시 확인할 수 있는 범위만 사용했습니다.
Intel 64 and IA-32 SDM
Local APIC, x2APIC, interrupt/exception과 virtualization
Linux APIC code
APIC mode 선택과 초기화
Linux IOAPIC code
GSI와 redirection entry 관리
Linux vector allocator
CPU별 vector 할당과 이동