[Libvir] [PATCH] Fix the value of XEN_V2_OP_GETDOMAININFOLIST

Saori Fukuta fukuta.saori at jp.fujitsu.com
Thu Apr 26 12:58:53 UTC 2007


Hi,

The value of "Max memory" shown by using "virsh dominfo" is different from xm
command.

# virsh dominfo HVM_RH5_sda6 | grep mem
Max memory:     300000 kB
Used memory:    264064 kB

# xm li -l HVM_RH5_sda6 | grep mem
    (maxmem 450)
    (memory 292)
    (shadow_memory 5)

So, I changed the definition as follows,
    (before)
    #define XEN_V2_OP_GETDOMAININFOLIST     6
    (changed)
    #define XEN_V2_OP_GETDOMAININFOLIST     5
and I could get the value that I want.

# ./virsh dominfo HVM_RH5_sda6 | grep mem
Max memory:     460800 kB
Used memory:    299008 kB

# xm li -l HVM_RH5_sda6 | grep mem
    (maxmem 450)
    (memory 292)
    (shadow_memory 5)

I think that is not mistake because the XEN_V2_OP_GETDOMAININFOLIST is a 
system operation, so the definition is not exactly wrong.
    /usr/include/xen/sysctl.h:#define XEN_SYSCTL_getdomaininfolist 6

Do you know any reason for this?

Signed-off-by: Saori Fukuta <fukuta.saori at jp.fujitsu.com>

Thanks,
Saori Fukuta.

Index: xen_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xen_internal.c,v
retrieving revision 1.71
diff -u -p -r1.71 xen_internal.c
--- xen_internal.c      13 Apr 2007 00:43:57 -0000      1.71
+++ xen_internal.c      26 Apr 2007 11:41:03 -0000
@@ -117,7 +117,7 @@ static regex_t xen_cap_rec;

 #define XEN_V0_OP_GETDOMAININFOLIST    38
 #define XEN_V1_OP_GETDOMAININFOLIST    38
-#define XEN_V2_OP_GETDOMAININFOLIST    6
+#define XEN_V2_OP_GETDOMAININFOLIST    5

 struct xen_v0_getdomaininfo {
     domid_t  domain;   /* the domain number */




More information about the libvir-list mailing list