File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -213,14 +213,14 @@ in {
213
213
} )
214
214
else throw "Unsupported interface type ${ type } for Cloud-Hypervisor"
215
215
) interfaces )
216
- ++
217
- arg "--device" ( map ( { bus , path , ... } : {
216
+ )
217
+ + " " + # Move vfio-pci outside of
218
+ ( lib . concatMapStringsSep " "
219
+ ( { bus , path , ... } : {
218
220
pci = "path=/sys/bus/pci/devices/${ path } " ;
219
221
usb = throw "USB passthrough is not supported on cloud-hypervisor" ;
220
222
} . ${ bus } ) devices )
221
- ++
222
- extraArgs
223
- ) ;
223
+ + " " + lib . escapeShellArgs extraArgs ;
224
224
225
225
canShutdown = socket != null ;
226
226
Original file line number Diff line number Diff line change @@ -127,11 +127,6 @@ in {
127
127
# "--net-vq-pairs" (toString vcpu)
128
128
# ]
129
129
++
130
- builtins . concatMap ( { bus , path , ... } : {
131
- pci = [ "--vfio" "/sys/bus/pci/devices/${ path } ,iommu=viommu" ] ;
132
- usb = throw "USB passthrough is not supported on crosvm" ;
133
- } . ${ bus } ) devices
134
- ++
135
130
lib . optionals ( vsock . cid != null ) [
136
131
"--vsock" ( toString vsock . cid )
137
132
]
@@ -140,9 +135,13 @@ in {
140
135
"--initrd" initrdPath
141
136
kernelPath
142
137
]
143
- ++
144
- extraArgs
145
- ) ;
138
+ )
139
+ + " " + # Move vfio-pci outside of
140
+ ( lib . concatMapStringsSep " " ( { bus , path , ... } : {
141
+ pci = [ "--vfio" "/sys/bus/pci/devices/${ path } ,iommu=viommu" ] ;
142
+ usb = throw "USB passthrough is not supported on crosvm" ;
143
+ } . ${ bus } ) devices )
144
+ + " " + lib . escapeShellArgs extraArgs ;
146
145
147
146
canShutdown = socket != null ;
148
147
You can’t perform that action at this time.
0 commit comments