Lines Matching full:best
76 struct kvm_cpuid_entry2 *best; in kvm_check_cpuid() local
82 best = cpuid_entry2_find(entries, nent, 0x80000008, 0); in kvm_check_cpuid()
83 if (best) { in kvm_check_cpuid()
84 int vaddr_bits = (best->eax & 0xff00) >> 8; in kvm_check_cpuid()
95 struct kvm_cpuid_entry2 *best; in kvm_update_pv_runtime() local
97 best = kvm_find_cpuid_entry(vcpu, KVM_CPUID_FEATURES, 0); in kvm_update_pv_runtime()
103 if (best) in kvm_update_pv_runtime()
104 vcpu->arch.pv_cpuid.features = best->eax; in kvm_update_pv_runtime()
109 struct kvm_cpuid_entry2 *best; in kvm_update_cpuid_runtime() local
111 best = kvm_find_cpuid_entry(vcpu, 1, 0); in kvm_update_cpuid_runtime()
112 if (best) { in kvm_update_cpuid_runtime()
115 cpuid_entry_change(best, X86_FEATURE_OSXSAVE, in kvm_update_cpuid_runtime()
118 cpuid_entry_change(best, X86_FEATURE_APIC, in kvm_update_cpuid_runtime()
122 best = kvm_find_cpuid_entry(vcpu, 7, 0); in kvm_update_cpuid_runtime()
123 if (best && boot_cpu_has(X86_FEATURE_PKU) && best->function == 0x7) in kvm_update_cpuid_runtime()
124 cpuid_entry_change(best, X86_FEATURE_OSPKE, in kvm_update_cpuid_runtime()
127 best = kvm_find_cpuid_entry(vcpu, 0xD, 0); in kvm_update_cpuid_runtime()
128 if (best) in kvm_update_cpuid_runtime()
129 best->ebx = xstate_required_size(vcpu->arch.xcr0, false); in kvm_update_cpuid_runtime()
131 best = kvm_find_cpuid_entry(vcpu, 0xD, 1); in kvm_update_cpuid_runtime()
132 if (best && (cpuid_entry_has(best, X86_FEATURE_XSAVES) || in kvm_update_cpuid_runtime()
133 cpuid_entry_has(best, X86_FEATURE_XSAVEC))) in kvm_update_cpuid_runtime()
134 best->ebx = xstate_required_size(vcpu->arch.xcr0, true); in kvm_update_cpuid_runtime()
136 best = kvm_find_cpuid_entry(vcpu, KVM_CPUID_FEATURES, 0); in kvm_update_cpuid_runtime()
137 if (kvm_hlt_in_guest(vcpu->kvm) && best && in kvm_update_cpuid_runtime()
138 (best->eax & (1 << KVM_FEATURE_PV_UNHALT))) in kvm_update_cpuid_runtime()
139 best->eax &= ~(1 << KVM_FEATURE_PV_UNHALT); in kvm_update_cpuid_runtime()
142 best = kvm_find_cpuid_entry(vcpu, 0x1, 0); in kvm_update_cpuid_runtime()
143 if (best) in kvm_update_cpuid_runtime()
144 cpuid_entry_change(best, X86_FEATURE_MWAIT, in kvm_update_cpuid_runtime()
153 struct kvm_cpuid_entry2 *best; in kvm_vcpu_after_set_cpuid() local
155 best = kvm_find_cpuid_entry(vcpu, 1, 0); in kvm_vcpu_after_set_cpuid()
156 if (best && apic) { in kvm_vcpu_after_set_cpuid()
157 if (cpuid_entry_has(best, X86_FEATURE_TSC_DEADLINE_TIMER)) in kvm_vcpu_after_set_cpuid()
165 best = kvm_find_cpuid_entry(vcpu, 0xD, 0); in kvm_vcpu_after_set_cpuid()
166 if (!best) in kvm_vcpu_after_set_cpuid()
170 (best->eax | ((u64)best->edx << 32)) & supported_xcr0; in kvm_vcpu_after_set_cpuid()
213 struct kvm_cpuid_entry2 *best; in cpuid_query_maxphyaddr() local
215 best = kvm_find_cpuid_entry(vcpu, 0x80000000, 0); in cpuid_query_maxphyaddr()
216 if (!best || best->eax < 0x80000008) in cpuid_query_maxphyaddr()
218 best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0); in cpuid_query_maxphyaddr()
219 if (best) in cpuid_query_maxphyaddr()
220 return best->eax & 0xff; in cpuid_query_maxphyaddr()