Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / x86 / kernel / cpu / mshyperv.c
index daefd67a66c7959faf08e5a676712acc1cca73ec..3b3f713e15e5fea418ebc8eae3bc7a948570dd73 100644 (file)
@@ -59,13 +59,8 @@ void hyperv_vector_handler(struct pt_regs *regs)
 void hv_setup_vmbus_irq(void (*handler)(void))
 {
        vmbus_handler = handler;
-       /*
-        * Setup the IDT for hypervisor callback. Prevent reallocation
-        * at module reload.
-        */
-       if (!test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors))
-               alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR,
-                               hyperv_callback_vector);
+       /* Setup the IDT for hypervisor callback */
+       alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR, hyperv_callback_vector);
 }
 
 void hv_remove_vmbus_irq(void)
@@ -184,9 +179,15 @@ static void __init ms_hyperv_init_platform(void)
        ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
        ms_hyperv.hints    = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);
 
-       pr_info("HyperV: features 0x%x, hints 0x%x\n",
+       pr_info("Hyper-V: features 0x%x, hints 0x%x\n",
                ms_hyperv.features, ms_hyperv.hints);
 
+       ms_hyperv.max_vp_index = cpuid_eax(HVCPUID_IMPLEMENTATION_LIMITS);
+       ms_hyperv.max_lp_index = cpuid_ebx(HVCPUID_IMPLEMENTATION_LIMITS);
+
+       pr_debug("Hyper-V: max %u virtual processors, %u logical processors\n",
+                ms_hyperv.max_vp_index, ms_hyperv.max_lp_index);
+
        /*
         * Extract host information.
         */
@@ -219,7 +220,7 @@ static void __init ms_hyperv_init_platform(void)
                rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
                hv_lapic_frequency = div_u64(hv_lapic_frequency, HZ);
                lapic_timer_frequency = hv_lapic_frequency;
-               pr_info("HyperV: LAPIC Timer Frequency: %#x\n",
+               pr_info("Hyper-V: LAPIC Timer Frequency: %#x\n",
                        lapic_timer_frequency);
        }
 
@@ -254,7 +255,7 @@ static void __init ms_hyperv_init_platform(void)
 }
 
 const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
-       .name                   = "Microsoft HyperV",
+       .name                   = "Microsoft Hyper-V",
        .detect                 = ms_hyperv_platform,
        .init_platform          = ms_hyperv_init_platform,
 };