All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()
@ 2021-09-16 15:05 Jan Beulich
  2021-09-17  1:35 ` Boris Ostrovsky
  2021-09-20 15:18 ` Juergen Gross
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2021-09-16 15:05 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky; +Cc: Stefano Stabellini, lkml, xen-devel

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@suse.com>

--- 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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()
  2021-09-16 15:05 [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context() Jan Beulich
@ 2021-09-17  1:35 ` Boris Ostrovsky
  2021-09-20 15:18 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Boris Ostrovsky @ 2021-09-17  1:35 UTC (permalink / raw)
  To: Jan Beulich, Juergen Gross; +Cc: Stefano Stabellini, lkml, xen-devel


On 9/16/21 11:05 AM, Jan Beulich wrote:
> 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@suse.com>


Reviewed-by: Boris Ostrovsky <boris.ostrvsky@oracle.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()
  2021-09-16 15:05 [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context() Jan Beulich
  2021-09-17  1:35 ` Boris Ostrovsky
@ 2021-09-20 15:18 ` Juergen Gross
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2021-09-20 15:18 UTC (permalink / raw)
  To: Jan Beulich, Boris Ostrovsky; +Cc: Stefano Stabellini, lkml, xen-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 348 bytes --]

On 16.09.21 17:05, Jan Beulich wrote:
> 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@suse.com>

Pushed to xen/tip.git for-linus-5.15b


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-20 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 15:05 [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context() Jan Beulich
2021-09-17  1:35 ` Boris Ostrovsky
2021-09-20 15:18 ` Juergen Gross

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.