Commit 120c6f4
committed
add concept of "io memory" to
Add a special `GuestMemoryMmap` to `struct Vm` that has the semantics
that if its not empty, it represents the swiotlb area in the guest.
Have all virtio devices use io memory by default. This means that in
case of swiotlb regions being set up, virtio devices cannot access
generic memory, so if the guest decides to (incorrectly) place I/O
buffers outside of swiotlb we'll get a somewhat meaningful error of
"invalid guest address" (or similar), instead of random things failing
further down the line in case generic memory isn't accessible by
firecracker/the host kernel for some reason (e.g. if its guest_memfd
backed in the future).
Signed-off-by: Patrick Roy <[email protected]>struct Vm
1 parent 9db2212 commit 120c6f4
2 files changed
+45
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| |||
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
134 | 164 | | |
135 | 165 | | |
136 | 166 | | |
| 167 | + | |
| 168 | + | |
137 | 169 | | |
138 | 170 | | |
| 171 | + | |
139 | 172 | | |
140 | 173 | | |
141 | 174 | | |
| |||
154 | 187 | | |
155 | 188 | | |
156 | 189 | | |
157 | | - | |
158 | | - | |
159 | 190 | | |
160 | 191 | | |
161 | 192 | | |
162 | 193 | | |
163 | 194 | | |
164 | 195 | | |
165 | 196 | | |
166 | | - | |
167 | | - | |
168 | 197 | | |
169 | 198 | | |
170 | 199 | | |
| |||
177 | 206 | | |
178 | 207 | | |
179 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
180 | 220 | | |
181 | 221 | | |
182 | 222 | | |
| |||
0 commit comments