diff options
| -rw-r--r-- | arch/x86/kernel/cpu/mshyperv.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index a7d26d83fb70..8f4be53ea04b 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c | |||
| @@ -35,13 +35,6 @@ static bool __init ms_hyperv_platform(void) | |||
| 35 | if (!boot_cpu_has(X86_FEATURE_HYPERVISOR)) | 35 | if (!boot_cpu_has(X86_FEATURE_HYPERVISOR)) |
| 36 | return false; | 36 | return false; |
| 37 | 37 | ||
| 38 | /* | ||
| 39 | * Xen emulates Hyper-V to support enlightened Windows. | ||
| 40 | * Check to see first if we are on a Xen Hypervisor. | ||
| 41 | */ | ||
| 42 | if (xen_cpuid_base()) | ||
| 43 | return false; | ||
| 44 | |||
| 45 | cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS, | 38 | cpuid(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS, |
| 46 | &eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]); | 39 | &eax, &hyp_signature[0], &hyp_signature[1], &hyp_signature[2]); |
| 47 | 40 | ||
| @@ -82,12 +75,6 @@ static void __init ms_hyperv_init_platform(void) | |||
| 82 | 75 | ||
| 83 | if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE) | 76 | if (ms_hyperv.features & HV_X64_MSR_TIME_REF_COUNT_AVAILABLE) |
| 84 | clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100); | 77 | clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100); |
| 85 | #if IS_ENABLED(CONFIG_HYPERV) | ||
| 86 | /* | ||
| 87 | * Setup the IDT for hypervisor callback. | ||
| 88 | */ | ||
| 89 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector); | ||
| 90 | #endif | ||
| 91 | } | 78 | } |
| 92 | 79 | ||
| 93 | const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = { | 80 | const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = { |
| @@ -103,6 +90,11 @@ static irq_handler_t vmbus_isr; | |||
| 103 | 90 | ||
| 104 | void hv_register_vmbus_handler(int irq, irq_handler_t handler) | 91 | void hv_register_vmbus_handler(int irq, irq_handler_t handler) |
| 105 | { | 92 | { |
| 93 | /* | ||
| 94 | * Setup the IDT for hypervisor callback. | ||
| 95 | */ | ||
| 96 | alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector); | ||
| 97 | |||
| 106 | vmbus_irq = irq; | 98 | vmbus_irq = irq; |
| 107 | vmbus_isr = handler; | 99 | vmbus_isr = handler; |
| 108 | } | 100 | } |
