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

Re: [Xen-devel] [PATCH]: change libxl IDL to export a saner interface fo

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: change libxl IDL to export a saner interface for upcoming language bindings
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Thu, 9 Sep 2010 15:38:58 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 09 Sep 2010 07:41:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1284037653.17452.74.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1284037653.17452.74.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-09-09 at 14:07 +0100, Gianni Tedesco wrote:
> diff -r b19856f6dd76 tools/libxl/libxl_pci.c
> --- a/tools/libxl/libxl_pci.c   Thu Sep 09 09:24:24 2010 +0100
> +++ b/tools/libxl/libxl_pci.c   Thu Sep 09 13:52:46 2010 +0100
> @@ -41,6 +41,15 @@
>  #define PCI_BDF_SHORT          "%02x:%02x.%01x"
>  #define PCI_BDF_VDEVFN         "%04x:%02x:%02x.%01x@%02x"
> 
> +static unsigned int pcidev_value(libxl_device_pci *pcidev)
> +{
> +    return ((pcidev->reg & 0x3f) << 24) |
> +           ((pcidev->func & 0x7) << 21) |
> +           ((pcidev->dev & 0x1f) << 16) |
> +           ((pcidev->bus & 0xff) << 8) |
> +           ((pcidev->enable) ? 1 : 0);
> +}
> +

Gah, this bit is broken, don't apply.

I assume it's due to endianness - changed it to put it in a temporary
union and it works fine?!

Will re-send a better tested patch-series with more exported functions
next week.


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