2 questions about hypercall
Hi, I've been reading the xen source code recently, and I have got 2 questions about hypercall.
1. I find 2 header files named hypercall.h in the directory linux/arch/x86/include. One is in the sub-directory /mach-xen/asm/hypercall.h, and the other is /asm/xen/hypercall.h. After comparing these two, I find their contents are similar but different, and I can't figure out what's the difference between them, what their purposes are , and when kernel want to trap into xen hypervisor, which one will kernel choose?
2. I find that the xen tools also used hypercall. My question is how does tools used it ? is the process the same as the kernel, or xen tools use hypercall in a different way?
--
View this message in context: http://xen.1045712.n5.nabble.com/2-questions-about-hypercall-tp5024421p5024421.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines · anita
Hi, I've been reading the xen source code recently, and I have got 2 questions about hypercall.
1. I find 2 header files named
hypercall.hin the directory linux/arch/x86/include. One is in the sub-directory /mach-xen/asm/hypercall.h, and the other is /asm/xen/hypercall.h. After comparing these two, I find their contents are similar but different, and I can't figure out what's the difference between them, what their purposes are , and when kernel want to trap into xen hypervisor, which one will kernel choose?
This is not the Xen source code. You appear to be looking at a linux source tree but you haven't said which.
Quoted 3 lines
2. I find that the xen tools also used hypercall. My question is how does tools used it ? is the process the same as the kernel, or xen tools use hypercall in a different way?
They use libxenctrl which in turn uses a special ioctl on /proc/xen/privcmd to make hypercalls.
Ian.
Quoted 9 lines
--
View this message in context: http://xen.1045712.n5.nabble.com/2-questions-about-hypercall-tp5024421p5024421.html
Sent from the Xen - Dev mailing list archive at Nabble.com._______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Thanks very much for your reply!
1. I'm using kernel 2.6.32.13
2. Do you mean that when the tools want to use hypercall, it doesn't
need to do
--->HYPERVISOR_XX ---> __hypercalln ----> int 0x82 as the
dom0 or domU do.
It simply executes the assembly-code in the privcmd_ioctl to do
the int0x82 ???
--
View this message in context: http://xen.1045712.n5.nabble.com/2-questions-about-hypercall-tp5024421p5029084.html
Sent from the Xen - Dev mailing list archive at Nabble.com.