Lines Matching +full:has +full:- +full:legacy +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
27 pr_info("Linux runs in Hyper-V Virtual Trust Level\n"); in hv_vtl_init_platform()
42 x86_platform.legacy.i8042 = X86_LEGACY_I8042_PLATFORM_ABSENT; in hv_vtl_init_platform()
43 x86_platform.legacy.rtc = 0; in hv_vtl_init_platform()
44 x86_platform.legacy.warm_reset = 0; in hv_vtl_init_platform()
45 x86_platform.legacy.reserve_bios_regions = 0; in hv_vtl_init_platform()
46 x86_platform.legacy.devices.pnpbios = 0; in hv_vtl_init_platform()
53 return ((u64)desc->base3 << 32) | ((u64)desc->base2 << 24) | in hv_vtl_system_desc_base()
54 (desc->base1 << 16) | desc->base0; in hv_vtl_system_desc_base()
59 return ((u32)desc->limit1 << 16) | (u32)desc->limit0; in hv_vtl_system_desc_limit()
83 u64 rsp = (unsigned long)idle->thread.sp; in hv_vtl_bringup_vcpu()
99 input->partition_id = HV_PARTITION_ID_SELF; in hv_vtl_bringup_vcpu()
100 input->vp_index = target_vp_index; in hv_vtl_bringup_vcpu()
101 input->target_vtl.target_vtl = HV_VTL_MGMT; in hv_vtl_bringup_vcpu()
104 * The x86_64 Linux kernel follows the 16-bit -> 32-bit -> 64-bit in hv_vtl_bringup_vcpu()
105 * mode transition sequence after waking up an AP with SIPI whose in hv_vtl_bringup_vcpu()
106 * vector points to the 16-bit AP startup trampoline code. Here in in hv_vtl_bringup_vcpu()
107 * VTL2, we can't perform that sequence as the AP has to start in in hv_vtl_bringup_vcpu()
108 * the 64-bit mode. in hv_vtl_bringup_vcpu()
110 * To make this happen, we tell the hypervisor to load a valid 64-bit in hv_vtl_bringup_vcpu()
112 * so that AP jumps right to the 64-bit entry of the kernel, and the in hv_vtl_bringup_vcpu()
117 input->vp_context.rip = rip; in hv_vtl_bringup_vcpu()
118 input->vp_context.rsp = rsp; in hv_vtl_bringup_vcpu()
119 input->vp_context.rflags = 0x0000000000000002; in hv_vtl_bringup_vcpu()
120 input->vp_context.efer = __rdmsr(MSR_EFER); in hv_vtl_bringup_vcpu()
121 input->vp_context.cr0 = native_read_cr0(); in hv_vtl_bringup_vcpu()
122 input->vp_context.cr3 = __native_read_cr3(); in hv_vtl_bringup_vcpu()
123 input->vp_context.cr4 = native_read_cr4(); in hv_vtl_bringup_vcpu()
124 input->vp_context.msr_cr_pat = __rdmsr(MSR_IA32_CR_PAT); in hv_vtl_bringup_vcpu()
125 input->vp_context.idtr.limit = idt_ptr.size; in hv_vtl_bringup_vcpu()
126 input->vp_context.idtr.base = idt_ptr.address; in hv_vtl_bringup_vcpu()
127 input->vp_context.gdtr.limit = gdt_ptr.size; in hv_vtl_bringup_vcpu()
128 input->vp_context.gdtr.base = gdt_ptr.address; in hv_vtl_bringup_vcpu()
130 /* Non-system desc (64bit), long, code, present */ in hv_vtl_bringup_vcpu()
131 input->vp_context.cs.selector = __KERNEL_CS; in hv_vtl_bringup_vcpu()
132 input->vp_context.cs.base = 0; in hv_vtl_bringup_vcpu()
133 input->vp_context.cs.limit = 0xffffffff; in hv_vtl_bringup_vcpu()
134 input->vp_context.cs.attributes = 0xa09b; in hv_vtl_bringup_vcpu()
135 /* Non-system desc (64bit), data, present, granularity, default */ in hv_vtl_bringup_vcpu()
136 input->vp_context.ss.selector = __KERNEL_DS; in hv_vtl_bringup_vcpu()
137 input->vp_context.ss.base = 0; in hv_vtl_bringup_vcpu()
138 input->vp_context.ss.limit = 0xffffffff; in hv_vtl_bringup_vcpu()
139 input->vp_context.ss.attributes = 0xc093; in hv_vtl_bringup_vcpu()
142 input->vp_context.ldtr.selector = GDT_ENTRY_LDT * 8; in hv_vtl_bringup_vcpu()
143 input->vp_context.ldtr.base = hv_vtl_system_desc_base(ldt); in hv_vtl_bringup_vcpu()
144 input->vp_context.ldtr.limit = hv_vtl_system_desc_limit(ldt); in hv_vtl_bringup_vcpu()
145 input->vp_context.ldtr.attributes = 0x82; in hv_vtl_bringup_vcpu()
147 /* System desc (128bit), present, TSS, 0x8b - busy, 0x89 -- default */ in hv_vtl_bringup_vcpu()
148 input->vp_context.tr.selector = GDT_ENTRY_TSS * 8; in hv_vtl_bringup_vcpu()
149 input->vp_context.tr.base = hv_vtl_system_desc_base(tss); in hv_vtl_bringup_vcpu()
150 input->vp_context.tr.limit = hv_vtl_system_desc_limit(tss); in hv_vtl_bringup_vcpu()
151 input->vp_context.tr.attributes = 0x8b; in hv_vtl_bringup_vcpu()
159 ret = -EINVAL; in hv_vtl_bringup_vcpu()
168 ret = -EINVAL; in hv_vtl_bringup_vcpu()
189 input->partition_id = HV_PARTITION_ID_SELF; in hv_vtl_apicid_to_vp_id()
190 input->apic_ids[0] = apic_id; in hv_vtl_apicid_to_vp_id()
203 return -EINVAL; in hv_vtl_apicid_to_vp_id()
219 return -EINVAL; in hv_vtl_wakeup_secondary_cpu()
226 return -EINVAL; in hv_vtl_wakeup_secondary_cpu()
230 return -EINVAL; in hv_vtl_wakeup_secondary_cpu()
243 panic("XSAVE has to be disabled as it is not supported by this module.\n" in hv_vtl_early_init()