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
22 #include <asm/hyperv-tlfs.h>
46 /* Storage to save the hypercall page temporarily for hibernation */
62 return -EINVAL; in hyperv_init_ghcb()
75 return -ENOMEM; in hyperv_init_ghcb()
107 * The VP assist page is an "overlay" page (see Hyper-V TLFS's in hv_cpu_init()
118 * Hyper-V should never specify a VM that is a Confidential in hv_cpu_init()
121 * page in non-root partition here. in hv_cpu_init()
271 * CPU or just disable the feature if there are no online CPUs in hv_cpu_die()
272 * left (happens on hibernation). in hv_cpu_die()
292 * A Generation-2 VM doesn't support legacy PCI/PCIe, so both in hv_pci_init()
293 * raw_pci_ops and raw_pci_ext_ops are NULL, and pci_subsys_init() -> in hv_pci_init()
294 * pcibios_init() doesn't call pcibios_resource_survey() -> in hv_pci_init()
303 * acpi_nfit_register_region() -> acpi_nfit_insert_resource() -> in hv_pci_init()
315 /* For Generation-1 VM, we'll proceed in pci_arch_init(). */ in hv_pci_init()
325 return -EPERM; in hv_suspend()
329 * across hibernation. Setting hv_hypercall_pg to NULL ensures in hv_suspend()
337 /* Disable the hypercall page in the hypervisor */ in hv_suspend()
354 /* Re-enable the hypercall page */ in hv_resume()
389 * Still register the LAPIC timer, because the direct-mode STIMER is in hv_stimer_setup_percpu_clockev()
390 * not supported by old versions of Hyper-V. This also allows users in hv_stimer_setup_percpu_clockev()
411 hv_current_partition_id = output_page->partition_id; in hv_get_partition_id()
429 input->header.partitionid = HV_PARTITION_ID_SELF; in get_vtl()
430 input->header.vpindex = HV_VP_INDEX_SELF; in get_vtl()
431 input->header.inputvtl = 0; in get_vtl()
432 input->element[0].name0 = HV_X64_REGISTER_VSM_VP_STATUS; in get_vtl()
436 ret = output->as64.low & HV_X64_VTL_MASK; in get_vtl()
454 * 2. Register Hyper-V specific clocksource.
455 * 3. Setup Hyper-V specific APIC entry points.
509 * page to Hyper-V, e.g. hv_post_message() uses the per-CPU page in hyperv_init()
574 * Some versions of Hyper-V that provide IBT in guest VMs have a bug in hyperv_init()
578 * enabled, and Linux panics. For such buggy versions, disable IBT. in hyperv_init()
580 * Fixed versions of Hyper-V always provide ENDBR64 on the hypercall in hyperv_init()
581 * page, so if future Linux kernel versions enable IBT for 32-bit in hyperv_init()
589 pr_warn("Disabling IBT because of Hyper-V bug\n"); in hyperv_init()
595 * apic_intr_mode_init() -> x86_platform.apic_post_init() and in hyperv_init()
596 * apic_bsp_setup() -> setup_local_APIC(). The direct-mode STIMER in hyperv_init()
698 wrmsrl(HV_X64_MSR_CRASH_P2, regs->ip); in hyperv_report_panic()
699 wrmsrl(HV_X64_MSR_CRASH_P3, regs->ax); in hyperv_report_panic()
700 wrmsrl(HV_X64_MSR_CRASH_P4, regs->sp); in hyperv_report_panic()
703 * Let Hyper-V know there is crash data available in hyperv_report_panic()
714 * Ensure that we're really on Hyper-V, and not a KVM or Xen in hv_is_hyperv_initialized()
715 * emulation of Hyper-V in hv_is_hyperv_initialized()