xen/arm: domain: Remove redundant memset for v->arch.saved_context
authorBaodong Chen <chenbaodong@mxnavi.com>
Mon, 10 Jun 2019 05:15:47 +0000 (13:15 +0800)
committerJulien Grall <julien.grall@arm.com>
Tue, 11 Jun 2019 13:15:28 +0000 (14:15 +0100)
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().

Signed-off-by: Baodong Chen <chenbaodong@mxnavi.com>
[julien: Rework the commit message]
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain.c

index ff330b35e607f262ca19506858736b1029650a30..ad1b106bd7e5f08ce40dfad983be227ed3190113 100644 (file)
@@ -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;