arm/domain: fix comment for arch_set_info_guest
PATCH 1/1 arm/domain: fix comment for arch_set_info_guest
The function arch_set_info_guest is not reached anymore through VCPUOP_initialise on arm, update the comment.
--- xen/arch/arm/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/domain.c +3 -3
@@ -882,9 +882,9 @@ static int is_guest_pv64_psr(uint64_t psr)#endif /* -* Initialise VCPU state. The context can be supplied by either the -* toolstack (XEN_DOMCTL_setvcpucontext) or the guest -* (VCPUOP_initialise) and therefore must be properly validated. +* Initialise VCPU state. The context can be supplied by the toolstack +* (XEN_DOMCTL_setvcpucontext) and therefore must be properly validated, +* or by PSCI call (PSCI_cpu_on) handled by vpsci module. */ int arch_set_info_guest (struct vcpu *v,vcpu_guest_context_u c)
Signature · 1 line
2.17.1
Hi Luca,
Quoted 13 lines · Luca Fancellu
The function
arch_set_info_guestis not reached anymore throughVCPUOP_initialiseon arm, update the comment.Signed-off-by Luca Fancellu <[email protected]>--- xen/arch/arm/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)xen/arch/arm/domain.c +0
-0
xen/arch/arm/domain.c static int is_guest_pv64_psr(uint64_t psr) · line 888
Quoted 10 lines
xen/arch/arm/domain.c +3
-3@@ -882,9 +882,9 @@ static int is_guest_pv64_psr(uint64_t psr)#endif /* -* Initialise VCPU state. The context can be supplied by either the -* toolstack (XEN_DOMCTL_setvcpucontext) or the guest -* (VCPUOP_initialise) and therefore must be properly validated. +* Initialise VCPU state. The context can be supplied by the toolstack +* (XEN_DOMCTL_setvcpucontext) and therefore must be properly validated, +* or by PSCI call (PSCI_cpu_on) handled by vpsci module. */
I would prefer if the comment doesn't mention who are the callers. So there are no need to modify the comment the next time we add/remove a caller. How about something like:
"Initialise vCPU state. The context may be supplied by an external entity, so we need to validate it"
Cheers,
Signature · 1 line
Julien Grall
Quoted 30 lines · Julien Grall
Hi Luca,
Quoted 11 lines · Luca Fancellu
The function
arch_set_info_guestis not reached anymore throughVCPUOP_initialiseon arm, update the comment.Signed-off-by Luca Fancellu <[email protected]>---
xen/arch/arm/domain.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)xen/arch/arm/domain.c +0
-0xen/arch/arm/domain.c static int is_guest_pv64_psr(uint64_t psr) · line 887
Quoted 9 lines
xen/arch/arm/domain.c +3
-3@@ -882,9 +882,9 @@ static int is_guest_pv64_psr(uint64_t psr)#endif /* -* Initialise VCPU state. The context can be supplied by either the -* toolstack (XEN_DOMCTL_setvcpucontext) or the guest -* (VCPUOP_initialise) and therefore must be properly validated. +* Initialise VCPU state. The context can be supplied by the toolstack +* (XEN_DOMCTL_setvcpucontext) and therefore must be properly validated, +* or by PSCI call (PSCI_cpu_on) handled by vpsci module. */ I would prefer if the comment doesn't mention who are the callers. So there are no need to modify the comment the next time we add/remove a caller. How about something like:
Quoted 1 line
"Initialise vCPU state. The context may be supplied by an external entity, so we need to validate it"
Sounds good! I’ll update and push it soon!
Quoted 5 lines
Cheers,
Signature · 1 line
Julien Grall