WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 1 of 5] CA-36384: [experimental PCI passthrough]: add a

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [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
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Tue, 12 Jan 2010 22:57:01 +0000
Delivery-date: Tue, 12 Jan 2010 15:03:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1263337020@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api