[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW2PR2101MB1113AED36F49875BA729D671A09E0@MW2PR2101MB1113.namprd21.prod.outlook.com>
Date: Sat, 12 May 2018 08:37:47 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"leann.ogasawara@...onical.com" <leann.ogasawara@...onical.com>,
"marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>,
Stephen Hemminger <sthemmin@...rosoft.com>
Subject: RE: [PATCH char-misc 1/2] Drivers: hv: vmbus: Remove x86 MSR refs in
arch independent code
> -----Original Message-----
> From: mhkelley58@...il.com <mhkelley58@...il.com>
> Sent: Tuesday, May 8, 2018 8:38 AM
> To: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> vkuznets@...hat.com; jasowang@...hat.com;
> leann.ogasawara@...onical.com; marcelo.cerri@...onical.com; Stephen
> Hemminger <sthemmin@...rosoft.com>; KY Srinivasan
> <kys@...rosoft.com>
> Subject: [PATCH char-misc 1/2] Drivers: hv: vmbus: Remove x86 MSR refs in
> arch independent code
>
> From: Michael Kelley <mikelley@...rosoft.com>
>
> In architecture independent code for manipulating Hyper-V synthetic timers
> and synthetic interrupts, pass in an ordinal number identifying the timer
> or interrupt, rather than an actual MSR register address. Then in
> x86/x64 specific code, map the ordinal number to the appropriate MSR.
> This change facilitates the introduction of an ARM64 version of Hyper-V,
> which uses the same synthetic timers and interrupts, but a different
> mechanism for accessing them.
>
> Signed-off-by: Michael Kelley <mikelley@...rosoft.com>
> ---
> arch/x86/include/asm/mshyperv.h | 12 ++++++++----
> drivers/hv/hv.c | 20 ++++++++------------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/arch/x86/include/asm/mshyperv.h
> b/arch/x86/include/asm/mshyperv.h
> index b90e796..caf9035 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -75,8 +75,10 @@ static inline void vmbus_signal_eom(struct
> hv_message *msg, u32 old_msg_type)
> }
> }
>
> -#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
Powered by blists - more mailing lists