Hi, I am trying to compile a program on Xen 4.1 which was working with Xen 3.4 . I am getting an error when g++ compiler tries to compile the following line: *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); Error is: error: ‘xc_memory_op’ was not declared in this scope I have searched in all the header files of libXen but I couldn''t find this function. Is this function deprecated? If it is then what is the alternate in Xen 4.1? Thanks, Shary _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Thu, 2012-08-30 at 02:24 +0100, S. Shary wrote:> Hi, > > I am trying to compile a program on Xen 4.1 which was working with Xen > 3.4 . > I am getting an error when g++ compiler tries to compile the following > line: > > *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); > > > Error is: > > error: ‘xc_memory_op’ was not declared in this scope > > > I have searched in all the header files of libXen but I couldn't find > this function. Is this function deprecated? If it is then what is the > alternate in Xen 4.1?You should use the specific function for the op you are interested in (in this case xc_maximum_ram_page) rather than the lower level function (which is now internal). Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
What will be the alternate for the following two situations of xc_memory_op? 1. /* Get the size of the P2M table */ //p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom) + 1; 2. if ( xc_memory_op(xc_handle, XENMEM_machphys_mfn_list, &xmml) || (xmml.nr_extents != m2p_chunks) ) { ERROR("xc_get_m2p_mfns"); goto err1; } If i just substitute with xc_maximum_ram_page(xc_handle), would that be correct? I could not find xc_maximum_ram_page with more than one arguments to substitute over here. Thanks, Regards, Shary> Subject: Re: [Xen-users] xc_memory_op not found in Xen 4.1 > From: Ian.Campbell@citrix.com > To: justsshary@hotmail.com > CC: xen-users@lists.xen.org > Date: Thu, 30 Aug 2012 07:45:44 +0100 > > On Thu, 2012-08-30 at 02:24 +0100, S. Shary wrote: > > Hi, > > > > I am trying to compile a program on Xen 4.1 which was working with Xen > > 3.4 . > > I am getting an error when g++ compiler tries to compile the following > > line: > > > > *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); > > > > > > Error is: > > > > error: ‘xc_memory_op’ was not declared in this scope > > > > > > I have searched in all the header files of libXen but I couldn''t find > > this function. Is this function deprecated? If it is then what is the > > alternate in Xen 4.1? > > You should use the specific function for the op you are interested in > (in this case xc_maximum_ram_page) rather than the lower level function > (which is now internal). > > Ian. > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Thu, 2012-08-30 at 17:21 +0100, S. Shary wrote:> What will be the alternate for the following two situations of > xc_memory_op? > > 1. /* Get the size of the P2M table */ > //p2m_size = xc_memory_op(xc_handle, XENMEM_maximum_gpfn, &dom) + > 1; > > > 2. if ( xc_memory_op(xc_handle, XENMEM_machphys_mfn_list, &xmml) || > (xmml.nr_extents != m2p_chunks) ) > { > ERROR("xc_get_m2p_mfns"); > goto err1; > } > > > If i just substitute with xc_maximum_ram_page(xc_handle), would that > be correct?I doubt it, that calls a totally different hypercall to what you mention above.> I could not find xc_maximum_ram_page with more than one arguments to > substitute over here.Search for XENMEM_maximum_gpfn and XENMEM_machphys_mfn_list in the libxc source and you will easily find the correct wrappers for those functions. Ian.