Greetings,
My co-worker and I are looking into Xen Hypervisor. By any chance, do you or
any of your colleagues have technical material/ papers/ presentations detailing
how the hypercall interacts with the hypervisor?
Thank you in advance for any assistance,
- Rapidash
Some specific questions:
- If the memory of the VM is stored on non-congruent sections of the host's
machine memory, how does the hypercall handler check whether a passed in
pointer parameter falls within these VM claimed sections of memory?
- Since the hypercalls are limited in number compared to syscalls, is there
ever an instance where the domain will require a syscall that the hypercall
does not cover?
Also, we have been looking at the Xen hypercall source code to try and figure
out the mechanics there. In file "hypercall-x86_64.h" there is the following
code segment we are attempting to decipher (from it, we can figure out the
preceding functions):
#define _hypercall5(type, name, a1, a2, a3, a4, a5) \
({ \
long __res, __ign1, __ign2, __ign3; \
asm volatile ( \
"movq %7,%%r10; movq %8,%%r8; " \
"call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
: "=a" (__res), "=D" (__ign1), "=S" (__ign2), \
"=d" (__ign3) \
: "1" ((long)(a1)), "2" ((long)(a2)), \
"3" ((long)(a3)), "g" ((long)(a4)), \
"g" ((long)(a5)) \
: "memory", "r10", "r8" ); \
(type)__res; \
})
- The first line within the asm volatile section, are the contents of registers
being saved to memory? If so, where?
- In the third and fourth lines within the same section, are values from __res
being placed into the "a" register, or are the values within the "a" register
being stored in the variable __res for use later?
- Does the "1", "2", "3", "g", "g" correspond to the ebx, ecx, edx, esi, and
edi registers? Or are they a different set?
Sent with [ProtonMail](https://protonmail.com) Secure Email.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel