From e469908d48d0d6f2c57336a7391c2eb81ff21bba Mon Sep 17 00:00:00 2001 From: Baodong Chen Date: Mon, 10 Jun 2019 13:15:47 +0800 Subject: [PATCH] xen/arm: domain: Remove redundant memset for v->arch.saved_context 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 [julien: Rework the commit message] Reviewed-by: Julien Grall --- 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 ff330b35e6..ad1b106bd7 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.30.2