File tree Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Expand file tree Collapse file tree 1 file changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -273,25 +273,20 @@ fn build_kernel_command_line(
273
273
write ! ( cmdline, "{} " , sidecar. kernel_command_line( ) ) ?;
274
274
}
275
275
276
+ // HACK: Set the vmbus connection id via kernel commandline.
277
+ //
278
+ // This code will be removed when the kernel supports setting connection id
279
+ // via device tree.
280
+ write ! (
281
+ cmdline,
282
+ "hv_vmbus.message_connection_id=0x{:x} " ,
283
+ partition_info. vmbus_vtl2. connection_id
284
+ ) ?;
285
+
276
286
// If we're isolated we can't trust the host-provided cmdline
277
287
if can_trust_host {
278
- let old_cmdline = & partition_info. cmdline ;
279
-
280
- // HACK: See if we should set the vmbus connection id via kernel
281
- // commandline. It may already be set, and we don't want to set it again.
282
- //
283
- // This code will be removed when the kernel supports setting connection id
284
- // via device tree.
285
- if !old_cmdline. contains ( "hv_vmbus.message_connection_id=" ) {
286
- write ! (
287
- cmdline,
288
- "hv_vmbus.message_connection_id=0x{:x} " ,
289
- partition_info. vmbus_vtl2. connection_id
290
- ) ?;
291
- }
292
-
293
288
// Prepend the computed parameters to the original command line.
294
- cmdline. write_str ( old_cmdline ) ?;
289
+ cmdline. write_str ( & partition_info . cmdline ) ?;
295
290
}
296
291
297
292
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments