Lines Matching +full:disable +full:- +full:hibernation +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-only
3 * X86 specific Hyper-V initialization code.
10 #define pr_fmt(fmt) "Hyper-V: " fmt
45 /* Storage to save the hypercall page temporarily for hibernation */
61 return -EINVAL; in hyperv_init_ghcb()
74 return -ENOMEM; in hyperv_init_ghcb()
106 * The VP assist page is an "overlay" page (see Hyper-V TLFS's in hv_cpu_init()
117 * Hyper-V should never specify a VM that is a Confidential in hv_cpu_init()
120 * page in non-root partition here. in hv_cpu_init()
270 * CPU or just disable the feature if there are no online CPUs in hv_cpu_die()
271 * left (happens on hibernation). in hv_cpu_die()
291 * A Generation-2 VM doesn't support legacy PCI/PCIe, so both in hv_pci_init()
292 * raw_pci_ops and raw_pci_ext_ops are NULL, and pci_subsys_init() -> in hv_pci_init()
293 * pcibios_init() doesn't call pcibios_resource_survey() -> in hv_pci_init()
302 * acpi_nfit_register_region() -> acpi_nfit_insert_resource() -> in hv_pci_init()
314 /* For Generation-1 VM, we'll proceed in pci_arch_init(). */ in hv_pci_init()
324 return -EPERM; in hv_suspend()
328 * across hibernation. Setting hv_hypercall_pg to NULL ensures in hv_suspend()
336 /* Disable the hypercall page in the hypervisor */ in hv_suspend()
353 /* Re-enable the hypercall page */ in hv_resume()
388 * Still register the LAPIC timer, because the direct-mode STIMER is in hv_stimer_setup_percpu_clockev()
389 * not supported by old versions of Hyper-V. This also allows users in hv_stimer_setup_percpu_clockev()
410 hv_current_partition_id = output_page->partition_id; in hv_get_partition_id()
428 input->partition_id = HV_PARTITION_ID_SELF; in get_vtl()
429 input->vp_index = HV_VP_INDEX_SELF; in get_vtl()
430 input->input_vtl.as_uint8 = 0; in get_vtl()
431 input->names[0] = HV_REGISTER_VSM_VP_STATUS; in get_vtl()
435 ret = output->values[0].reg8 & HV_X64_VTL_MASK; in get_vtl()
453 * 2. Register Hyper-V specific clocksource.
454 * 3. Setup Hyper-V specific APIC entry points.
508 * page to Hyper-V, e.g. hv_post_message() uses the per-CPU page in hyperv_init()
573 * Some versions of Hyper-V that provide IBT in guest VMs have a bug in hyperv_init()
577 * enabled, and Linux panics. For such buggy versions, disable IBT. in hyperv_init()
579 * Fixed versions of Hyper-V always provide ENDBR64 on the hypercall in hyperv_init()
580 * page, so if future Linux kernel versions enable IBT for 32-bit in hyperv_init()
588 pr_warn("Disabling IBT because of Hyper-V bug\n"); in hyperv_init()
594 * apic_intr_mode_init() -> x86_platform.apic_post_init() and in hyperv_init()
595 * apic_bsp_setup() -> setup_local_APIC(). The direct-mode STIMER in hyperv_init()
697 wrmsrl(HV_X64_MSR_CRASH_P2, regs->ip); in hyperv_report_panic()
698 wrmsrl(HV_X64_MSR_CRASH_P3, regs->ax); in hyperv_report_panic()
699 wrmsrl(HV_X64_MSR_CRASH_P4, regs->sp); in hyperv_report_panic()
702 * Let Hyper-V know there is crash data available in hyperv_report_panic()
713 * Ensure that we're really on Hyper-V, and not a KVM or Xen in hv_is_hyperv_initialized()
714 * emulation of Hyper-V in hv_is_hyperv_initialized()