File tree Expand file tree Collapse file tree 3 files changed +10
-17
lines changed Expand file tree Collapse file tree 3 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ module Profile = struct
4949
5050 let fallback = Qemu_upstream_compat
5151
52- let all = [Qemu_none ; Qemu_upstream_compat ; Qemu_upstream ]
53-
5452 module Name = struct
5553 let qemu_none = " qemu-none"
5654
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ module Profile : sig
4040 (* * the fallback profile in case an invalid profile string is provided to
4141 [of_string] *)
4242
43- val all : t list
44- (* * all available profiles *)
45-
4643 (* * Valid names for a profile, used to define valid values for
4744 VM.platform.device-model *)
4845 module Name : sig
Original file line number Diff line number Diff line change @@ -1154,6 +1154,14 @@ let build (task : Xenops_task.task_handle) ~xc ~xs ~store_domid ~console_domid
11541154
11551155type suspend_flag = Live | Debug
11561156
1157+ let dm_flags =
1158+ let open Device.Profile in
1159+ function
1160+ | Qemu_upstream | Qemu_upstream_compat | Qemu_upstream_uefi ->
1161+ [" -dm" ; " qemu" ]
1162+ | Qemu_trad | Qemu_none ->
1163+ []
1164+
11571165let with_emu_manager_restore (task : Xenops_task.task_handle ) ~domain_type
11581166 ~(dm : Device.Profile.t ) ~store_port ~console_port ~extras manager_path
11591167 domid uuid main_fd vgpu_fd f =
@@ -1185,12 +1193,7 @@ let with_emu_manager_restore (task : Xenops_task.task_handle) ~domain_type
11851193 ; " -console_port"
11861194 ; string_of_int console_port
11871195 ]
1188- @ ( match dm with
1189- | Device.Profile. Qemu_upstream | Device.Profile. Qemu_upstream_compat ->
1190- [" -dm" ; " qemu" ]
1191- | _ ->
1192- []
1193- )
1196+ @ dm_flags dm
11941197 @ extras
11951198 @ vgpu_cmdline
11961199 in
@@ -1569,12 +1572,7 @@ let suspend_emu_manager ~(task : Xenops_task.task_handle) ~xc ~xs ~domain_type
15691572 let flags' = List. map cmdline_to_flag flags in
15701573 let args =
15711574 [" -fd" ; fd_uuid; " -mode" ; mode; " -domid" ; string_of_int domid]
1572- @ ( match dm with
1573- | Device.Profile. Qemu_upstream | Device.Profile. Qemu_upstream_compat ->
1574- [" -dm" ; " qemu" ]
1575- | _ ->
1576- []
1577- )
1575+ @ dm_flags dm
15781576 @ List. concat flags'
15791577 @ vgpu_cmdline
15801578 in
You can’t perform that action at this time.
0 commit comments