refactor: 문서 개선 중
This commit is contained in:
+71
-71
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="985" height="762" viewBox="0 0 985 762" role="img" aria-labelledby="diagram-title diagram-description">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1393" height="690" viewBox="0 0 1393 690" role="img" aria-labelledby="diagram-title diagram-description">
|
||||
<title id="diagram-title">게스트가 하드웨어에 닿는 갈래는 셋이고 깊이가 다르다</title>
|
||||
<desc id="diagram-description">위에서 아래로 읽는다. 맨 위 QEMU 에서 갈래 셋이 갈린다. 왼쪽 CPU 갈래는 KVM_RUN 으로 커널의 KVM 에 들어가고 KVM 이 VM entry 로 물리 CPU 에 올리며 게스트 코드가 VMX non-root 로 거기서 돈다. 물리 CPU 상자에 VM exit 이 함께 적혀 있고 나온 이유는 KVM 상자의 struct kvm_run 으로 유저공간에 돌아간다. 가운데 패스스루 갈래는 QEMU 가 VFIO 로 장치 fd 를 받고 vfio-pci 가 장치를 묶으며 그 장치의 DMA 가 IOMMU 를 지난다. 오른쪽 virtio 갈래는 virtqueue 가 게스트 드라이버에 닿고 같은 virtqueue 를 커널 vhost 와 나누는 길이 따로 있다. 앞의 둘은 이 실험대가 쓰고 패스스루는 쓰지 않는다.</desc>
|
||||
<metadata>{"techviz":{"spec_version":"1.1","id":"cpu-io-passthrough-paths","profile":"component-flow"},"source_context":{"document":"docs/keycloak-session-store/final/document.md","document_sha256":"0ae5674723f25dc85d5069529890f07be1a11b768b56901103fa3ea6ac3dcf55","anchor":{"kind":"heading","value":"이 층 아래의 구조 — 조사한 것","line":1091}},"evidence_policy":"Each factual element cites source lines or is marked assumption.","diagram_only":true}</metadata>
|
||||
<metadata>{"techviz":{"spec_version":"1.1","id":"cpu-io-passthrough-paths","profile":"component-flow"},"source_context":{"document":"docs/keycloak-session-store/final/document.md","document_sha256":"28aef96a2bbb94fbb10ade26a71238fee62a5a4d9fa6e7749ae98cfd0a65e560","anchor":{"kind":"heading","value":"이 층 아래의 구조 — 조사한 것","line":3430}},"evidence_policy":"Each factual element cites source lines or is marked assumption.","diagram_only":true}</metadata>
|
||||
<defs>
|
||||
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M 0 0 L 10 5 L 0 10 z" />
|
||||
@@ -49,91 +49,91 @@
|
||||
.timeline-detail { font-size: 11px; fill: #4b5563; text-anchor: middle; }
|
||||
</style>
|
||||
</defs>
|
||||
<rect class="canvas" width="985" height="762" />
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="400.0,550.0 400.0,598.0 400.0,598.0 400.0,646.0" data-evidence="1111-1112" />
|
||||
<rect class="edge-label-bg" x="374.8" y="584.0" width="98.4" height="22" rx="3" />
|
||||
<text class="edge-label" x="424.0" y="599.0">VMX non-root</text>
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="632.5,533.0 632.5,589.5 610.0,589.5 610.0,646.0" data-evidence="1144-1146" />
|
||||
<rect class="edge-label-bg" x="599.2" y="547.5" width="44.0" height="22" rx="3" />
|
||||
<text class="edge-label" x="621.2" y="562.5">DMA</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="164.0,340.5 164.0,392.8 400.0,392.8 400.0,445.0" data-evidence="1111-1112" />
|
||||
<rect class="edge-label-bg" x="246.2" y="350.8" width="71.6" height="22" rx="3" />
|
||||
<text class="edge-label" x="282.0" y="365.8">VM entry</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="496.0,148.0 496.0,196.0 393.0,196.0 393.0,244.0" data-evidence="1138-1141" />
|
||||
<rect class="edge-label-bg" x="418.8" y="154.0" width="51.5" height="22" rx="3" />
|
||||
<text class="edge-label" x="444.5" y="169.0">장치 fd</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="478.0,148.0 478.0,200.2 164.0,200.2 164.0,252.5" data-evidence="1104-1106" />
|
||||
<rect class="edge-label-bg" x="288.6" y="158.2" width="64.9" height="22" rx="3" />
|
||||
<text class="edge-label" x="321.0" y="173.2">KVM_RUN</text>
|
||||
<polyline class="edge kind-control style-dashed emphasis-normal" points="514.0,148.0 514.0,200.2 603.0,200.2 603.0,252.5" data-evidence="1125-1129" />
|
||||
<rect class="edge-label-bg" x="522.7" y="158.2" width="71.6" height="22" rx="3" />
|
||||
<text class="edge-label" x="558.5" y="173.2">제어 ioctl</text>
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="532.0,148.0 532.0,200.2 839.0,200.2 839.0,252.5" data-evidence="1116-1118,1128-1128" />
|
||||
<rect class="edge-label-bg" x="646.4" y="158.2" width="78.3" height="22" rx="3" />
|
||||
<text class="edge-label" x="685.5" y="173.2">virtqueue</text>
|
||||
<polyline class="edge kind-control style-solid emphasis-normal" points="393.0,349.0 393.0,405.5 632.5,405.5 632.5,462.0" data-evidence="1144-1146" />
|
||||
<rect class="edge-label-bg" x="466.9" y="363.5" width="91.7" height="22" rx="3" />
|
||||
<text class="edge-label" x="512.8" y="378.5">vfio-pci 결합</text>
|
||||
<rect class="canvas" width="1393" height="690" />
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="1038.0,281.0 1118.0,281.0 1118.0,281.0 1198.0,281.0" data-evidence="3450-3451" />
|
||||
<rect class="edge-label-bg" x="1068.8" y="239.0" width="98.4" height="22" rx="3" />
|
||||
<text class="edge-label" x="1118.0" y="254.0">VMX non-root</text>
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="1015.5,441.0 1106.8,441.0 1106.8,424.0 1198.0,424.0" data-evidence="3483-3485" />
|
||||
<rect class="edge-label-bg" x="1108.8" y="418.5" width="44.0" height="22" rx="3" />
|
||||
<text class="edge-label" x="1130.8" y="433.5">DMA</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="676.0,104.0 759.5,104.0 759.5,281.0 843.0,281.0" data-evidence="3450-3451" />
|
||||
<rect class="edge-label-bg" x="747.7" y="178.5" width="71.6" height="22" rx="3" />
|
||||
<text class="edge-label" x="783.5" y="193.5">VM entry</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="321.0,343.5 414.0,343.5 414.0,272.5 507.0,272.5" data-evidence="3477-3480" />
|
||||
<rect class="edge-label-bg" x="412.2" y="294.0" width="51.5" height="22" rx="3" />
|
||||
<text class="edge-label" x="438.0" y="309.0">장치 fd</text>
|
||||
<polyline class="edge kind-request style-solid emphasis-normal" points="321.0,325.5 404.5,325.5 404.5,104.0 488.0,104.0" data-evidence="3443-3445" />
|
||||
<rect class="edge-label-bg" x="396.1" y="200.8" width="64.9" height="22" rx="3" />
|
||||
<text class="edge-label" x="428.5" y="215.8">KVM_RUN</text>
|
||||
<polyline class="edge kind-control style-dashed emphasis-normal" points="321.0,361.5 414.0,361.5 414.0,441.0 507.0,441.0" data-evidence="3464-3468" />
|
||||
<rect class="edge-label-bg" x="402.2" y="387.2" width="71.6" height="22" rx="3" />
|
||||
<text class="edge-label" x="438.0" y="402.2">제어 ioctl</text>
|
||||
<polyline class="edge kind-data style-solid emphasis-normal" points="321.0,379.5 401.0,379.5 401.0,601.0 481.0,601.0" data-evidence="3455-3457,3467-3467" />
|
||||
<rect class="edge-label-bg" x="385.9" y="476.2" width="78.3" height="22" rx="3" />
|
||||
<text class="edge-label" x="425.0" y="491.2">virtqueue</text>
|
||||
<polyline class="edge kind-control style-solid emphasis-normal" points="657.0,272.5 761.2,272.5 761.2,441.0 865.5,441.0" data-evidence="3483-3485" />
|
||||
<rect class="edge-label-bg" x="739.4" y="342.8" width="91.7" height="22" rx="3" />
|
||||
<text class="edge-label" x="785.2" y="357.8">vfio-pci 결합</text>
|
||||
<g id="node-qemu">
|
||||
<rect class="node-shape kind-service emphasis-primary role-source" data-evidence="1102-1108" x="379.5" y="60.0" width="251.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="505.0" y="87.0">QEMU</text>
|
||||
<line class="node-detail-divider" x1="393.5" y1="108.0" x2="616.5" y2="108.0" />
|
||||
<text class="node-detail" x="395.5" y="125.0">/dev/kvm</text>
|
||||
<text class="node-detail" x="395.5" y="141.0">KVM_CREATE_VM · KVM_CREATE_VCPU</text>
|
||||
<rect class="node-shape kind-service emphasis-primary role-source" data-evidence="3441-3447" x="70.0" y="308.5" width="251.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="195.5" y="335.5">QEMU</text>
|
||||
<line class="node-detail-divider" x1="84.0" y1="356.5" x2="307.0" y2="356.5" />
|
||||
<text class="node-detail" x="86.0" y="373.5">/dev/kvm</text>
|
||||
<text class="node-detail" x="86.0" y="389.5">KVM_CREATE_VM · KVM_CREATE_VCPU</text>
|
||||
</g>
|
||||
<g id="node-kvm">
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="1105-1108" x="70.0" y="252.5" width="188.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="164.0" y="279.5">KVM</text>
|
||||
<line class="node-detail-divider" x1="84.0" y1="300.5" x2="244.0" y2="300.5" />
|
||||
<text class="node-detail" x="86.0" y="317.5">struct kvm_run</text>
|
||||
<text class="node-detail" x="86.0" y="333.5">KVM_GET_VCPU_MMAP_SIZE</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="3444-3447" x="488.0" y="60.0" width="188.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="582.0" y="87.0">KVM</text>
|
||||
<line class="node-detail-divider" x1="502.0" y1="108.0" x2="662.0" y2="108.0" />
|
||||
<text class="node-detail" x="504.0" y="125.0">struct kvm_run</text>
|
||||
<text class="node-detail" x="504.0" y="141.0">KVM_GET_VCPU_MMAP_SIZE</text>
|
||||
</g>
|
||||
<g id="node-vfio">
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="1131-1146" x="318.0" y="244.0" width="150.0" height="105.0" rx="7" />
|
||||
<text class="node-label" x="393.0" y="271.0">VFIO</text>
|
||||
<line class="node-detail-divider" x1="332.0" y1="292.0" x2="454.0" y2="292.0" />
|
||||
<text class="node-detail" x="334.0" y="309.0">vfio-pci</text>
|
||||
<text class="node-detail" x="334.0" y="325.0">IOMMU 그룹</text>
|
||||
<text class="node-detail" x="334.0" y="341.0">/dev/vfio/vfio</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="3470-3485" x="507.0" y="220.0" width="150.0" height="105.0" rx="7" />
|
||||
<text class="node-label" x="582.0" y="247.0">VFIO</text>
|
||||
<line class="node-detail-divider" x1="521.0" y1="268.0" x2="643.0" y2="268.0" />
|
||||
<text class="node-detail" x="523.0" y="285.0">vfio-pci</text>
|
||||
<text class="node-detail" x="523.0" y="301.0">IOMMU 그룹</text>
|
||||
<text class="node-detail" x="523.0" y="317.0">/dev/vfio/vfio</text>
|
||||
</g>
|
||||
<g id="node-vhost">
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="1125-1129" x="528.0" y="252.5" width="150.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="603.0" y="279.5">vhost</text>
|
||||
<line class="node-detail-divider" x1="542.0" y1="300.5" x2="664.0" y2="300.5" />
|
||||
<text class="node-detail" x="544.0" y="317.5">리눅스 커널 구현</text>
|
||||
<text class="node-detail" x="544.0" y="333.5">virtqueue 공유</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="3464-3468" x="507.0" y="397.0" width="150.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="582.0" y="424.0">vhost</text>
|
||||
<line class="node-detail-divider" x1="521.0" y1="445.0" x2="643.0" y2="445.0" />
|
||||
<text class="node-detail" x="523.0" y="462.0">리눅스 커널 구현</text>
|
||||
<text class="node-detail" x="523.0" y="478.0">virtqueue 공유</text>
|
||||
</g>
|
||||
<g id="node-virtio-driver">
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="1116-1118" x="738.0" y="252.5" width="202.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="839.0" y="279.5">게스트 virtio 드라이버</text>
|
||||
<line class="node-detail-divider" x1="752.0" y1="300.5" x2="926.0" y2="300.5" />
|
||||
<text class="node-detail" x="754.0" y="317.5">virtio-pci · virtio-mmio</text>
|
||||
<text class="node-detail" x="754.0" y="333.5">virtqueue</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="3455-3457" x="481.0" y="557.0" width="202.0" height="88.0" rx="7" />
|
||||
<text class="node-label" x="582.0" y="584.0">게스트 virtio 드라이버</text>
|
||||
<line class="node-detail-divider" x1="495.0" y1="605.0" x2="669.0" y2="605.0" />
|
||||
<text class="node-detail" x="497.0" y="622.0">virtio-pci · virtio-mmio</text>
|
||||
<text class="node-detail" x="497.0" y="638.0">virtqueue</text>
|
||||
</g>
|
||||
<g id="node-physical-cpu">
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="1111-1113" x="302.5" y="445.0" width="195.0" height="105.0" rx="7" />
|
||||
<text class="node-label" x="400.0" y="472.0">물리 CPU</text>
|
||||
<line class="node-detail-divider" x1="316.5" y1="493.0" x2="483.5" y2="493.0" />
|
||||
<text class="node-detail" x="318.5" y="510.0">VMX root · VMX non-root</text>
|
||||
<text class="node-detail" x="318.5" y="526.0">VM entry · VM exit</text>
|
||||
<text class="node-detail" x="318.5" y="542.0">guest-state 영역</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="3450-3452" x="843.0" y="228.5" width="195.0" height="105.0" rx="7" />
|
||||
<text class="node-label" x="940.5" y="255.5">물리 CPU</text>
|
||||
<line class="node-detail-divider" x1="857.0" y1="276.5" x2="1024.0" y2="276.5" />
|
||||
<text class="node-detail" x="859.0" y="293.5">VMX root · VMX non-root</text>
|
||||
<text class="node-detail" x="859.0" y="309.5">VM entry · VM exit</text>
|
||||
<text class="node-detail" x="859.0" y="325.5">guest-state 영역</text>
|
||||
</g>
|
||||
<g id="node-pci-device">
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="1131-1133,1144-1146" x="557.5" y="462.0" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="632.5" y="489.0">물리 PCI 장치</text>
|
||||
<line class="node-detail-divider" x1="571.5" y1="510.0" x2="693.5" y2="510.0" />
|
||||
<text class="node-detail" x="573.5" y="527.0">게스트 직접 할당</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-service" data-evidence="3470-3472,3483-3485" x="865.5" y="405.5" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="940.5" y="432.5">물리 PCI 장치</text>
|
||||
<line class="node-detail-divider" x1="879.5" y1="453.5" x2="1001.5" y2="453.5" />
|
||||
<text class="node-detail" x="881.5" y="470.5">게스트 직접 할당</text>
|
||||
</g>
|
||||
<g id="node-guest-code">
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="1111-1113" x="325.0" y="646.0" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="400.0" y="673.0">게스트 코드</text>
|
||||
<line class="node-detail-divider" x1="339.0" y1="694.0" x2="461.0" y2="694.0" />
|
||||
<text class="node-detail" x="341.0" y="711.0">vCPU</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="3450-3452" x="1198.0" y="245.5" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="1273.0" y="272.5">게스트 코드</text>
|
||||
<line class="node-detail-divider" x1="1212.0" y1="293.5" x2="1334.0" y2="293.5" />
|
||||
<text class="node-detail" x="1214.0" y="310.5">vCPU</text>
|
||||
</g>
|
||||
<g id="node-iommu">
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="1144-1146" x="535.0" y="646.0" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="610.0" y="673.0">IOMMU</text>
|
||||
<line class="node-detail-divider" x1="549.0" y1="694.0" x2="671.0" y2="694.0" />
|
||||
<text class="node-detail" x="551.0" y="711.0">DMA · 인터럽트 리매핑</text>
|
||||
<rect class="node-shape kind-service emphasis-normal role-sink" data-evidence="3483-3485" x="1198.0" y="388.5" width="150.0" height="71.0" rx="7" />
|
||||
<text class="node-label" x="1273.0" y="415.5">IOMMU</text>
|
||||
<line class="node-detail-divider" x1="1212.0" y1="436.5" x2="1334.0" y2="436.5" />
|
||||
<text class="node-detail" x="1214.0" y="453.5">DMA · 인터럽트 리매핑</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user