Thanks Daniel,<div><br></div><div>Is it fair to assume this fix may appear in the next release of libvirt?</div><div><br></div><div>Hany<br><br><div class="gmail_quote">On Thu, Jun 11, 2009 at 2:28 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Thu, Jun 11, 2009 at 02:13:17PM -0400, Hany Fahim wrote:<br>
> My apologies. Here it is:<br>
> Xen 3.3:<br>
><br>
> [root@node1 ~]# xm info<br>
</div><div class="im">> total_memory           : 3063<br>
> free_memory            : 128<br>
> node_to_cpu            : node0:0-1<br>
> node_to_memory         : node0:128<br>
> xen_major              : 3<br>
> xen_minor              : 3<br>
> xen_extra              : .1<br>
<br>
><br>
</div><div class="im">> Xen 3.0.3:<br>
><br>
> [root@node2 ~]# xm info<br>
</div><div class="im">> total_memory           : 2046<br>
> free_memory            : 256<br>
> node_to_cpu            : node0:0<br>
> xen_major              : 3<br>
> xen_minor              : 1<br>
> xen_extra              : .2-128.1.6.el5<br>
<br>
<br>
</div>This shows that the Hypervisor  is giving correct info back with both<br>
versions. So the problem must be at the libvirt space, and I believe<br>
I know what the problem is.<br>
<br>
The version of Xen in RHEL5 has<br>
<br>
struct xen_sysctl_availheap {<br>
    /* IN variables. */<br>
    uint32_t min_bitwidth;  /* Smallest address width (zero if don't care). */<br>
    uint32_t max_bitwidth;  /* Largest address width (zero if don't care). */<br>
    int32_t  node;          /* NUMA node of interest (-1 for all nodes). */<br>
    /* OUT variables. */<br>
    uint64_t avail_bytes;   /* Bytes available in the specified region. */<br>
};<br>
<br>
While upstream Xen has<br>
<br>
struct xen_sysctl_availheap {<br>
    /* IN variables. */<br>
    uint32_t min_bitwidth;  /* Smallest address width (zero if don't care). */<br>
    uint32_t max_bitwidth;  /* Largest address width (zero if don't care). */<br>
    int32_t  node;          /* NUMA node of interest (-1 for all nodes). */<br>
    /* OUT variables. */<br>
    uint64_aligned_t avail_bytes;/* Bytes available in the specified region. */<br>
};<br>
<br>
Notice the 'avail_bytes' field is now aligned, so its 4 bytes further<br>
down from where libvirt is expecting it to be.<br>
<br>
We'll have to provide a fix in libvirt to use the new alignment for<br>
newer Xen.<br>
<div><div></div><div class="h5"><br>
Regards,<br>
Daniel<br>
--<br>
|: Red Hat, Engineering, London   -o-   <a href="http://people.redhat.com/berrange/" target="_blank">http://people.redhat.com/berrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>  -o-  <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a>  -o-  <a href="http://ovirt.org" target="_blank">http://ovirt.org</a> :|<br>

|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|<br>
</div></div></blockquote></div><br></div>