LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
To: KY Srinivasan <kys@microsoft.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"leann.ogasawara@canonical.com" <leann.ogasawara@canonical.com>,
	"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
	Stephen Hemminger <sthemmin@microsoft.com>
Subject: RE: [PATCH char-misc 1/2] Drivers: hv: vmbus: Remove x86 MSR refs in arch independent code
Date: Sat, 12 May 2018 12:55:41 +0000	[thread overview]
Message-ID: <SN6PR2101MB1120399369011D3C4E5E2017DC9E0@SN6PR2101MB1120.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MW2PR2101MB1113AED36F49875BA729D671A09E0@MW2PR2101MB1113.namprd21.prod.outlook.com>

> > -#define hv_init_timer(timer, tick) wrmsrl(timer, tick)
> > -#define hv_init_timer_config(config, val) wrmsrl(config, val)
> > +#define hv_init_timer(timer, tick) \
> > +	wrmsrl(HV_X64_MSR_STIMER0_COUNT + (2*timer), tick)
> > +#define hv_init_timer_config(timer, val) \
> > +	wrmsrl(HV_X64_MSR_STIMER0_CONFIG + (2*timer), val)
>
> Why are we stepping in units of 2?
> 
> K. Y

The register addresses for  the *_CONFIG and *_COUNT registers
are interleaved.  From hyperv-tlfs.h:

#define HV_X64_MSR_STIMER0_CONFIG               0x400000B0
#define HV_X64_MSR_STIMER0_COUNT                0x400000B1
#define HV_X64_MSR_STIMER1_CONFIG               0x400000B2
#define HV_X64_MSR_STIMER1_COUNT                0x400000B3
#define HV_X64_MSR_STIMER2_CONFIG               0x400000B4
#define HV_X64_MSR_STIMER2_COUNT                0x400000B5
#define HV_X64_MSR_STIMER3_CONFIG               0x400000B6
#define HV_X64_MSR_STIMER3_COUNT                0x400000B7

Michael

  reply	other threads:[~2018-05-12 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  0:37 [PATCH char-misc 0/2] Drivers: hv: vmbus: Remove x86-isms " mhkelley58
2018-05-08  0:37 ` [PATCH char-misc 1/2] Drivers: hv: vmbus: Remove x86 MSR refs " mhkelley58
2018-05-12  8:37   ` KY Srinivasan
2018-05-12 12:55     ` Michael Kelley (EOSG) [this message]
2018-05-08  0:37 ` [PATCH char-misc 2/2] Drivers: hv: vmbus: Make TLFS #define names architecture neutral mhkelley58

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=SN6PR2101MB1120399369011D3C4E5E2017DC9E0@SN6PR2101MB1120.namprd21.prod.outlook.com \
    --to=michael.h.kelley@microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=leann.ogasawara@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    --subject='RE: [PATCH char-misc 1/2] Drivers: hv: vmbus: Remove x86 MSR refs in arch independent code' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).