Skip to content

Commit 3c65fa0

Browse files
committed
CA-193817: Allow GVT-g even when device is hidden from xen/dom0
GVT-g is now always enabled, independent of whether the device is hidden from xen/dom0. Passthrough of Intel GPUs still requires the device to be hidden from both xen and dom0. Signed-off-by: John Else <[email protected]>
1 parent cabcb51 commit 3c65fa0

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

ocaml/xapi/xapi_vgpu_type.ml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -486,18 +486,13 @@ module Intel = struct
486486
~is_host_display_enabled
487487
~is_pci_hidden =
488488
let types =
489-
if is_system_display_device
490-
then begin
491-
match is_host_display_enabled, is_pci_hidden with
492-
| false, true -> [passthrough_gpu]
493-
| true, true -> []
494-
| _, false ->
495-
(make_vgpu_types ~__context
496-
~pci ~whitelist:!Xapi_globs.gvt_g_whitelist)
497-
end else
498-
passthrough_gpu ::
499-
(make_vgpu_types ~__context
500-
~pci ~whitelist:!Xapi_globs.gvt_g_whitelist)
489+
let passthrough_types =
490+
if is_system_display_device && (is_host_display_enabled || not is_pci_hidden)
491+
then []
492+
else [passthrough_gpu]
493+
in
494+
passthrough_types @
495+
(make_vgpu_types ~__context ~pci ~whitelist:!Xapi_globs.gvt_g_whitelist)
501496
in
502497
List.map (find_or_create ~__context) types
503498
end

0 commit comments

Comments
 (0)