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
42 /* Storage to save the hypercall page temporarily for hibernation */
58 return -EINVAL; in hyperv_init_ghcb()
71 return -ENOMEM; in hyperv_init_ghcb()
103 * The VP assist page is an "overlay" page (see Hyper-V TLFS's in hv_cpu_init()
114 * Hyper-V should never specify a VM that is a Confidential in hv_cpu_init()
117 * page in non-root partition here. in hv_cpu_init()
267 * CPU or just disable the feature if there are no online CPUs in hv_cpu_die()
268 * left (happens on hibernation). in hv_cpu_die()
288 * A Generation-2 VM doesn't support legacy PCI/PCIe, so both in hv_pci_init()
289 * raw_pci_ops and raw_pci_ext_ops are NULL, and pci_subsys_init() -> in hv_pci_init()
290 * pcibios_init() doesn't call pcibios_resource_survey() -> in hv_pci_init()
299 * acpi_nfit_register_region() -> acpi_nfit_insert_resource() -> in hv_pci_init()
311 /* For Generation-1 VM, we'll proceed in pci_arch_init(). */ in hv_pci_init()
321 return -EPERM; in hv_suspend()
325 * across hibernation. Setting hv_hypercall_pg to NULL ensures in hv_suspend()
333 /* Disable the hypercall page in the hypervisor */ in hv_suspend()
350 /* Re-enable the hypercall page */ in hv_resume()
385 * Still register the LAPIC timer, because the direct-mode STIMER is in hv_stimer_setup_percpu_clockev()
386 * not supported by old versions of Hyper-V. This also allows users in hv_stimer_setup_percpu_clockev()
407 input->partition_id = HV_PARTITION_ID_SELF; in get_vtl()
408 input->vp_index = HV_VP_INDEX_SELF; in get_vtl()
409 input->input_vtl.as_uint8 = 0; in get_vtl()
410 input->names[0] = HV_REGISTER_VSM_VP_STATUS; in get_vtl()
414 ret = output->values[0].reg8 & HV_X64_VTL_MASK; in get_vtl()
432 * 2. Register Hyper-V specific clocksource.
433 * 3. Setup Hyper-V specific APIC entry points.
487 * page to Hyper-V, e.g. hv_post_message() uses the per-CPU page in hyperv_init()
552 * Some versions of Hyper-V that provide IBT in guest VMs have a bug in hyperv_init()
556 * enabled, and Linux panics. For such buggy versions, disable IBT. in hyperv_init()
558 * Fixed versions of Hyper-V always provide ENDBR64 on the hypercall in hyperv_init()
559 * page, so if future Linux kernel versions enable IBT for 32-bit in hyperv_init()
567 pr_warn("Disabling IBT because of Hyper-V bug\n"); in hyperv_init()
573 * apic_intr_mode_init() -> x86_platform.apic_post_init() and in hyperv_init()
574 * apic_bsp_setup() -> setup_local_APIC(). The direct-mode STIMER in hyperv_init()
674 wrmsrl(HV_X64_MSR_CRASH_P2, regs->ip); in hyperv_report_panic()
675 wrmsrl(HV_X64_MSR_CRASH_P3, regs->ax); in hyperv_report_panic()
676 wrmsrl(HV_X64_MSR_CRASH_P4, regs->sp); in hyperv_report_panic()
679 * Let Hyper-V know there is crash data available in hyperv_report_panic()
690 * Ensure that we're really on Hyper-V, and not a KVM or Xen in hv_is_hyperv_initialized()
691 * emulation of Hyper-V in hv_is_hyperv_initialized()