All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Andi Kleen <andi-Vw/NltI1exuRpAAqCnN02g@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: msr(7) manpage
Date: Tue, 24 Feb 2009 11:14:40 +0100	[thread overview]
Message-ID: <20090224101440.GV26292@one.firstfloor.org> (raw)
In-Reply-To: <cfd18e0f0902240140u464fdb95g25f9bb97a49cda63-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Feb 24, 2009 at 10:40:57PM +1300, Michael Kerrisk wrote:
> > .\" Some sentences copied from comment in arch/x86/kernel/msr.c
> > .TH MSR 7 2009-02-22 "Linux" "Linux Programmer's Manual"
> > .SH NAME
> > msr \- x86 CPU MSR access device
> > .SH DESCRIPTION
> > .I /dev/cpu/CPUNUM/msr
> > allows to read and write the model specific registers (MSRs) of an x86 CPU.
> > .I CPUNUM
> > is the number of the cpu to access as listed in
> > .I /proc/cpuinfo.
> > The register access is done by opening the file and seeking to the MSR
> > number
> 
> Could you clarify "seek to the MSR number" == does that mean seek to
> offset (MSR_number * 8) or something like that?

No it means seek to MSR number. Yes the semantics are a little weird.

> 
> > as offset in the file and then read or write in chunks of 8 bytes.
> > A larger size than 8 bytes means multiple reads or writes of the
> > same register.
> 
> What are the semantics of reading the same register multiple times?
> Is a read non-destructive?  Do the multiple reads always get the same
> value?

It depends on the hardware. A typical x86 CPU has hundreds
of different MSRs. Typically they're non destructive, but some
might still change. I intentionally didn't try to cover that but
just added references (although those could be probably also
extended)

BTW what I also forgot was a note that it's root only.

Please just edit it yourself. I assume you'll be doing that anyways.

-Andi

-- 
ak-VuQAYsv1563Yd54FQh9/CA@public.gmane.org -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-02-24 10:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-22 17:05 msr(7) manpage Andi Kleen
     [not found] ` <20090222170549.GA23589-qrUzlfsMFqo/4alezvVtWx2eb7JE58TQ@public.gmane.org>
2009-02-24  9:40   ` Michael Kerrisk
     [not found]     ` <cfd18e0f0902240140u464fdb95g25f9bb97a49cda63-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-24  9:44       ` Michael Kerrisk
     [not found]         ` <cfd18e0f0902240144o3f1a9fbew57d880a484eb99de-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-24 17:15           ` H. Peter Anvin
2009-02-24 10:14       ` Andi Kleen [this message]
2009-03-30 19:29   ` Michael Kerrisk
     [not found]     ` <cfd18e0f0903301229n73c47368v64c1aadc12f58056-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-30 19:35       ` Michael Kerrisk

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=20090224101440.GV26292@one.firstfloor.org \
    --to=andi-vw/nlti1exurpaaqcnn02g@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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.