Skip to content

Commit

Permalink
Pass through PCI devices to network driver domains as required
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
  • Loading branch information
robhoes committed May 13, 2013
1 parent 706e777 commit 932d1be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ocaml/xapi/xapi_xenops.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
module D=Debug.Debugger(struct let name="xenops" end)
open D

open Network
module Network_client = Network
open Network_client

open Db_filter_types

open Stringext
open Listext
Expand Down Expand Up @@ -420,7 +423,9 @@ module MD = struct

let pcis_of_vm ~__context (vmref, vm) =
let vgpu_pcidevs = Vgpuops.list_vgpus ~__context ~vm:vmref in
let devs = List.flatten (List.map (fun (_, dev) -> dev) (Pciops.sort_pcidevs vgpu_pcidevs)) in
let network_pcidevs = Network_client.driver_domain_devs ~__context vm.API.vM_other_config in
let devs = vgpu_pcidevs @ network_pcidevs in
let devs = List.flatten (List.map (fun (_, dev) -> dev) (Pciops.sort_pcidevs devs)) in

(* The 'unmanaged' PCI devices are in the other_config key: *)
let other_pcidevs = Pciops.other_pcidevs_of_vm ~__context vm.API.vM_other_config in
Expand Down

0 comments on commit 932d1be

Please sign in to comment.