All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
@ 2019-06-10  5:15 Baodong Chen
  2019-06-10 20:11 ` Julien Grall
  0 siblings, 1 reply; 4+ messages in thread
From: Baodong Chen @ 2019-06-10  5:15 UTC (permalink / raw)
  To: xen-devel; +Cc: Baodong Chen, Julien Grall, Stefano Stabellini

Already done by clear_page() in alloc_vcpu_struct()

Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
---
 xen/arch/arm/domain.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index ff330b3..ad1b106 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -557,7 +557,6 @@ int arch_vcpu_create(struct vcpu *v)
                                            - sizeof(struct cpu_info));
     memset(v->arch.cpu_info, 0, sizeof(*v->arch.cpu_info));
 
-    memset(&v->arch.saved_context, 0, sizeof(v->arch.saved_context));
     v->arch.saved_context.sp = (register_t)v->arch.cpu_info;
     v->arch.saved_context.pc = (register_t)continue_new_vcpu;
 
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
  2019-06-10  5:15 [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu Baodong Chen
@ 2019-06-10 20:11 ` Julien Grall
  2019-06-11  0:09   ` chenbaodong
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2019-06-10 20:11 UTC (permalink / raw)
  To: Baodong Chen, xen-devel; +Cc: Stefano Stabellini

Hi,

Thank you for the patch. The title should be at max 80 characters. So 
how about the following title?

"xen/arm: domain: Remove redundant memset for v->arch.saved_context"

On 6/10/19 6:15 AM, Baodong Chen wrote:
> Already done by clear_page() in alloc_vcpu_struct()

Please try to make sentence in the commit message. For here I would suggest:

"v->arch.saved_context is already zeroed in alloc_vcpu_struct() by 
clear_page(). So there are no need to memset it again in 
arch_vcpu_create()."

If you are happy with the two changes, I can do them on commit.

Cheers,

> 
> Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
> ---
>   xen/arch/arm/domain.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index ff330b3..ad1b106 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -557,7 +557,6 @@ int arch_vcpu_create(struct vcpu *v)
>                                              - sizeof(struct cpu_info));
>       memset(v->arch.cpu_info, 0, sizeof(*v->arch.cpu_info));
>   
> -    memset(&v->arch.saved_context, 0, sizeof(v->arch.saved_context));
>       v->arch.saved_context.sp = (register_t)v->arch.cpu_info;
>       v->arch.saved_context.pc = (register_t)continue_new_vcpu;
>   
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
  2019-06-10 20:11 ` Julien Grall
@ 2019-06-11  0:09   ` chenbaodong
  2019-06-11 13:29     ` Julien Grall
  0 siblings, 1 reply; 4+ messages in thread
From: chenbaodong @ 2019-06-11  0:09 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: Stefano Stabellini


On 6/11/19 04:11, Julien Grall wrote:
> Hi,
>
> Thank you for the patch. The title should be at max 80 characters. So 
> how about the following title?
>
> "xen/arm: domain: Remove redundant memset for v->arch.saved_context"
Max 80 characters, roger that.
>
> On 6/10/19 6:15 AM, Baodong Chen wrote:
>> Already done by clear_page() in alloc_vcpu_struct()
>
> Please try to make sentence in the commit message. For here I would 
> suggest:
>
> "v->arch.saved_context is already zeroed in alloc_vcpu_struct() by 
> clear_page(). So there are no need to memset it again in 
> arch_vcpu_create()."
>
> If you are happy with the two changes, I can do them on commit.
Thanks, please.
>
> Cheers,
>
>>
>> Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
>> ---
>>   xen/arch/arm/domain.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>> index ff330b3..ad1b106 100644
>> --- a/xen/arch/arm/domain.c
>> +++ b/xen/arch/arm/domain.c
>> @@ -557,7 +557,6 @@ int arch_vcpu_create(struct vcpu *v)
>>                                              - sizeof(struct cpu_info));
>>       memset(v->arch.cpu_info, 0, sizeof(*v->arch.cpu_info));
>>   -    memset(&v->arch.saved_context, 0, sizeof(v->arch.saved_context));
>>       v->arch.saved_context.sp = (register_t)v->arch.cpu_info;
>>       v->arch.saved_context.pc = (register_t)continue_new_vcpu;
>>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
  2019-06-11  0:09   ` chenbaodong
@ 2019-06-11 13:29     ` Julien Grall
  0 siblings, 0 replies; 4+ messages in thread
From: Julien Grall @ 2019-06-11 13:29 UTC (permalink / raw)
  To: chenbaodong, xen-devel; +Cc: Stefano Stabellini



On 11/06/2019 01:09, chenbaodong wrote:
> 
> On 6/11/19 04:11, Julien Grall wrote:
>> Hi,
>>
>> Thank you for the patch. The title should be at max 80 characters. So how 
>> about the following title?
>>
>> "xen/arm: domain: Remove redundant memset for v->arch.saved_context"
> Max 80 characters, roger that.
>>
>> On 6/10/19 6:15 AM, Baodong Chen wrote:
>>> Already done by clear_page() in alloc_vcpu_struct()
>>
>> Please try to make sentence in the commit message. For here I would suggest:
>>
>> "v->arch.saved_context is already zeroed in alloc_vcpu_struct() by 
>> clear_page(). So there are no need to memset it again in arch_vcpu_create()."
>>
>> If you are happy with the two changes, I can do them on commit.
> Thanks, please.

Committed, thank you!

Cheers,

>>
>> Cheers,
>>
>>>
>>> Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
>>> ---
>>>   xen/arch/arm/domain.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>>> index ff330b3..ad1b106 100644
>>> --- a/xen/arch/arm/domain.c
>>> +++ b/xen/arch/arm/domain.c
>>> @@ -557,7 +557,6 @@ int arch_vcpu_create(struct vcpu *v)
>>>                                              - sizeof(struct cpu_info));
>>>       memset(v->arch.cpu_info, 0, sizeof(*v->arch.cpu_info));
>>>   -    memset(&v->arch.saved_context, 0, sizeof(v->arch.saved_context));
>>>       v->arch.saved_context.sp = (register_t)v->arch.cpu_info;
>>>       v->arch.saved_context.pc = (register_t)continue_new_vcpu;
>>>
>>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-06-11 13:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10  5:15 [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu Baodong Chen
2019-06-10 20:11 ` Julien Grall
2019-06-11  0:09   ` chenbaodong
2019-06-11 13:29     ` Julien Grall

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.