From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179573B38B8 for ; Fri, 26 Jun 2026 20:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782505419; cv=none; b=kgR5uv4KjD7V4l2MBPJz390JUGcHP9Kp31JYW1doGTkfnq380naeMmcc4PHb5XlVkQxQfOfuW7vZPlttbTGRcb0YWmVkiXq5KPHa6zF6JVckSYtbmqFmkteWko9T1UaEYA3JcUGOu2H03wS5023U3K/FMNyVrcgP7pmhERoMnNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782505419; c=relaxed/simple; bh=QrqZ/3FMQJ8VD8FlV+TF8MJKnrQjnegPs+TJk/Z50Qk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W82Uh1kgNiRi2JlPI7g6bHibKWu77tfmihtCoYGBHFQfh38XBj0/ar0dDaojhB6ggHDp+E0+KOr1Hr+hp38UHI7MfXrEyzqRRd4I90KWUFND/6PZMz3LOz6I6u0gF4Xu9w/yjS4a8MQEaIIKMR0CcZiRG3/YTtpDY/f4NQeIvm0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Q8g96tI6; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q8g96tI6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782505417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S+tp15UkNaplrPQw9wiFqL6t7YQPuc481/CgE1mqjo8=; b=Q8g96tI6Ct/KtEPIHrq53AWuD+hg5dKXEDE6uKV8mxrCNr3Z2dOvQ29OX95LKJa+msmyHJ cGqAlFbnb7lCei/TRve15t2OccHVI6BuKPMcm+SUd18vN+LxIE4GtoUt6//Qab5FbP7rrs 1/yfyG/0ahDrdY3/CMQC6FZnFAY/vDs= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-232-L2P5zAJkOHG17A_-cAJZZg-1; Fri, 26 Jun 2026 16:23:31 -0400 X-MC-Unique: L2P5zAJkOHG17A_-cAJZZg-1 X-Mimecast-MFC-AGG-ID: L2P5zAJkOHG17A_-cAJZZg_1782505410 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6D30718001E1; Fri, 26 Jun 2026 20:23:30 +0000 (UTC) Received: from work.redhat.com (unknown [10.44.48.194]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 76CD21800351; Fri, 26 Jun 2026 20:23:27 +0000 (UTC) From: Tim Wiederhake To: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Tim Wiederhake Subject: [PATCH v2 1/2] x86/msr: Document I/O-like MSR semantics in /dev/cpu/*/msr driver Date: Fri, 26 Jun 2026 22:23:21 +0200 Message-ID: <20260626202323.1169433-2-twiederh@redhat.com> In-Reply-To: <20260626174037.1128563-1-twiederh@redhat.com> References: <20260626174037.1128563-1-twiederh@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Explain why msr_write and msr_read do not advance the index. Signed-off-by: Tim Wiederhake --- 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