All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: chenbaodong <chenbaodong@mxnavi.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [Xen-devel] [PATCH] xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
Date: Tue, 11 Jun 2019 14:29:48 +0100	[thread overview]
Message-ID: <70763d79-0259-a340-ce9b-477d308629e4@arm.com> (raw)
In-Reply-To: <77b7d94b-35c8-6b28-075e-7096c5356373@mxnavi.com>



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

      reply	other threads:[~2019-06-11 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70763d79-0259-a340-ce9b-477d308629e4@arm.com \
    --to=julien.grall@arm.com \
    --cc=chenbaodong@mxnavi.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.