xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
PATCH 1/1 xen/arm: domain: remove redundant memset for arch's saved_context when creating vcpu
Already done by clear_page() in alloc_vcpu_struct()
--- xen/arch/arm/domain.c | 1 - 1 file changed, 1 deletion(-)
xen/arch/arm/domain.c +0 -1
@@ -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;
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
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"
Quoted 1 line · Baodong Chen
Already done by
clear_page()inalloc_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,
Quoted 19 lines
Signed-off-by Baodong Chen <[email protected]>--- xen/arch/arm/domain.c | 1 - 1 file changed, 1 deletion(-)xen/arch/arm/domain.c +0
-1@@ -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;
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines · Julien Grall
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.
Quoted 9 lines · Baodong Chen
Quoted 1 line
Already done by
clear_page()inalloc_vcpu_struct()Please try to make sentence in the commit message. For here I would suggest:
"
v->arch.saved_contextis already zeroed inalloc_vcpu_struct()byclear_page(). So there are no need to memset it again inarch_vcpu_create()."If you are happy with the two changes, I can do them on commit.
Thanks, please.
Quoted 9 lines
Cheers,
Quoted 6 lines
Signed-off-by Baodong Chen <[email protected]>---
xen/arch/arm/domain.c| 1 -1 file changed, 1 deletion(-)
Quoted 12 lines
xen/arch/arm/domain.c int arch_vcpu_create(struct vcpu *v) · line 562
Quoted 11 lines
xen/arch/arm/domain.c +0
-0@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · chenbaodong
Quoted 5 lines · Julien Grall
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.
Quoted 2 lines · Baodong Chen
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Already done by
clear_page()inalloc_vcpu_struct()Please try to make sentence in the commit message. For here I would suggest:
"
v->arch.saved_contextis already zeroed inalloc_vcpu_struct()byclear_page(). So there are no need to memset it again inarch_vcpu_create()."If you are happy with the two changes, I can do them on commit.
Thanks, please.
Committed, thank you!
Cheers,
Quoted 21 lines
Quoted 21 lines
Cheers,
Quoted 17 lines
Signed-off-by Baodong Chen <[email protected]>---
xen/arch/arm/domain.c| 1 -1 file changed, 1 deletion(-)xen/arch/arm/domain.c +0
-0@@ -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;
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel