[PATCH v2 1/2] x86/msr: Document I/O-like MSR semantics in /dev/cpu/*/msr driver
From: Tim Wiederhake
Date: Fri Jun 26 2026 - 16:24:10 EST
Explain why msr_write and msr_read do not advance the index.
Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
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 4469c784eaa0..cc719a6b2ba3 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.
*/
--
2.52.0