diff options
Diffstat (limited to 'drivers/hv/hv.c')
-rw-r--r-- | drivers/hv/hv.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 0fb100ed91a3..12aa97f31f93 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c | |||
@@ -164,11 +164,6 @@ int hv_init(void) | |||
164 | 164 | ||
165 | max_leaf = query_hypervisor_info(); | 165 | max_leaf = query_hypervisor_info(); |
166 | 166 | ||
167 | rdmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid); | ||
168 | |||
169 | if (hv_context.guestid != 0) | ||
170 | goto cleanup; | ||
171 | |||
172 | /* Write our OS info */ | 167 | /* Write our OS info */ |
173 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); | 168 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); |
174 | hv_context.guestid = HV_LINUX_GUEST_ID; | 169 | hv_context.guestid = HV_LINUX_GUEST_ID; |
@@ -237,6 +232,9 @@ void hv_cleanup(void) | |||
237 | { | 232 | { |
238 | union hv_x64_msr_hypercall_contents hypercall_msr; | 233 | union hv_x64_msr_hypercall_contents hypercall_msr; |
239 | 234 | ||
235 | /* Reset our OS id */ | ||
236 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0); | ||
237 | |||
240 | kfree(hv_context.signal_event_buffer); | 238 | kfree(hv_context.signal_event_buffer); |
241 | hv_context.signal_event_buffer = NULL; | 239 | hv_context.signal_event_buffer = NULL; |
242 | hv_context.signal_event_param = NULL; | 240 | hv_context.signal_event_param = NULL; |