xen: hypercalls doc update
cover xen: hypercalls doc update
Update hypercalls related docs before the release to avoid confusion.
@Henry:
Updating docs has no risks and is beneficial for the users, so it would be good to have it in 4.18.
Michal Orzel (2):
x86: Clarify that up to 5 hypercall parameters are supported xen/public: arch-arm: Update list of supported hypercalls
docs/guest-guide/x86/hypercall-abi.rst | 8 ++++---- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ xen/include/public/arch-x86/xen-x86_32.h | 2 +- xen/include/public/arch-x86/xen-x86_64.h | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/2 x86: Clarify that up to 5 hypercall parameters are supported
Update public headers and hypercall-abi doc as a consequence of commit 2f531c122e95 ("x86: limit number of hypercall parameters to 5").
--- docs/guest-guide/x86/hypercall-abi.rst | 8 ++++---- xen/include/public/arch-x86/xen-x86_32.h | 2 +- xen/include/public/arch-x86/xen-x86_64.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
docs/guest-guide/x86/hypercall-abi.rst +4 -4
@@ -4,7 +4,7 @@ Hypercall ABI ============= 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 [1]_.
@@ -18,17 +18,17 @@ The registers used for hypercalls depends on the operating mode of the guest. * - ABI - Hypercall Index - - Parameters (1 - 6) + - Parameters (1 - 5) - 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
xen/include/public/arch-x86/xen-x86_32.h +1 -1
@@ -12,7 +12,7 @@/* * 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
xen/include/public/arch-x86/xen-x86_64.h +1 -1
@@ -12,7 +12,7 @@/* * 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
Signature · 1 line
2.25.1
PATCH 2/2 xen/public: arch-arm: Update list of supported hypercalls
In reply to Michal OrzelThe list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
xen/include/public/arch-arm.h +21 -0
@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations
@@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations +* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist +* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as: +* * XEN_DMOP_set_irq_level +* * XEN_DMOP_nr_vcpus +* +* HYPERVISOR_xsm_op +* All generic sub-operations +* +* HYPERVISOR_multicall +* * Other notes on the ARM ABI: * * - struct start_info is not exported to ARM guests.
Signature · 1 line
2.25.1
Re: [for-4.18][PATCH 2/2] xen/public: arch-arm: Update list of supported hypercalls
Hi Michal,
Quoted 26 lines · Michal Orzel
The list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
Signed-off-by Michal Orzel <[email protected]>--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)xen/include/public/arch-arm.h +3
-0@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations @@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations
xen/include/public/arch-arm.h line 131
Quoted 10 lines
xen/include/public/arch-arm.h +10
-0+* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist +* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as:
I interpret this sentence as all the hypercall with 'ioreq' in their name is supported. But, for Arm, we at least don't support XEN_DMOP_map_mem_type_to_ioreq_server.
Cheers,
Signature · 1 line
Julien Grall
Re: [for-4.18][PATCH 2/2] xen/public: arch-arm: Update list of supported hypercalls
Hi Julien,
Quoted 37 lines · Julien Grall
Hi Michal,
Quoted 32 lines · Michal Orzel
The list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
Signed-off-by Michal Orzel <[email protected]>--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)xen/include/public/arch-arm.h +9
-0@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations @@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations +* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist
Quoted 8 lines
xen/include/public/arch-arm.h line 131
Quoted 4 lines
xen/include/public/arch-arm.h +4
-0+* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as: I interpret this sentence as all the hypercall with 'ioreq' in their name is supported. But, for Arm, we at least don't support
XEN_DMOP_map_mem_type_to_ioreq_server.
What I meant is that we support all sub-ops from ioreq_server_dm_op (ioreq.c). XEN_DMOP_map_mem_type_to_ioreq_server is only accessible on x86 and not part of ioreq.c
~Michal
Re: [for-4.18][PATCH 2/2] xen/public: arch-arm: Update list of supported hypercalls
Quoted 46 lines · Michal Orzel
Quoted 37 lines · Julien Grall
Hi Michal,
Quoted 32 lines · Michal Orzel
The list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
Signed-off-by Michal Orzel <[email protected]>--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)xen/include/public/arch-arm.h +9
-0@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations @@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations +* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist Quoted 8 lines
xen/include/public/arch-arm.h line 131
Quoted 4 lines
xen/include/public/arch-arm.h +4
-0+* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as: I interpret this sentence as all the hypercall with 'ioreq' in their name is supported. But, for Arm, we at least don't support
XEN_DMOP_map_mem_type_to_ioreq_server.
Quoted 2 lines
What I meant is that we support all sub-ops from
ioreq_server_dm_op(ioreq.c).XEN_DMOP_map_mem_type_to_ioreq_serveris only accessible on x86 and not part ofioreq.c
The header is a public interface and meant to be read by OS developper which may not be familiar with the source code. How about listing the subops we support?
This will avoid the developper to go through the source code to find out if a sub-op is implemented in ioreq.c or not.
Cheers,
Signature · 1 line
Julien Grall
Re: [for-4.18][PATCH 2/2] xen/public: arch-arm: Update list of supported hypercalls
Hello,
Quoted 54 lines · Julien Grall
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 46 lines · Michal Orzel
Quoted 37 lines · Julien Grall
Hi Michal,
Quoted 32 lines · Michal Orzel
The list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
Signed-off-by Michal Orzel <[email protected]>--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)xen/include/public/arch-arm.h +9
-0@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations @@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations +* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist Quoted 8 lines
xen/include/public/arch-arm.h line 131
Quoted 4 lines
xen/include/public/arch-arm.h +4
-0+* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as: I interpret this sentence as all the hypercall with 'ioreq' in their name is supported. But, for Arm, we at least don't support
XEN_DMOP_map_mem_type_to_ioreq_server.Quoted 2 lines
What I meant is that we support all sub-ops from
ioreq_server_dm_op(ioreq.c).XEN_DMOP_map_mem_type_to_ioreq_serveris only accessible on x86 and not part ofioreq.c
Quoted 6 lines
The header is a public interface and meant to be read by OS developper which may not be familiar with the source code. How about listing the subops we support?
This will avoid the developper to go through the source code to find out if a sub-op is implemented in
ioreq.cor not.
Sure, I fully agree so I will then send a v2 with:
* HYPERVISOR_dm_op
* Exactly these sub-operations are supported:
* * XEN_DMOP_create_ioreq_server * * XEN_DMOP_get_ioreq_server_info * * XEN_DMOP_map_io_range_to_ioreq_server * * XEN_DMOP_unmap_io_range_from_ioreq_server * * XEN_DMOP_set_ioreq_server_state * * XEN_DMOP_destroy_ioreq_server * * XEN_DMOP_set_irq_level * * XEN_DMOP_nr_vcpus
I will also skip x86 patch given that Andrew wants to extend it.
~Michal
Julien Grall
Acked-byRe: [for-4.18][PATCH 2/2] xen/public: arch-arm: Update list of supported hypercalls
Quoted 66 lines · Michal Orzel
Hello,
Quoted 54 lines · Julien Grall
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 46 lines · Michal Orzel
Quoted 37 lines · Julien Grall
Hi Michal,
Quoted 32 lines · Michal Orzel
The list is out of date and does not specify all the hypercalls/sub-ops we support, so update it.
Signed-off-by Michal Orzel <[email protected]>--- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)xen/include/public/arch-arm.h +9
-0@@ -104,6 +104,7 @@* Exactly these sub-operations are supported: * * HVMOP_set_param * * HVMOP_get_param +* * HVMOP_guest_request_vm_event * * HYPERVISOR_grant_table_op * All generic sub-operations @@ -116,6 +117,26 @@* HYPERVISOR_argo_op * All generic sub-operations * +* HYPERVISOR_hypfs_op +* All generic sub-operations +* +* HYPERVISOR_platform_op +* Exactly these sub-operations are supported: +* * XENPF_settime64 +* +* HYPERVISOR_vm_assist Quoted 8 lines
xen/include/public/arch-arm.h line 131
Quoted 4 lines
xen/include/public/arch-arm.h +4
-0+* All generic sub-operations +* +* HYPERVISOR_dm_op +* All ioreq server sub-operations are supported as well as: I interpret this sentence as all the hypercall with 'ioreq' in their name is supported. But, for Arm, we at least don't support
XEN_DMOP_map_mem_type_to_ioreq_server.Quoted 2 lines
What I meant is that we support all sub-ops from
ioreq_server_dm_op(ioreq.c).XEN_DMOP_map_mem_type_to_ioreq_serveris only accessible on x86 and not part ofioreq.cQuoted 6 lines
The header is a public interface and meant to be read by OS developper which may not be familiar with the source code. How about listing the subops we support?
This will avoid the developper to go through the source code to find out if a sub-op is implemented in
ioreq.cor not.Sure, I fully agree so I will then send a v2 with:
*HYPERVISOR_dm_op
* Exactly these sub-operations are supported:
Quoted 8 lines
* * XEN_DMOP_create_ioreq_server * * XEN_DMOP_get_ioreq_server_info * * XEN_DMOP_map_io_range_to_ioreq_server * * XEN_DMOP_unmap_io_range_from_ioreq_server * * XEN_DMOP_set_ioreq_server_state * * XEN_DMOP_destroy_ioreq_server * * XEN_DMOP_set_irq_level * * XEN_DMOP_nr_vcpus
Thanks! With that you can add:
Cheers,
Signature · 1 line
Julien Grall
Hi Michal,
Quoted 7 lines · Michal Orzel
Update hypercalls related docs before the release to avoid confusion.
@Henry:
Updating docs has no risks and is beneficial for the users, so it would be good to have it in 4.18.
Indeed, so with proper review of the series,
Kind regards,
Henry
Quoted 14 lines
Michal Orzel (2):
x86: Clarify that up to 5 hypercall parameters are supported xen/public: arch-arm: Update list of supported hypercallsdocs/guest-guide/x86/hypercall-abi.rst | 8 ++++---- xen/include/public/arch-arm.h | 21 +++++++++++++++++++++ xen/include/public/arch-x86/xen-x86_32.h | 2 +- xen/include/public/arch-x86/xen-x86_64.h | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-)Signature · 1 line
2.25.1