=============
Hypercalls are system calls to Xen. Two modes of guest operation are
-supported, and up to 6 individual parameters are supported.
+supported, and up to 5 individual parameters are supported.
Hypercalls may only be issued by kernel-level software [#kern]_.
* - ABI
- Hypercall Index
- - Parameters (1 - 6)
+ - Parameters (1 - 5) [#params]_
- Result
* - 64bit
- RAX
- - RDI RSI RDX R10 R8 R9
+ - RDI RSI RDX R10 R8
- RAX
* - 32bit
- EAX
- - EBX ECX EDX ESI EDI EBP
+ - EBX ECX EDX ESI EDI
- EAX
32 and 64bit PV guests have an ABI fixed by their guest type. The ABI for an
.. [#kern] For HVM guests, ``HVMOP_guest_request_vm_event`` may be configured
to be usable from userspace, but this behaviour is not default.
+.. [#params] Xen's ABI used to declare support for 6 hypercall arguments,
+ using ``r9`` and ``ebp``. However, such an ABI clobbers the frame pointer
+ in the 32bit code and does not interact nicely with guest-side debugging.
+ ``V4V``, the predecessor to ``HYPERCALL_argo_op`` was a 6-argument
+ hypercall, but the ABI was intentionally altered when Argo was upstreamed
+ (Xen 4.13) to be the 5-argument hypercall it now is.
+
.. [#mode] While it is possible to use compatibility mode segments in a 64bit
kernel, hypercalls issues from such a mode will be interpreted with the
32bit ABI. Such a setup is not expected in production scenarios.
/*
* Hypercall interface:
- * Input: %ebx, %ecx, %edx, %esi, %edi, %ebp (arguments 1-6)
+ * Input: %ebx, %ecx, %edx, %esi, %edi (arguments 1-5)
* Output: %eax
* Access is via hypercall page (set up by guest loader or via a Xen MSR):
* call hypercall_page + hypercall-number * 32
/*
* Hypercall interface:
- * Input: %rdi, %rsi, %rdx, %r10, %r8, %r9 (arguments 1-6)
+ * Input: %rdi, %rsi, %rdx, %r10, %r8 (arguments 1-5)
* Output: %rax
* Access is via hypercall page (set up by guest loader or via a Xen MSR):
* call hypercall_page + hypercall-number * 32