[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH 1 of 5] CA-36384: [experimental PCI passthrough]: add a "-priv" cmdline argument to qemu when a PCI device is to be passed through
# HG changeset patch # User David Scott <dave.scott@xxxxxxxxxxxxx> # Date 1263336660 0 # Node ID a55bf5604cb881b788f10433f66ced392e0d31a2 # Parent fd0e562dcc4a31cdef6d1c1db2898d217463567e CA-36384: [experimental PCI passthrough]: add a "-priv" cmdline argument to qemu when a PCI device is to be passed through. This is necessary because the depriv'ed qemu cannot read /sys Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx> diff -r fd0e562dcc4a -r a55bf5604cb8 ocaml/xapi/vmops.ml --- a/ocaml/xapi/vmops.ml Tue Jan 12 22:50:59 2010 +0000 +++ b/ocaml/xapi/vmops.ml Tue Jan 12 22:51:00 2010 +0000 @@ -595,6 +595,7 @@ Device.Dm.usb = usb; Device.Dm.acpi = acpi; Device.Dm.disp = disp; + Device.Dm.pci_passthrough = List.mem_assoc "pci" other_config; Device.Dm.xenclient_enabled=Xapi_globs.xenclient_enabled; Device.Dm.hvm=hvm; diff -r fd0e562dcc4a -r a55bf5604cb8 ocaml/xenops/device.ml --- a/ocaml/xenops/device.ml Tue Jan 12 22:50:59 2010 +0000 +++ b/ocaml/xenops/device.ml Tue Jan 12 22:51:00 2010 +0000 @@ -1312,7 +1312,8 @@ acpi: bool; disp: disp_opt; pci_emulations: string list; - + pci_passthrough: bool; + (* Xenclient extras *) xenclient_enabled : bool; hvm : bool; @@ -1479,6 +1480,7 @@ @ (if info.acpi then [ "-acpi" ] else []) @ (if restore then [ "-loadvm"; restorefile ] else []) @ (List.fold_left (fun l pci -> "-pciemulation" :: pci :: l) [] (List.rev info.pci_emulations)) + @ (if info.pci_passthrough then ["-priv"] else []) @ xenclient_specific_options @ (List.fold_left (fun l (k, v) -> ("-" ^ k) :: (match v with None -> l | Some v -> v :: l)) [] info.extras) in diff -r fd0e562dcc4a -r a55bf5604cb8 ocaml/xenops/device.mli --- a/ocaml/xenops/device.mli Tue Jan 12 22:50:59 2010 +0000 +++ b/ocaml/xenops/device.mli Tue Jan 12 22:51:00 2010 +0000 @@ -178,6 +178,7 @@ acpi: bool; disp: disp_opt; pci_emulations: string list; + pci_passthrough: bool; (* Xenclient extras *) xenclient_enabled: bool; diff -r fd0e562dcc4a -r a55bf5604cb8 ocaml/xenops/xenops.ml --- a/ocaml/xenops/xenops.ml Tue Jan 12 22:50:59 2010 +0000 +++ b/ocaml/xenops/xenops.ml Tue Jan 12 22:51:00 2010 +0000 @@ -294,6 +294,7 @@ Device.Dm.vcpus = vcpus; Device.Dm.nics = []; Device.Dm.pci_emulations = []; + Device.Dm.pci_passthrough = false; Device.Dm.usb = []; Device.Dm.acpi = true; Device.Dm.disp = Device.Dm.NONE; 4 files changed, 6 insertions(+), 1 deletion(-) ocaml/xapi/vmops.ml | 1 + ocaml/xenops/device.ml | 4 +++- ocaml/xenops/device.mli | 1 + ocaml/xenops/xenops.ml | 1 + Attachment:
xen-api.hg-5.patch _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |