All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] CPUID-less CPU/sync_core fixes and improvements
@ 2016-12-09 18:24 Andy Lutomirski
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Lutomirski @ 2016-12-09 18:24 UTC (permalink / raw)
  To: x86
  Cc: Juergen Gross, One Thousand Gnomes, Andy Lutomirski,
	Peter Zijlstra, Brian Gerst, linux-kernel, Matthew Whitehead,
	Borislav Petkov, Henrique de Moraes Holschuh, Andrew Cooper,
	Boris Ostrovsky, xen-devel

*** PATCHES 1 and 2 MAY BE 4.9 MATERIAL ***

Alan Cox pointed out that the 486 isn't the only supported CPU that
doesn't have CPUID.  Let's clean up the mess and make everything
faster while we're at it.

Patch 1 is intended to be an easy fix: it makes sync_core() work
without CPUID on all 32-bit kernels.  It should be quite safe.  This
will have a negligible performance cost during boot on kernels built
for newer CPUs.  With this in place, patch 2 reverts the buggy 486
check I added.

Patches 3-4 are meant to improve the situation.  Patch 3 cleans up
the Intel microcode loader and the patch 4 (which depends on patch 3
to work correctly) stops using CPUID in sync_core() altogether.

Changes from v3:
 - Improve sync_core() comments.
 - Tidy up sync_core() asm.

Changes from v2:
 - Switch to IRET-to-self and get rid of all the paravirt code.
 - Further immprove the sync_core() comment.

Changes from v1:
 - Fix Xen
 - Add timing info to the changelog (hint: 2x speedup)
 - Document patch 1 a bit better.

Andy Lutomirski (4):
  x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit
    kernels
  Revert "x86/boot: Fail the boot if !M486 and CPUID is missing"
  x86/microcode/intel: Replace sync_core() with native_cpuid()
  x86/asm: Rewrite sync_core() to use IRET-to-self

 arch/x86/boot/cpu.c                   |  6 ---
 arch/x86/include/asm/processor.h      | 80 +++++++++++++++++++++++++----------
 arch/x86/kernel/cpu/microcode/intel.c | 26 ++++++++++--
 3 files changed, 81 insertions(+), 31 deletions(-)

-- 
2.9.3


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH v4 0/4] CPUID-less CPU/sync_core fixes and improvements
  2016-12-09 18:24 Andy Lutomirski
@ 2016-12-15 18:06 ` Andy Lutomirski
  2016-12-15 18:06 ` Andy Lutomirski
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Lutomirski @ 2016-12-15 18:06 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: X86 ML, One Thousand Gnomes, Borislav Petkov, linux-kernel,
	Brian Gerst, Matthew Whitehead, Henrique de Moraes Holschuh,
	Peter Zijlstra, xen-devel, Juergen Gross, Boris Ostrovsky,
	Andrew Cooper

On Fri, Dec 9, 2016 at 10:24 AM, Andy Lutomirski <luto@kernel.org> wrote:
> *** PATCHES 1 and 2 MAY BE 4.9 MATERIAL ***
>
> Alan Cox pointed out that the 486 isn't the only supported CPU that
> doesn't have CPUID.  Let's clean up the mess and make everything
> faster while we're at it.
>

Ping?  Any chance of getting these in for 4.10?

--Andy

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

* Re: [PATCH v4 0/4] CPUID-less CPU/sync_core fixes and improvements
  2016-12-09 18:24 Andy Lutomirski
  2016-12-15 18:06 ` Andy Lutomirski
@ 2016-12-15 18:06 ` Andy Lutomirski
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Lutomirski @ 2016-12-15 18:06 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Juergen Gross, One Thousand Gnomes, Peter Zijlstra, Brian Gerst,
	X86 ML, linux-kernel, Matthew Whitehead, Borislav Petkov,
	Henrique de Moraes Holschuh, Andrew Cooper, Boris Ostrovsky,
	xen-devel

On Fri, Dec 9, 2016 at 10:24 AM, Andy Lutomirski <luto@kernel.org> wrote:
> *** PATCHES 1 and 2 MAY BE 4.9 MATERIAL ***
>
> Alan Cox pointed out that the 486 isn't the only supported CPU that
> doesn't have CPUID.  Let's clean up the mess and make everything
> faster while we're at it.
>

Ping?  Any chance of getting these in for 4.10?

--Andy

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH v4 0/4] CPUID-less CPU/sync_core fixes and improvements
@ 2016-12-09 18:24 Andy Lutomirski
  2016-12-15 18:06 ` Andy Lutomirski
  2016-12-15 18:06 ` Andy Lutomirski
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Lutomirski @ 2016-12-09 18:24 UTC (permalink / raw)
  To: x86
  Cc: One Thousand Gnomes, Borislav Petkov, linux-kernel, Brian Gerst,
	Matthew Whitehead, Henrique de Moraes Holschuh, Peter Zijlstra,
	xen-devel, Juergen Gross, Boris Ostrovsky, Andrew Cooper,
	Andy Lutomirski

*** PATCHES 1 and 2 MAY BE 4.9 MATERIAL ***

Alan Cox pointed out that the 486 isn't the only supported CPU that
doesn't have CPUID.  Let's clean up the mess and make everything
faster while we're at it.

Patch 1 is intended to be an easy fix: it makes sync_core() work
without CPUID on all 32-bit kernels.  It should be quite safe.  This
will have a negligible performance cost during boot on kernels built
for newer CPUs.  With this in place, patch 2 reverts the buggy 486
check I added.

Patches 3-4 are meant to improve the situation.  Patch 3 cleans up
the Intel microcode loader and the patch 4 (which depends on patch 3
to work correctly) stops using CPUID in sync_core() altogether.

Changes from v3:
 - Improve sync_core() comments.
 - Tidy up sync_core() asm.

Changes from v2:
 - Switch to IRET-to-self and get rid of all the paravirt code.
 - Further immprove the sync_core() comment.

Changes from v1:
 - Fix Xen
 - Add timing info to the changelog (hint: 2x speedup)
 - Document patch 1 a bit better.

Andy Lutomirski (4):
  x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit
    kernels
  Revert "x86/boot: Fail the boot if !M486 and CPUID is missing"
  x86/microcode/intel: Replace sync_core() with native_cpuid()
  x86/asm: Rewrite sync_core() to use IRET-to-self

 arch/x86/boot/cpu.c                   |  6 ---
 arch/x86/include/asm/processor.h      | 80 +++++++++++++++++++++++++----------
 arch/x86/kernel/cpu/microcode/intel.c | 26 ++++++++++--
 3 files changed, 81 insertions(+), 31 deletions(-)

-- 
2.9.3

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

end of thread, other threads:[~2016-12-15 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-09 18:24 [PATCH v4 0/4] CPUID-less CPU/sync_core fixes and improvements Andy Lutomirski
  -- strict thread matches above, loose matches on Subject: below --
2016-12-09 18:24 Andy Lutomirski
2016-12-15 18:06 ` Andy Lutomirski
2016-12-15 18:06 ` Andy Lutomirski

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.