[tip: x86/cleanups] x86/msr: Document the I/O-like write semantics in the msr driver

tip-bot2 for Tim Wiederhake posted 1 patch 3 days, 21 hours ago
arch/x86/kernel/msr.c | 3 +++
1 file changed, 3 insertions(+)
[tip: x86/cleanups] x86/msr: Document the I/O-like write semantics in the msr driver
Posted by tip-bot2 for Tim Wiederhake 3 days, 21 hours ago
The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     b096d79bc1eed9eda57c12ccd76d6797cdba4cf2
Gitweb:        https://git.kernel.org/tip/b096d79bc1eed9eda57c12ccd76d6797cdba4cf2
Author:        Tim Wiederhake <twiederh@redhat.com>
AuthorDate:    Mon, 29 Jun 2026 19:37:59 +02:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 20 Jul 2026 19:57:33 -07:00

x86/msr: Document the I/O-like write semantics in the msr driver

Explain why msr_write() does not advance the index.

  [ bp: Massage commit message. ]

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260629173759.1770596-1-twiederh@redhat.com
---
 arch/x86/kernel/msr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 34bdb75..eb988df 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -13,6 +13,9 @@
  * and then read/write in chunks of 8 bytes.  A larger size means multiple
  * reads or writes of the same register.
  *
+ * Writing the same register multiple times can be useful for MSRs with
+ * I/O-like semantics, e.g. a virtual MSR that accepts logging information.
+ *
  * This driver uses /dev/cpu/%d/msr where %d is the minor number, and on
  * an SMP box will direct the access to CPU %d.
  */