All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm/domain: fix comment for arch_set_info_guest
@ 2022-08-05 13:08 Luca Fancellu
  2022-08-05 13:12 ` Luca Fancellu
  2022-08-05 17:35 ` Julien Grall
  0 siblings, 2 replies; 8+ messages in thread
From: Luca Fancellu @ 2022-08-05 13:08 UTC (permalink / raw)
  To: xen-devel
  Cc: bertrand.marquis, wei.chen, Stefano Stabellini, Julien Grall,
	Volodymyr Babchuk

The function arch_set_info_guest is not reached anymore through
VCPUOP_initialise on arm, update the comment.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
Changes in v2:
 - rephrased comment to not list caller functions (Julien)
---
 xen/arch/arm/domain.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 2cd481979cf1..9db8a37a089c 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -885,9 +885,8 @@ 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 may be supplied by an external entity, so
+ * we need to validate it
  */
 int arch_set_info_guest(
     struct vcpu *v, vcpu_guest_context_u c)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-08-05 13:08 [PATCH] arm/domain: fix comment for arch_set_info_guest Luca Fancellu
@ 2022-08-05 13:12 ` Luca Fancellu
  2022-08-05 17:35 ` Julien Grall
  1 sibling, 0 replies; 8+ messages in thread
From: Luca Fancellu @ 2022-08-05 13:12 UTC (permalink / raw)
  To: Xen development discussion
  Cc: Bertrand Marquis, Wei Chen, Stefano Stabellini, Julien Grall,
	Volodymyr Babchuk



> On 5 Aug 2022, at 14:08, Luca Fancellu <luca.fancellu@arm.com> wrote:
> 
> The function arch_set_info_guest is not reached anymore through
> VCPUOP_initialise on arm, update the comment.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>

Hi All,

Sorry I forgot to put v2 in the tag.

Cheers,
Luca

> ---
> Changes in v2:
> - rephrased comment to not list caller functions (Julien)
> ---
> xen/arch/arm/domain.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index 2cd481979cf1..9db8a37a089c 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -885,9 +885,8 @@ 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 may be supplied by an external entity, so
> + * we need to validate it
>  */
> int arch_set_info_guest(
>     struct vcpu *v, vcpu_guest_context_u c)
> -- 
> 2.17.1
> 
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-08-05 13:08 [PATCH] arm/domain: fix comment for arch_set_info_guest Luca Fancellu
  2022-08-05 13:12 ` Luca Fancellu
@ 2022-08-05 17:35 ` Julien Grall
  2022-08-22  6:56   ` Luca Fancellu
  1 sibling, 1 reply; 8+ messages in thread
From: Julien Grall @ 2022-08-05 17:35 UTC (permalink / raw)
  To: Luca Fancellu, xen-devel
  Cc: bertrand.marquis, wei.chen, Stefano Stabellini, Volodymyr Babchuk

Hi Luca,

On 05/08/2022 14:08, Luca Fancellu wrote:
> The function arch_set_info_guest is not reached anymore through
> VCPUOP_initialise on arm, update the comment.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> ---
> Changes in v2:
>   - rephrased comment to not list caller functions (Julien)
> ---
>   xen/arch/arm/domain.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index 2cd481979cf1..9db8a37a089c 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -885,9 +885,8 @@ 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 may be supplied by an external entity, so
> + * we need to validate it

NIT: Missing a full stop. This can be added on commit.

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-08-05 17:35 ` Julien Grall
@ 2022-08-22  6:56   ` Luca Fancellu
  2022-08-22  8:09     ` Julien Grall
  0 siblings, 1 reply; 8+ messages in thread
From: Luca Fancellu @ 2022-08-22  6:56 UTC (permalink / raw)
  To: Julien Grall
  Cc: Xen development discussion, Bertrand Marquis, Wei Chen,
	Stefano Stabellini, Volodymyr Babchuk



> On 5 Aug 2022, at 18:35, Julien Grall <julien@xen.org> wrote:
> 
> Hi Luca,
> 
> On 05/08/2022 14:08, Luca Fancellu wrote:
>> The function arch_set_info_guest is not reached anymore through
>> VCPUOP_initialise on arm, update the comment.
>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
>> ---
>> Changes in v2:
>>  - rephrased comment to not list caller functions (Julien)
>> ---
>>  xen/arch/arm/domain.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>> index 2cd481979cf1..9db8a37a089c 100644
>> --- a/xen/arch/arm/domain.c
>> +++ b/xen/arch/arm/domain.c
>> @@ -885,9 +885,8 @@ 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 may be supplied by an external entity, so
>> + * we need to validate it
> 
> NIT: Missing a full stop. This can be added on commit.
> 
> Acked-by: Julien Grall <jgrall@amazon.com>

Hi Julien,

Any plan to commit this one? Not an important change, just asking so that I can remove it
from my watch list.

Cheers,
Luca

> 
> Cheers,
> 
> -- 
> Julien Grall



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-08-22  6:56   ` Luca Fancellu
@ 2022-08-22  8:09     ` Julien Grall
  0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2022-08-22  8:09 UTC (permalink / raw)
  To: Luca Fancellu
  Cc: Xen development discussion, Bertrand Marquis, Wei Chen,
	Stefano Stabellini, Volodymyr Babchuk

Hi Luca,

On 22/08/2022 07:56, Luca Fancellu wrote:
> 
> 
>> On 5 Aug 2022, at 18:35, Julien Grall <julien@xen.org> wrote:
>>
>> Hi Luca,
>>
>> On 05/08/2022 14:08, Luca Fancellu wrote:
>>> The function arch_set_info_guest is not reached anymore through
>>> VCPUOP_initialise on arm, update the comment.
>>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
>>> ---
>>> Changes in v2:
>>>   - rephrased comment to not list caller functions (Julien)
>>> ---
>>>   xen/arch/arm/domain.c | 5 ++---
>>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>>> index 2cd481979cf1..9db8a37a089c 100644
>>> --- a/xen/arch/arm/domain.c
>>> +++ b/xen/arch/arm/domain.c
>>> @@ -885,9 +885,8 @@ 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 may be supplied by an external entity, so
>>> + * we need to validate it
>>
>> NIT: Missing a full stop. This can be added on commit.
>>
>> Acked-by: Julien Grall <jgrall@amazon.com>
> 
> Hi Julien,
> 
> Any plan to commit this one? Not an important change, just asking so that I can remove it
> from my watch list.

Sorry for the delay. It is now pushed.

Cheers,

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-07-28 18:07 ` Julien Grall
@ 2022-07-28 18:08   ` Luca Fancellu
  0 siblings, 0 replies; 8+ messages in thread
From: Luca Fancellu @ 2022-07-28 18:08 UTC (permalink / raw)
  To: Julien Grall
  Cc: Xen development discussion, Bertrand Marquis, Wei Chen,
	Stefano Stabellini, Volodymyr Babchuk



> On 28 Jul 2022, at 19:07, Julien Grall <julien@xen.org> wrote:
> 
> Hi Luca,
> 
> On 25/07/2022 15:46, Luca Fancellu wrote:
>> The function arch_set_info_guest is not reached anymore through
>> VCPUOP_initialise on arm, update the comment.
>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
>> ---
>> xen/arch/arm/domain.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>> index 2f8eaab7b56b..6451cd013c1a 100644
>> --- a/xen/arch/arm/domain.c
>> +++ b/xen/arch/arm/domain.c
>> @@ -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"

Sounds good! I’ll update and push it soon!

> 
> Cheers,
> 
> -- 
> Julien Grall


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] arm/domain: fix comment for arch_set_info_guest
  2022-07-25 14:46 Luca Fancellu
@ 2022-07-28 18:07 ` Julien Grall
  2022-07-28 18:08   ` Luca Fancellu
  0 siblings, 1 reply; 8+ messages in thread
From: Julien Grall @ 2022-07-28 18:07 UTC (permalink / raw)
  To: Luca Fancellu, xen-devel
  Cc: bertrand.marquis, wei.chen, Stefano Stabellini, Volodymyr Babchuk

Hi Luca,

On 25/07/2022 15:46, Luca Fancellu wrote:
> The function arch_set_info_guest is not reached anymore through
> VCPUOP_initialise on arm, update the comment.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> ---
>   xen/arch/arm/domain.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index 2f8eaab7b56b..6451cd013c1a 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -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,

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] arm/domain: fix comment for arch_set_info_guest
@ 2022-07-25 14:46 Luca Fancellu
  2022-07-28 18:07 ` Julien Grall
  0 siblings, 1 reply; 8+ messages in thread
From: Luca Fancellu @ 2022-07-25 14:46 UTC (permalink / raw)
  To: xen-devel
  Cc: bertrand.marquis, wei.chen, Stefano Stabellini, Julien Grall,
	Volodymyr Babchuk

The function arch_set_info_guest is not reached anymore through
VCPUOP_initialise on arm, update the comment.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 xen/arch/arm/domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 2f8eaab7b56b..6451cd013c1a 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -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)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-22  8:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 13:08 [PATCH] arm/domain: fix comment for arch_set_info_guest Luca Fancellu
2022-08-05 13:12 ` Luca Fancellu
2022-08-05 17:35 ` Julien Grall
2022-08-22  6:56   ` Luca Fancellu
2022-08-22  8:09     ` Julien Grall
  -- strict thread matches above, loose matches on Subject: below --
2022-07-25 14:46 Luca Fancellu
2022-07-28 18:07 ` Julien Grall
2022-07-28 18:08   ` Luca Fancellu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.