Given that we explicitly support guests making hypercalls without the
use of the hypercall page (for CFI and speculative safety reasons), note
explicitly that %rcx/%r11 need preserving/clobbering around SYSCALL.
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <jbeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
I've avoided mentioning FRED seeing as Xen (now) maintains legacy
behaviour.
---
docs/guest-guide/x86/hypercall-abi.rst | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/guest-guide/x86/hypercall-abi.rst b/docs/guest-guide/x86/hypercall-abi.rst
index e52ed453bcab..ffcf9b1b6d84 100644
--- a/docs/guest-guide/x86/hypercall-abi.rst
+++ b/docs/guest-guide/x86/hypercall-abi.rst
@@ -62,7 +62,7 @@ between virtualisation mode and hardware vendor.
- INT 0x82
* - 64bit PV
- - SYSCALL
+ - SYSCALL [#syscall]_
* - Intel HVM
- VMCALL
@@ -138,6 +138,10 @@ means.
kernel, hypercalls issues from such a mode will be interpreted with the
32bit ABI. Such a setup is not expected in production scenarios.
+.. [#syscall] The ``SYSCALL`` instruction modifies ``%rcx`` and ``%r11``.
+ These registers want spilling or marking as clobbered if invoking the
+ hypercall without the use of the hypercall page.
+
.. [#iret] ``HYPERCALL_iret`` is special. It is only implemented for PV
guests and takes all its parameters on the stack. This stub should be
``jmp``'d to, rather than ``call``'d. HVM guests have this stub
--
2.34.1