Skip to content

Commit 9d9c965

Browse files
sunilmutgregkh
authored andcommitted
Drivers: hv: vmbus: Get rid of MSR access from vmbus_drv.c
Get rid of ISA specific code from vmus_drv.c which is common code. Fixes: 81b18bc ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic") Signed-off-by: Sunil Muthuswamy <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8afc06d commit 9d9c965

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/x86/include/asm/mshyperv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ static inline void vmbus_signal_eom(struct hv_message *msg, u32 old_msg_type)
9797
#define hv_set_synint_state(int_num, val) \
9898
wrmsrl(HV_X64_MSR_SINT0 + int_num, val)
9999

100+
#define hv_get_crash_ctl(val) \
101+
rdmsrl(HV_X64_MSR_CRASH_CTL, val)
102+
100103
void hyperv_callback_vector(void);
101104
void hyperv_reenlightenment_vector(void);
102105
#ifdef CONFIG_TRACING

drivers/hv/vmbus_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ static int vmbus_bus_init(void)
11461146
* Register for panic kmsg callback only if the right
11471147
* capability is supported by the hypervisor.
11481148
*/
1149-
rdmsrl(HV_X64_MSR_CRASH_CTL, hyperv_crash_ctl);
1149+
hv_get_crash_ctl(hyperv_crash_ctl);
11501150
if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG) {
11511151
hv_panic_page = (void *)get_zeroed_page(GFP_KERNEL);
11521152
if (hv_panic_page) {

0 commit comments

Comments
 (0)