[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()


  • To: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Sep 2021 17:05:29 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=IP9Nv0cIrdlrBoAnJCxni7bp4ywqxfkmNM9UrWGzWYA=; b=C8flN417nCodQ2W3sFYV88/LHD78fPsNqZnE264MVif5zbV744T0LWwe+KsPa0b/WwmYiCsEF6iMfUOQFkoX4V7PSgMuYdToNrUGMZft2zM6jqBd84UNJkE1dQ/0Wt4MqFCOfFj7u8E2bniTRE8xs82JhSfdn5Iclk21IEcgUmyEx75jo2gQyUcbhZKLZ/4FaANJKZZpjooKMJinH5qn+8tnIGnsWit4S9s7wz16gY2i2gKqUkpDloTGKrKBT6T3Z16M6hrT3zpS1cnYPMGcKlVOBUp6au5+b9+RLGPZl/8vq72jbJiSivN8oYuioY/GlC57CIo+V4b1/12Pjt58CA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ns8PIUH4HBPYN8nG/aNG+hoF+00HD2FvBYj04W+wLoQOLj3EPWr5pupwDtfkcdAavvCQVPOYb7jE2NX7iHDL6vbpVvhhOdHilnCQs+CtHQdckCmt345stSHVYCpjdaUhCayz2Ozkj+rRmd9PDVOdL6Iq0E9kKHNwFhuyQrKzFiiZxaJbU8FAgQ0HwydrJYlUUquEzU17i/bGehJlgN70eMEphMLsjlrsDqWFFIacDSFNZQl49m40vq+qVAT9QdBsvQSnEdd6yqqiPw3xyGopeAcj6SBFF5wi43WSb7FNcekqylm2obOJu74alV2Q6Ql24ud4mPBnoMLQkny1oZQHhQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Sep 2021 15:05:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Just after having obtained the pointer from kzalloc() there's no reason
at all to set part of the area to all zero yet another time. Similarly
there's no point explicitly clearing "ldt_ents".

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/arch/x86/xen/smp_pv.c
+++ b/arch/x86/xen/smp_pv.c
@@ -290,8 +290,6 @@ cpu_initialize_context(unsigned int cpu,
 
        gdt = get_cpu_gdt_rw(cpu);
 
-       memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt));
-
        /*
         * Bring up the CPU in cpu_bringup_and_idle() with the stack
         * pointing just below where pt_regs would be if it were a normal
@@ -308,8 +306,6 @@ cpu_initialize_context(unsigned int cpu,
 
        xen_copy_trap_info(ctxt->trap_ctxt);
 
-       ctxt->ldt_ents = 0;
-
        BUG_ON((unsigned long)gdt & ~PAGE_MASK);
 
        gdt_mfn = arbitrary_virt_to_mfn(gdt);




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.