Skip to content

Commit 17f459f

Browse files
authored
Merge pull request #776 from lindig/UPD-825
CA-366014 UPD-825 pass dm qemu to UEFI qemu, too
2 parents 847be61 + 30c6828 commit 17f459f

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

xc/device.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

xc/device.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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

xc/domain.ml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,14 @@ let build (task : Xenops_task.task_handle) ~xc ~xs ~store_domid ~console_domid
11541154

11551155
type 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+
11571165
let 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

0 commit comments

Comments
 (0)