← Interrupt 상세 목차DUJINLABS.COM

Hardware · Interrupt detailed manual 05 · Linux v6.18.37

5. MSI/MSI-X table에서 LAPIC vector까지 message를 해석한다

PCI capability의 enable, multiple message, MSI-X table/PBA, message address/data와 mask를 읽고 destination APIC ID, delivery mode와 vector를 Linux irqdomain mapping까지 연결합니다.

상세 표
2
검증 행
14
절차
4 checkpoints
기준
x86 APIC · IOAPIC · MSI · Linux v6.18.37

CHAPTER 05

5. MSI/MSI-X table에서 LAPIC vector까지 message를 해석한다

PCI capability의 enable, multiple message, MSI-X table/PBA, message address/data와 mask를 읽고 destination APIC ID, delivery mode와 vector를 Linux irqdomain mapping까지 연결합니다.

MSI

config capability에 message address/data를 저장하며 여러 vector encoding은 capability에 따라 제한됩니다.

MSI-X

BAR의 table entry마다 address/data/vector control이 있고 PBA가 pending을 보존합니다.

message write

장치가 특정 address/data memory write를 발행하는 것이 interrupt입니다.

ordering

device completion data와 MSI write ordering은 장치/bus 계약에 따라 handler visibility에 영향을 줍니다.

레지스터·번호·소유권 대조

항목소유자값의 의미정상 증거오류 해석
MSI controlPCI configenable, 64-bit, multiple messages할당 vector 수와 일치capability programming
MSI address/dataPCI configdestination/vector/deliveryLinux vector와 target 일치wrong APIC target
MSI-X tableBAR memoryentry address/data/mask사용 entry unmaskedtable BAR/offset 오류
MSI-X PBABAR memorymasked pendingunmask 후 전달pending 고정
device status/maskdevicequeue completion과 source enablevector와 queue mapping 일치message 자체 미발생

실패 경계 판정

증상직전 통과우선 확인반증 시험판정
device completion, MSI write 없음queue status setdevice interrupt enable/table maskpoll mode와 table readbackdevice source
MSI write, LAPIC IRR 없음bus analyzer/IOMMU 확인address/data/remapperself MSI 또는 remap faultmessage routing
한 vector만 동작MSI enablemulti-message encoding/queue mapvector별 table/capability 비교vector programming
MSI-X unmask 후 stormPBA pendingdevice status ackmask 상태에서 source clear장치 원인
affinity 후 wrong CPUvector 동작table message update/remapmessage data와 vector_cfg 비교migration update
그림 1. 5. MSI/MSI-X table에서 LAPIC vector까지 message를 해석한다의 실행 순서왼쪽에서 오른쪽으로 실제 소유권과 관찰 지점이 이동합니다.
01 device status
02 interrupt enable
03 MSI/MSI-X message
04 PCIe memory write
05 interrupt remapper optional
06 LAPIC IRR
07 IDT vector
08 driver handler

실제 검증 절차

순서실행남길 증거판정 목적
1capability와 table entry를 raw/decoded로 저장합니다.vector별 messageprogramming 확인
2queue→MSI-X entry→virq→CPU/vector를 연결합니다.vector ledgermapping 검증
3mask/PBA/unmask 시나리오로 pending 보존을 시험합니다.PBA lifecycletable 동작
4affinity 이동 중 message와 count를 capture합니다.target 전환loss/duplicate 검증

주의MSI-X table은 device BAR에 있으며 일반 RAM처럼 cacheable mapping하면 안 됩니다. kernel MMIO accessor와 ordering을 사용합니다.

공개적으로 다시 확인할 수 있는 자료

공개되지 않은 vendor register나 integration별 offset을 추측해서 채우지 않았습니다. 아래 제조사 자료, architecture 문서와 Linux v6.18.37 원본에서 다시 확인할 수 있는 범위만 사용했습니다.