[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Hypercall Inquiries


  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: Rapidash <Rapidash@xxxxxxxxxxxxxx>
  • Date: Thu, 11 May 2017 10:22:24 -0400
  • Delivery-date: Thu, 11 May 2017 14:29:06 +0000
  • Feedback-id: uOcpkkaAvhTVgyYoVQ1A7Mxon6S6X1YDDfuPObcrJLHY60W94ElLGeBZkd228uXLqSVs1--Qf7bCSnNpZJa1FQ==:Ext:ProtonMail
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

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 Secure Email.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.