feat: 가상화 문서들 추가

This commit is contained in:
DongHyeonka
2026-09-10 08:54:05 +09:00
parent e9f6a93327
commit 43e1aadef0
695 changed files with 153404 additions and 12754 deletions
@@ -0,0 +1,32 @@
# 게스트가 하드웨어에 닿는 갈래는 셋이고 깊이가 다르다
## Alternative text
게스트·호스트 유저공간·호스트 커널·하드웨어 네 층을 가로지르는 세 갈래 경로도.
## Long 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 와 나누는 길이 따로 있다. 앞의 둘은 이 실험대가 쓰고 패스스루는 쓰지 않는다.
## Elements and evidence
- **QEMU** (service): KVM 핸들을 열고 VM 과 vCPU 를 만드는 유저공간 프로세스. vcpu ioctl 은 그 vcpu 를 만든 스레드에서 낸다. Evidence: L1102L1108.
- **VFIO** (service): IOMMU 보호 아래 장치 접근을 유저공간에 여는 프레임워크. 소유 단위가 IOMMU 그룹이다. Evidence: L1131L1146.
- **물리 PCI 장치** (service): 호스트 드라이버에서 떼어 vfio-pci 에 묶은 장치. Evidence: L1131L1133, L1144L1146.
- **IOMMU** (service): 장치가 아무 메모리나 건드리지 못하게 막는 리매핑 장치. Evidence: L1144L1146.
- **KVM** (service): mmap 한 공유 메모리로 나온 이유를 유저공간에 알리는 커널 쪽. Evidence: L1105L1108.
- **물리 CPU** (service): VM entry 때 guest-state 영역에서 상태를 싣고 VM exit 때 그리로 저장하는 프로세서. Evidence: L1111L1113.
- **게스트 코드** (service): VMX non-root 로 물리 CPU 에서 도는 게스트 명령. Evidence: L1111L1113.
- **게스트 virtio 드라이버** (service): 게스트가 보는 반가상화 장치의 드라이버. 주고받는 통로가 virtqueue 다. Evidence: L1116L1118.
- **vhost** (service): virtqueue 를 QEMU 밖과 나누는 커널 구현. vhost-user 규약이 이것을 제어하는 ioctl 인터페이스를 보완한다. Evidence: L1125L1129.
## Relationships
- **물리 CPU → 게스트 코드:** VMX non-root. Evidence: L1111L1112.
- **물리 PCI 장치 → IOMMU:** DMA. Evidence: L1144L1146.
- **KVM → 물리 CPU:** VM entry. Evidence: L1111L1112.
- **QEMU → VFIO:** 장치 fd. Evidence: L1138L1141.
- **QEMU → KVM:** KVM_RUN. Evidence: L1104L1106.
- **QEMU → vhost:** 제어 ioctl. Evidence: L1125L1129.
- **QEMU → 게스트 virtio 드라이버:** virtqueue. Evidence: L1116L1118, L1128L1128.
- **VFIO → 물리 PCI 장치:** vfio-pci 결합. Evidence: L1144L1146.
@@ -0,0 +1,38 @@
# 게스트가 하드웨어에 닿는 갈래는 셋이고 깊이가 다르다
# Question: 게스트의 CPU 실행·virtio I/O·직접 할당한 장치는 각각 어디까지 내려가고 호스트 유저공간을 지나는가
direction: down
n0: "QEMU" {
shape: rectangle
}
n1: "VFIO" {
shape: rectangle
}
n2: "물리 PCI 장치" {
shape: rectangle
}
n3: "IOMMU" {
shape: rectangle
}
n4: "KVM" {
shape: rectangle
}
n5: "물리 CPU" {
shape: rectangle
}
n6: "게스트 코드" {
shape: rectangle
}
n7: "게스트 virtio 드라이버" {
shape: rectangle
}
n8: "vhost" {
shape: rectangle
}
n0 -> n1: "장치 fd"
n1 -> n2: "vfio-pci 결합"
n2 -> n3: "DMA"
n0 -> n4: "KVM_RUN"
n4 -> n5: "VM entry"
n5 -> n6: "VMX non-root"
n0 -> n7: "virtqueue"
n0 -> n8: "제어 ioctl"
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2026-07-23T00:00:00.000Z" agent="techviz-harness" version="24.7.17" type="device">
<diagram id="cpu-io-passthrough-paths" name="게스트가 하드웨어에 닿는 갈래는 셋이고 깊이가 다르다">
<mxGraphModel dx="985" dy="762" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="985" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="n_qemu" value="QEMU&lt;br/&gt;/dev/kvm&lt;br/&gt;KVM_CREATE_VM · KVM_CREATE_VCPU" tooltip="KVM 핸들을 열고 VM 과 vCPU 를 만드는 유저공간 프로세스. vcpu ioctl 은 그 vcpu 를 만든 스레드에서 낸다. | Evidence: L1102-L1108" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;strokeColor=#2563eb;strokeWidth=2;" vertex="1" parent="1">
<mxGeometry x="379.5" y="60.0" width="251.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_kvm" value="KVM&lt;br/&gt;struct kvm_run&lt;br/&gt;KVM_GET_VCPU_MMAP_SIZE" tooltip="mmap 한 공유 메모리로 나온 이유를 유저공간에 알리는 커널 쪽. | Evidence: L1105-L1108" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="70.0" y="252.5" width="188.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_vfio" value="VFIO&lt;br/&gt;vfio-pci&lt;br/&gt;IOMMU 그룹&lt;br/&gt;/dev/vfio/vfio" tooltip="IOMMU 보호 아래 장치 접근을 유저공간에 여는 프레임워크. 소유 단위가 IOMMU 그룹이다. | Evidence: L1131-L1146" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="318.0" y="244.0" width="150.0" height="105.0" as="geometry"/>
</mxCell>
<mxCell id="n_vhost" value="vhost&lt;br/&gt;리눅스 커널 구현&lt;br/&gt;virtqueue 공유" tooltip="virtqueue 를 QEMU 밖과 나누는 커널 구현. vhost-user 규약이 이것을 제어하는 ioctl 인터페이스를 보완한다. | Evidence: L1125-L1129" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="528.0" y="252.5" width="150.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_virtio-driver" value="게스트 virtio 드라이버&lt;br/&gt;virtio-pci · virtio-mmio&lt;br/&gt;virtqueue" tooltip="게스트가 보는 반가상화 장치의 드라이버. 주고받는 통로가 virtqueue 다. | Evidence: L1116-L1118" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="738.0" y="252.5" width="202.0" height="88.0" as="geometry"/>
</mxCell>
<mxCell id="n_physical-cpu" value="물리 CPU&lt;br/&gt;VMX root · VMX non-root&lt;br/&gt;VM entry · VM exit&lt;br/&gt;guest-state 영역" tooltip="VM entry 때 guest-state 영역에서 상태를 싣고 VM exit 때 그리로 저장하는 프로세서. | Evidence: L1111-L1113" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="302.5" y="445.0" width="195.0" height="105.0" as="geometry"/>
</mxCell>
<mxCell id="n_pci-device" value="물리 PCI 장치&lt;br/&gt;게스트 직접 할당" tooltip="호스트 드라이버에서 떼어 vfio-pci 에 묶은 장치. | Evidence: L1131-L1133, L1144-L1146" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="557.5" y="462.0" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="n_guest-code" value="게스트 코드&lt;br/&gt;vCPU" tooltip="VMX non-root 로 물리 CPU 에서 도는 게스트 명령. | Evidence: L1111-L1113" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="325.0" y="646.0" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="n_iommu" value="IOMMU&lt;br/&gt;DMA · 인터럽트 리매핑" tooltip="장치가 아무 메모리나 건드리지 못하게 막는 리매핑 장치. | Evidence: L1144-L1146" style="whiteSpace=wrap;html=1;rounded=1;strokeWidth=2;fontSize=14;fontStyle=1;fillColor=#ffffff;strokeColor=#2d4357;verticalAlign=middle;" vertex="1" parent="1">
<mxGeometry x="535.0" y="646.0" width="150.0" height="71.0" as="geometry"/>
</mxCell>
<mxCell id="e_cpu-runs-guest" value="VMX non-root" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_physical-cpu" target="n_guest-code">
<mxGeometry relative="1" as="geometry">
<mxPoint x="424.0" y="598.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_device-dma" value="DMA" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_pci-device" target="n_iommu">
<mxGeometry relative="1" as="geometry">
<mxPoint x="621.2" y="561.5" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_kvm-vm-entry" value="VM entry" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_kvm" target="n_physical-cpu">
<mxGeometry relative="1" as="geometry">
<mxPoint x="282.0" y="364.8" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_qemu-device-fd" value="장치 fd" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_qemu" target="n_vfio">
<mxGeometry relative="1" as="geometry">
<mxPoint x="444.5" y="168.0" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_qemu-kvm-run" value="KVM_RUN" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_qemu" target="n_kvm">
<mxGeometry relative="1" as="geometry">
<mxPoint x="321.0" y="172.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_qemu-vhost-ioctl" value="제어 ioctl" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_qemu" target="n_vhost">
<mxGeometry relative="1" as="geometry">
<mxPoint x="558.5" y="172.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_qemu-virtqueue" value="virtqueue" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_qemu" target="n_virtio-driver">
<mxGeometry relative="1" as="geometry">
<mxPoint x="685.5" y="172.2" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="e_vfio-binds-device" value="vfio-pci 결합" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;endArrow=block;endFill=1;" edge="1" parent="1" source="n_vfio" target="n_pci-device">
<mxGeometry relative="1" as="geometry">
<mxPoint x="512.8" y="377.5" as="offset"/>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
@@ -0,0 +1,31 @@
{
"harness_version": "0.2.0",
"spec_id": "cpu-io-passthrough-paths",
"spec_version": "1.1",
"spec_sha256": "981204dcf528aa1c3b0a400d3ea0d11fb5c26250adaf6e7929f9f1bf39b72f3a",
"source_context": {
"document": "docs/keycloak-session-store/final/document.md",
"document_sha256": "0ae5674723f25dc85d5069529890f07be1a11b768b56901103fa3ea6ac3dcf55",
"anchor": {
"kind": "heading",
"value": "이 층 아래의 구조 — 조사한 것",
"line": 1091
}
},
"outputs": [
"cpu-io-passthrough-paths.svg",
"cpu-io-passthrough-paths.drawio",
"cpu-io-passthrough-paths.mmd",
"cpu-io-passthrough-paths.d2",
"cpu-io-passthrough-paths.excalidraw",
"cpu-io-passthrough-paths.alt.md"
],
"lint_issue_count": 5,
"assumption_count": 0,
"assumptions_allowed": false,
"composition_profile": "component-flow",
"reference_ids": [
"payment-event-flow"
],
"diagram_only": true
}
@@ -0,0 +1,20 @@
%% 게스트가 하드웨어에 닿는 갈래는 셋이고 깊이가 다르다
%% question: 게스트의 CPU 실행·virtio I/O·직접 할당한 장치는 각각 어디까지 내려가고 호스트 유저공간을 지나는가
flowchart TB
n0["QEMU"]
n1["VFIO"]
n2["물리 PCI 장치"]
n3["IOMMU"]
n4["KVM"]
n5["물리 CPU"]
n6["게스트 코드"]
n7["게스트 virtio 드라이버"]
n8["vhost"]
n0 -->|"장치 fd"| n1
n1 -->|"vfio-pci 결합"| n2
n2 -->|"DMA"| n3
n0 -->|"KVM_RUN"| n4
n4 -->|"VM entry"| n5
n5 -->|"VMX non-root"| n6
n0 -->|"virtqueue"| n7
n0 -->|"제어 ioctl"| n8
@@ -0,0 +1,139 @@
<?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">
<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>{&quot;techviz&quot;:{&quot;spec_version&quot;:&quot;1.1&quot;,&quot;id&quot;:&quot;cpu-io-passthrough-paths&quot;,&quot;profile&quot;:&quot;component-flow&quot;},&quot;source_context&quot;:{&quot;document&quot;:&quot;docs/keycloak-session-store/final/document.md&quot;,&quot;document_sha256&quot;:&quot;0ae5674723f25dc85d5069529890f07be1a11b768b56901103fa3ea6ac3dcf55&quot;,&quot;anchor&quot;:{&quot;kind&quot;:&quot;heading&quot;,&quot;value&quot;:&quot;이 층 아래의 구조 — 조사한 것&quot;,&quot;line&quot;:1091}},&quot;evidence_policy&quot;:&quot;Each factual element cites source lines or is marked assumption.&quot;,&quot;diagram_only&quot;: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" />
</marker>
<style>
:root { color-scheme: light; }
text { font-family: Inter, Pretendard, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #111827; }
.canvas { fill: #ffffff; }
.group-box { fill: #ffffff; stroke: #9ca3af; stroke-width: 1.4; stroke-dasharray: 7 5; }
.group-label-bg { fill: #ffffff; }
.group-label { font-size: 13px; font-weight: 650; fill: #374151; }
.edge { fill: none; stroke: #374151; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; marker-end: url(#arrow); }
.edge.style-dashed, .edge.semantic-dashed, .edge.assumption { stroke-dasharray: 7 5; }
.edge.style-dotted { stroke-dasharray: 2 5; }
.edge.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.edge.emphasis-muted { stroke: #9ca3af; }
.edge.emphasis-warning, .edge.kind-failure, .edge.kind-error { stroke: #dc2626; stroke-width: 2.2; }
.edge-label-bg { fill: #ffffff; }
.edge-label { font-size: 12px; font-weight: 560; text-anchor: middle; }
.node-shape { fill: #ffffff; stroke: #4b5563; stroke-width: 1.7; }
.node-shape.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.node-shape.emphasis-muted { stroke: #9ca3af; fill: #f9fafb; }
.node-shape.emphasis-warning { stroke: #d97706; stroke-width: 2; fill: #fffdf5; }
.node-shape.kind-database, .node-shape.kind-datastore, .node-shape.kind-storage { fill: #f8fafc; }
.node-shape.kind-queue, .node-shape.kind-event, .node-shape.kind-topic { fill: #fafafa; }
.node-shape.assumption { stroke-dasharray: 4 4; }
.storage-bottom, .controller-divider { fill: none; stroke: #4b5563; stroke-width: 1.4; }
.controller-led { fill: #4b5563; }
.actor-symbol { fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; }
.actor-symbol.emphasis-primary { stroke: #2563eb; stroke-width: 2.2; }
.node-label { font-size: 14px; font-weight: 650; text-anchor: middle; }
.node-role { font-size: 10px; letter-spacing: 0.04em; text-anchor: middle; fill: #6b7280; }
.node-detail-divider { stroke: #d1d5db; stroke-width: 1; }
.node-detail { font-size: 11px; fill: #374151; }
.assumption-badge { font-size: 9px; font-weight: 700; fill: #92400e; }
.failure-mark { stroke: #dc2626; stroke-width: 4; stroke-linecap: round; }
.lifeline { stroke: #9ca3af; stroke-width: 1.2; stroke-dasharray: 5 5; }
.timeline-axis { stroke: #374151; stroke-width: 1.8; marker-end: url(#arrow); }
.timeline-stem { stroke: #6b7280; stroke-width: 1.3; }
.timeline-marker { fill: #ffffff; stroke: #374151; stroke-width: 1.7; }
.timeline-marker.primary { fill: #2563eb; stroke: #2563eb; }
.timeline-marker.warning { fill: #dc2626; stroke: #dc2626; }
.timeline-label { font-size: 13px; font-weight: 650; text-anchor: middle; }
.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>
<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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</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>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB