Lakshman Jayaraju
2013-Jan-03 06:02 UTC
[Beginners question]- Compilation error while trying user program from domU
Hi all, My aim is to invoke hypercalls from programs inside guest domains. So in this regard I wrote a sample program as below that invokes a function(xc_domain_getinfo) declared in xenctrl.h. *Sample Program:* #include<stdio.h> #include<xenctrl.h> int main() { printf("Attempt to invoke hypercall!!!\n"); int handle,rc; xc_dominfo_t *info; handle = xc_interface_open(); printf(Äcquired handle :%d\n",handle); rc = xc_domain_getinfo(handle,3,1,info); printf(" The returned value is :%d\n",rc); return 0; } I linked xenctrl library from dom0, but I am getting compilation error saying *xenctrl.h: No such file or directory*. Then as per the error message I tried copying(by downloading source) required header files as and when it says missing header files name on consecutive compilation. But I ended up with path conflicts and couldn't succeed in compiling. *My doubts:* * Do I need to copy header files manually into guest domain? - I tried copying header files required as per compilation error msgs but I ended up with conflicts. * Any pointers to detailed guide to invoke hypercalls from guest domains?? Thanks, Lakshman -- View this message in context: http://xen.1045712.n5.nabble.com/Beginners-question-Compilation-error-while-trying-user-program-from-domU-tp5713299.html Sent from the Xen - User mailing list archive at Nabble.com. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Ian Campbell
2013-Jan-03 09:01 UTC
Re: [Beginners question]- Compilation error while trying user program from domU
On Thu, 2013-01-03 at 06:02 +0000, Lakshman Jayaraju wrote:> * Do I need to copy header files manually into guest domain? - I tried > copying header files required as per compilation error msgs but I ended up > with conflicts.You should ideally just use your distros provided xen library packages. If that isn''t an option then compile and install the xen tools in the guest or compile your application statically in dom0 and copy that over. Possibly you might get away with just the tools/libxc subdirectory. Ian.
Lakshman Jayaraju
2013-Jan-05 05:53 UTC
Re: [Beginners question]- Compilation error while trying user program from domU
Thanks Ian, It works!!! -- View this message in context: http://xen.1045712.n5.nabble.com/Beginners-question-Compilation-error-while-trying-user-program-from-dom0-tp5713299p5713347.html Sent from the Xen - User mailing list archive at Nabble.com.