From: kys@linuxonhyperv.com
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
jasowang@redhat.com, sthemmin@microsoft.com,
Michael.H.Kelley@microsoft.com, vkuznets@redhat.com
Cc: Sunil Muthuswamy <sunilmut@microsoft.com>,
"K . Y . Srinivasan" <kys@microsoft.com>
Subject: [PATCH 3/4] Drivers: hv: vmbus: Get rid of MSR access from vmbus_drv.c
Date: Sat, 28 Jul 2018 21:58:47 +0000 [thread overview]
Message-ID: <20180728215848.13814-3-kys@linuxonhyperv.com> (raw)
In-Reply-To: <20180728215848.13814-1-kys@linuxonhyperv.com>
From: Sunil Muthuswamy <sunilmut@microsoft.com>
Get rid of ISA specific code from vmus_drv.c which is common code.
Fixes: 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")
Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
arch/x86/include/asm/mshyperv.h | 3 +++
drivers/hv/vmbus_drv.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index 156a2e5a97a9..b731c4bf70ed 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -96,6 +96,9 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
#define hv_set_synint_state(int_num, val) \
wrmsrl(HV_X64_MSR_SINT0 + int_num, val)
+#define hv_get_crash_ctl(val) \
+ rdmsrl(HV_X64_MSR_CRASH_CTL, val)
+
void hyperv_callback_vector(void);
void hyperv_reenlightenment_vector(void);
#ifdef CONFIG_TRACING
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 5e946b1be54c..db145e1a7049 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1146,7 +1146,7 @@ static int vmbus_bus_init(void)
* Register for panic kmsg callback only if the right
* capability is supported by the hypervisor.
*/
- rdmsrl(HV_X64_MSR_CRASH_CTL, hyperv_crash_ctl);
+ hv_get_crash_ctl(hyperv_crash_ctl);
if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG) {
hv_panic_page = (void *)get_zeroed_page(GFP_KERNEL);
if (hv_panic_page) {
--
2.17.1
next prev parent reply other threads:[~2018-07-28 21:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-28 21:56 [PATCH 0/4] Drivers: hv: vmbus: Miscellaneous fixes/enhancements kys
2018-07-28 21:58 ` [PATCH 1/4] Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer kys
2018-07-28 21:58 ` [PATCH 2/4] Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_hdr kys
2018-07-28 21:58 ` kys [this message]
2018-07-28 21:58 ` [PATCH 4/4] Drivers: hv: vmbus: add numa_node to sysfs kys
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=20180728215848.13814-3-kys@linuxonhyperv.com \
--to=kys@linuxonhyperv.com \
--cc=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=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=vkuznets@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox