[Libvir] [PATCH] Fix value of XEN_V2_OP_SETMAXMEM

Hi Because the value of XEN_V2_OP_SETMAXMEM in xen_internal.c is wrong, virsh setmaxmem outputs error message. --> Both XEN_V2_OP_SETMAXMEM and XEN_V2_OP_GETVCPUINFO are set to 14, but XEN_V2_OP_SETMAXMEM should be set to 11. -------------------------------------------------------------------------------- # virsh setmaxmem 0 921600 libvir: Xen error : failed Xen syscall ioctl 8518692 -------------------------------------------------------------------------------- This patch sets the right value to XEN_V2_OP_SETMAXMEM. Signed-off-by: Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com> Thanks, Masayuki Sunou. -------------------------------------------------------------------------------- Index: libvirt/src/xen_internal.c =================================================================== RCS file: /data/cvs/libvirt/src/xen_internal.c,v retrieving revision 1.67 diff -u -p -r1.67 xen_internal.c --- libvirt/src/xen_internal.c 23 Mar 2007 09:18:24 -0000 1.67 +++ libvirt/src/xen_internal.c 26 Mar 2007 00:09:35 -0000 @@ -280,7 +280,7 @@ typedef struct xen_v0_domainop xen_v0_do */ #define XEN_V0_OP_SETMAXMEM 28 #define XEN_V1_OP_SETMAXMEM 28 -#define XEN_V2_OP_SETMAXMEM 14 +#define XEN_V2_OP_SETMAXMEM 11 struct xen_v0_setmaxmem { domid_t domain; --------------------------------------------------------------------------------

On Mon, Mar 26, 2007 at 09:24:27AM +0900, Masayuki Sunou wrote:
Hi
Because the value of XEN_V2_OP_SETMAXMEM in xen_internal.c is wrong, virsh setmaxmem outputs error message. --> Both XEN_V2_OP_SETMAXMEM and XEN_V2_OP_GETVCPUINFO are set to 14, but XEN_V2_OP_SETMAXMEM should be set to 11.
Ohh, right, now that explain the strange error message: paphio:~/libvirt -> grep -i max_mem /usr/include/xen/*.h | grep 11 /usr/include/xen/domctl.h:#define XEN_DOMCTL_max_mem 11 paphio:~/libvirt -> Applied and commited, thanks ! Once applied I checked all the values against the original ones from /usr/include/xen/domctl.h , they look fine now paphio:~/libvirt -> grep 'define XEN_V2_OP_' src/xen_internal.c #define XEN_V2_OP_GETDOMAININFOLIST 6 #define XEN_V2_OP_DESTROYDOMAIN 2 #define XEN_V2_OP_PAUSEDOMAIN 3 #define XEN_V2_OP_UNPAUSEDOMAIN 4 #define XEN_V2_OP_SETMAXMEM 11 #define XEN_V2_OP_SETMAXVCPU 15 #define XEN_V2_OP_SETVCPUMAP 9 #define XEN_V2_OP_GETVCPUINFO 14 #define XEN_V2_OP_GETVCPUMAP 25 paphio:~/libvirt -> only XEN_V2_OP_GETDOMAININFOLIST is actually a sysop operation and defined in a different header file: /usr/include/xen/sysctl.h:#define XEN_SYSCTL_getdomaininfolist 6 thanks a lot ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hi
Applied and commited, thanks !
This patch is not applied when I confirm the latest revision. (xen_internal.c 1.68) Please apply this? Thanks, Masayuki Sunou. In message <20070326100807.GD26242@redhat.com> "Re: [Libvir] [PATCH] Fix value of XEN_V2_OP_SETMAXMEM" "Daniel Veillard <veillard@redhat.com>" wrote:
On Mon, Mar 26, 2007 at 09:24:27AM +0900, Masayuki Sunou wrote:
Hi
Because the value of XEN_V2_OP_SETMAXMEM in xen_internal.c is wrong, virsh setmaxmem outputs error message. --> Both XEN_V2_OP_SETMAXMEM and XEN_V2_OP_GETVCPUINFO are set to 14, but XEN_V2_OP_SETMAXMEM should be set to 11.
Ohh, right, now that explain the strange error message:
paphio:~/libvirt -> grep -i max_mem /usr/include/xen/*.h | grep 11 /usr/include/xen/domctl.h:#define XEN_DOMCTL_max_mem 11 paphio:~/libvirt ->
Applied and commited, thanks !
Once applied I checked all the values against the original ones from /usr/include/xen/domctl.h , they look fine now
paphio:~/libvirt -> grep 'define XEN_V2_OP_' src/xen_internal.c #define XEN_V2_OP_GETDOMAININFOLIST 6 #define XEN_V2_OP_DESTROYDOMAIN 2 #define XEN_V2_OP_PAUSEDOMAIN 3 #define XEN_V2_OP_UNPAUSEDOMAIN 4 #define XEN_V2_OP_SETMAXMEM 11 #define XEN_V2_OP_SETMAXVCPU 15 #define XEN_V2_OP_SETVCPUMAP 9 #define XEN_V2_OP_GETVCPUINFO 14 #define XEN_V2_OP_GETVCPUMAP 25 paphio:~/libvirt ->
only XEN_V2_OP_GETDOMAININFOLIST is actually a sysop operation and defined in a different header file:
/usr/include/xen/sysctl.h:#define XEN_SYSCTL_getdomaininfolist 6
thanks a lot !
Daniel
-- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Wed, Mar 28, 2007 at 09:04:50AM +0900, Masayuki Sunou wrote:
Hi
Applied and commited, thanks !
This patch is not applied when I confirm the latest revision. (xen_internal.c 1.68)
Oops, I had filled the ChangeLog, bit forgot the cvs commit step apparently, sorry about this ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel Veillard
-
Masayuki Sunou