|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
Re: [Xen-devel] [PATCH]: change libxl IDL to export a saner	interface fo
 
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
 |   
 
 | 
    | 
  
  
    |   | 
    |