|
34 | 34 | #include <clocksource/hyperv_timer.h> |
35 | 35 | #include <linux/highmem.h> |
36 | 36 |
|
37 | | -u64 hv_current_partition_id = ~0ull; |
38 | | -EXPORT_SYMBOL_GPL(hv_current_partition_id); |
39 | | - |
40 | 37 | void *hv_hypercall_pg; |
41 | 38 | EXPORT_SYMBOL_GPL(hv_hypercall_pg); |
42 | 39 |
|
@@ -393,24 +390,6 @@ static void __init hv_stimer_setup_percpu_clockev(void) |
393 | 390 | old_setup_percpu_clockev(); |
394 | 391 | } |
395 | 392 |
|
396 | | -static void __init hv_get_partition_id(void) |
397 | | -{ |
398 | | - struct hv_get_partition_id *output_page; |
399 | | - u64 status; |
400 | | - unsigned long flags; |
401 | | - |
402 | | - local_irq_save(flags); |
403 | | - output_page = *this_cpu_ptr(hyperv_pcpu_output_arg); |
404 | | - status = hv_do_hypercall(HVCALL_GET_PARTITION_ID, NULL, output_page); |
405 | | - if (!hv_result_success(status)) { |
406 | | - /* No point in proceeding if this failed */ |
407 | | - pr_err("Failed to get partition ID: %lld\n", status); |
408 | | - BUG(); |
409 | | - } |
410 | | - hv_current_partition_id = output_page->partition_id; |
411 | | - local_irq_restore(flags); |
412 | | -} |
413 | | - |
414 | 393 | #if IS_ENABLED(CONFIG_HYPERV_VTL_MODE) |
415 | 394 | static u8 __init get_vtl(void) |
416 | 395 | { |
@@ -605,11 +584,9 @@ void __init hyperv_init(void) |
605 | 584 |
|
606 | 585 | register_syscore_ops(&hv_syscore_ops); |
607 | 586 |
|
608 | | - if (cpuid_ebx(HYPERV_CPUID_FEATURES) & HV_ACCESS_PARTITION_ID) |
| 587 | + if (ms_hyperv.priv_high & HV_ACCESS_PARTITION_ID) |
609 | 588 | hv_get_partition_id(); |
610 | 589 |
|
611 | | - BUG_ON(hv_root_partition && hv_current_partition_id == ~0ull); |
612 | | - |
613 | 590 | #ifdef CONFIG_PCI_MSI |
614 | 591 | /* |
615 | 592 | * If we're running as root, we want to create our own PCI MSI domain. |
|
0 commit comments