All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: speck@linutronix.de
Cc: Andi Kleen <ak@linux.intel.com>
Subject: [MODERATED] [PATCH 0/4] RFC-MDSv1 1
Date: Sun, 11 Nov 2018 19:41:00 -0800	[thread overview]
Message-ID: <cover.1541993526.git.ak@linux.intel.com> (raw)

Here's a preview of patches to add VERW support to the Linux for the
recently released Coffelake microcode. This allows the kernel
to flush CPU buffers on kernel boundaries and when going into idle.

This mainly covers single thread, not SMT (except for the idle case)

I lumped all the issues together under the Microarchitectural Data
Sampling (MDS) name because they need the same mitigations,a
and it doesn't seem worth duplicating the sysfs files and bug entries.

Patches passed some stress testing.

Some notes:
- So far against 4.19
- 64bit only so far. 32bit will be in future versions.
- Some other CPUs will need software sequences. These will
be in a future version of the patchkit, and also will require
moving some of the hooks.
- One of the MSR bits uses the older name "Microarchitectural Buffer
Sampling" (MBS). So far I kept that until that documentation is updated.

Right now this is not to apply, but to discuss and that people can
experiment if they want.

Comments welcome.

Andi Kleen (4):
  x86/speculation/mds: Add basic bug infrastructre for MDS
  x86/speculation/mds: Clear CPU buffers on kernel exit for 64bit
  x86/speculation/mds: Clear CPU buffers on entering idle
  x86/speculation/mds: Add sysfs reporting

 .../admin-guide/kernel-parameters.txt         |  3 ++
 arch/x86/entry/calling.h                      |  8 ++++
 arch/x86/entry/entry_64.S                     |  6 +++
 arch/x86/entry/entry_64_compat.S              |  1 +
 arch/x86/include/asm/cpufeatures.h            |  2 +
 arch/x86/include/asm/irqflags.h               |  3 ++
 arch/x86/include/asm/msr-index.h              |  1 +
 arch/x86/include/asm/mwait.h                  |  4 ++
 arch/x86/include/asm/nospec-branch.h          |  5 +++
 arch/x86/kernel/cpu/bugs.c                    | 44 +++++++++++++++++++
 arch/x86/kernel/cpu/common.c                  | 14 ++++++
 arch/x86/kernel/kvm.c                         |  1 +
 arch/x86/kernel/process.c                     |  4 ++
 arch/x86/kernel/smpboot.c                     |  1 +
 drivers/base/cpu.c                            |  8 ++++
 15 files changed, 105 insertions(+)

-- 
2.17.2

             reply	other threads:[~2018-11-12  3:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  3:41 Andi Kleen [this message]
2018-11-12  3:41 ` [MODERATED] [PATCH 1/4] RFC-MDSv1 4 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 2/4] RFC-MDSv1 0 Andi Kleen
2018-11-13  0:07   ` [MODERATED] " Andrew Cooper
2018-11-13  1:35     ` Andi Kleen
2018-11-13 21:59       ` Andrew Cooper
2018-11-14  4:04         ` Andi Kleen
2018-12-09 18:12           ` Andrew Cooper
2018-11-13 20:47   ` Jiri Kosina
2018-11-13 21:04     ` Luck, Tony
2018-11-14  2:32     ` Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 3/4] RFC-MDSv1 3 Andi Kleen
2018-11-12  3:41 ` [MODERATED] [PATCH 4/4] RFC-MDSv1 2 Andi Kleen
2018-11-12 22:36   ` [MODERATED] " Greg KH
2018-11-13  1:37     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1541993526.git.ak@linux.intel.com \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=speck@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.