From: Takahiro Itazuri <itazur@amazon.com>
To: <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
Takahiro Itazuri <zulinx86@gmail.com>,
Takahiro Itazuri <itazur@amazon.com>
Subject: [PATCH] docs: Add desc for best effort mode of mmio_stale_data
Date: Wed, 30 Aug 2023 15:44:26 +0100 [thread overview]
Message-ID: <20230830144426.80258-1-itazur@amazon.com> (raw)
Similar to the sysfs files for mds and tsx_async_abort, that for
mmio_stale_data also provides the best effort mitigation mode which
invokes the mitigation instructions without a guarantee they clear the
CPU buffers to address virtualized scenarios. Adds description for the
mode in the mmio_stale_data's page to make it self-contained.
Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
---
.../hw-vuln/processor_mmio_stale_data.rst | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst b/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
index c98fd1190..c1c96eeb8 100644
--- a/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
+++ b/Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst
@@ -226,7 +226,7 @@ The possible values in this file are:
- The processor is vulnerable, but no mitigation enabled
* - 'Vulnerable: Clear CPU buffers attempted, no microcode'
- The processor is vulnerable, but microcode is not updated. The
- mitigation is enabled on a best effort basis.
+ mitigation is enabled on a best effort basis. See :ref:`best_effort`.
* - 'Mitigation: Clear CPU buffers'
- The processor is vulnerable and the CPU buffer clearing mitigation is
enabled.
@@ -254,6 +254,23 @@ the above information:
'SMT Host state unknown' Kernel runs in a VM, Host SMT state unknown
======================== ===========================================
+.. _best_effort:
+
+Best effort mitigation mode
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If the processor is vulnerable, but the availability of the microcode-based
+mitigation mechanism is not advertised via CPUID the kernel selects a best
+effort mitigation mode. This mode invokes the mitigation instructions
+without a guarantee that they clear the CPU buffers.
+
+This is done to address virtualization scenarios where the host has the
+microcode update applied, but the hypervisor is not yet updated to expose the
+CPUID to the guest. If the host has updated microcode the protection takes
+effect; otherwise a few CPU cycles are wasted pointlessly.
+
+The state in the mmio_stale_data sysfs file reflects this situation accordingly.
+
References
----------
.. [#f1] Affected Processors
--
2.40.1
next reply other threads:[~2023-08-30 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 14:44 Takahiro Itazuri [this message]
2023-08-30 14:50 ` [PATCH] docs: Add desc for best effort mode of mmio_stale_data Jonathan Corbet
2023-08-30 15:11 ` Takahiro Itazuri
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=20230830144426.80258-1-itazur@amazon.com \
--to=itazur@amazon.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=jpoimboe@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=zulinx86@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox