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] remove 1 PCI device limit for HVM guests

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] remove 1 PCI device limit for HVM guests
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 21:58:25 +0000
Delivery-date: Mon, 21 Dec 2009 13:52:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] remove 1 PCI device limit for HVM guests, David Scott <=