[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] remove 1 PCI device limit for HVM guests



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1261431517 0
# Node ID cc0e09b294e1e383196106bf97278e0918c5693c
# Parent  881ecfd9279cc16f4b1b1da51471bdf21a031037
CA-32071: remove the limit where we only add 1 PCI device to an HVM guest.

Note the migration hot-unplug path doesn't handle more than one device.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 881ecfd9279c -r cc0e09b294e1 ocaml/xapi/vmops.ml
--- a/ocaml/xapi/vmops.ml       Mon Dec 21 21:37:26 2009 +0000
+++ b/ocaml/xapi/vmops.ml       Mon Dec 21 21:38:37 2009 +0000
@@ -496,10 +496,14 @@
         Vmopshelpers.with_xc_and_xs
           (fun xc xs ->
              if (Xc.domain_getinfo xc domid).Xc.hvm_guest then begin
-               if List.length pcidevs > 1 then warn "More than 1 PCI device 
configured: only the first will be attached";
-               let (a, b, c, d) as device = List.hd (snd (List.hd pcidevs)) in
-               debug "hotplugging PCI device %04x:%02x:%02x.%01x into domid: 
%d" a b c d domid;
-               Device.PCI.plug ~xc ~xs device domid (-1)
+                       List.iter 
+                               (fun (devid, devices) ->
+                                        List.iter
+                                                (fun ((a, b, c, d) as device) 
->
+                                                         debug "hotplugging 
PCI device %04x:%02x:%02x.%01x into domid: %d" a b c d domid;
+                                                         Device.PCI.plug ~xc 
~xs device domid devid
+                                                ) devices
+                               ) pcidevs
              end
           )
        end;
1 file changed, 8 insertions(+), 4 deletions(-)
ocaml/xapi/vmops.ml |   12 ++++++++----


Attachment: xen-api.hg.patch
Description: Text Data

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.