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-changelog

[Xen-changelog] [xen-unstable] tools: ocaml: xl: propagate simplfied lib

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: ocaml: xl: propagate simplfied libxl interface to PCI BDFs to bindings.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 01 Apr 2011 06:50:11 +0100
Delivery-date: Thu, 31 Mar 2011 22:50:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1301591527 -3600
# Node ID 9f09b93530da0138ae04fbb702a1fe00ffa21f93
# Parent  0ab435637ec0f6476fb4f90c8c74c77f809fbb3d
tools: ocaml: xl: propagate simplfied libxl interface to PCI BDFs to bindings.

22166:251694a87f1d changed the libxl interface to remove the need for
users to understand BDF encoding but did not propagate the change to
the ocaml bindings. Do that now.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 0ab435637ec0 -r 9f09b93530da tools/ocaml/libs/xl/xl.ml
--- a/tools/ocaml/libs/xl/xl.ml Thu Mar 31 18:11:25 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.ml Thu Mar 31 18:12:07 2011 +0100
@@ -145,7 +145,9 @@
 
 type pci_info =
 {
-       v : int; (* domain * bus * dev * func multiplexed *)
+       func : int;
+       dev : int;
+       bus : int;
        domain : int;
        vdevfn : int;
        msitranslate : bool;
diff -r 0ab435637ec0 -r 9f09b93530da tools/ocaml/libs/xl/xl.mli
--- a/tools/ocaml/libs/xl/xl.mli        Thu Mar 31 18:11:25 2011 +0100
+++ b/tools/ocaml/libs/xl/xl.mli        Thu Mar 31 18:12:07 2011 +0100
@@ -145,7 +145,9 @@
 
 type pci_info =
 {
-       v : int; (* domain * bus * dev * func multiplexed *)
+       func : int;
+       dev : int;
+       bus : int;
        domain : int;
        vdevfn : int;
        msitranslate : bool;
diff -r 0ab435637ec0 -r 9f09b93530da tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c    Thu Mar 31 18:11:25 2011 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c    Thu Mar 31 18:12:07 2011 +0100
@@ -272,30 +272,16 @@
 
 static int device_pci_val(caml_gc *gc, libxl_device_pci *c_val, value v)
 {
-       union {
-               unsigned int value;
-               struct {
-                       unsigned int reserved1:2;
-                       unsigned int reg:6;
-                       unsigned int func:3;
-                       unsigned int dev:5;
-                       unsigned int bus:8;
-                       unsigned int reserved2:7;
-                       unsigned int enable:1;
-               }fields;
-       }u;
        CAMLparam1(v);
 
-       /* FIXME: propagate API change to ocaml */
-       u.value = Int_val(Field(v, 0));
-       c_val->func = u.fields.func;
-       c_val->dev = u.fields.dev;
-       c_val->bus = u.fields.bus;
+       c_val->func = Int_val(Field(v, 0));
+       c_val->dev = Int_val(Field(v, 1));
+       c_val->bus = Int_val(Field(v, 2));
 
-       c_val->domain = Int_val(Field(v, 1));
-       c_val->vdevfn = Int_val(Field(v, 2));
-       c_val->msitranslate = Bool_val(Field(v, 3));
-       c_val->power_mgmt = Bool_val(Field(v, 4));
+       c_val->domain = Int_val(Field(v, 3));
+       c_val->vdevfn = Int_val(Field(v, 4));
+       c_val->msitranslate = Bool_val(Field(v, 5));
+       c_val->power_mgmt = Bool_val(Field(v, 6));
 
        CAMLreturn(0);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: ocaml: xl: propagate simplfied libxl interface to PCI BDFs to bindings., Xen patchbot-unstable <=