Lines Matching full:best
69 struct kvm_cpuid_entry2 *best; in kvm_update_cpuid() local
72 best = kvm_find_cpuid_entry(vcpu, 1, 0); in kvm_update_cpuid()
73 if (!best) in kvm_update_cpuid()
77 if (boot_cpu_has(X86_FEATURE_XSAVE) && best->function == 0x1) { in kvm_update_cpuid()
78 best->ecx &= ~F(OSXSAVE); in kvm_update_cpuid()
80 best->ecx |= F(OSXSAVE); in kvm_update_cpuid()
83 best->edx &= ~F(APIC); in kvm_update_cpuid()
85 best->edx |= F(APIC); in kvm_update_cpuid()
88 if (best->ecx & F(TSC_DEADLINE_TIMER)) in kvm_update_cpuid()
94 best = kvm_find_cpuid_entry(vcpu, 7, 0); in kvm_update_cpuid()
95 if (best) { in kvm_update_cpuid()
97 if (boot_cpu_has(X86_FEATURE_PKU) && best->function == 0x7) { in kvm_update_cpuid()
98 best->ecx &= ~F(OSPKE); in kvm_update_cpuid()
100 best->ecx |= F(OSPKE); in kvm_update_cpuid()
104 best = kvm_find_cpuid_entry(vcpu, 0xD, 0); in kvm_update_cpuid()
105 if (!best) { in kvm_update_cpuid()
110 (best->eax | ((u64)best->edx << 32)) & in kvm_update_cpuid()
112 vcpu->arch.guest_xstate_size = best->ebx = in kvm_update_cpuid()
116 best = kvm_find_cpuid_entry(vcpu, 0xD, 1); in kvm_update_cpuid()
117 if (best && (best->eax & (F(XSAVES) | F(XSAVEC)))) in kvm_update_cpuid()
118 best->ebx = xstate_required_size(vcpu->arch.xcr0, true); in kvm_update_cpuid()
124 best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0); in kvm_update_cpuid()
125 if (best) { in kvm_update_cpuid()
126 int vaddr_bits = (best->eax & 0xff00) >> 8; in kvm_update_cpuid()
132 best = kvm_find_cpuid_entry(vcpu, KVM_CPUID_FEATURES, 0); in kvm_update_cpuid()
133 if (kvm_hlt_in_guest(vcpu->kvm) && best && in kvm_update_cpuid()
134 (best->eax & (1 << KVM_FEATURE_PV_UNHALT))) in kvm_update_cpuid()
135 best->eax &= ~(1 << KVM_FEATURE_PV_UNHALT); in kvm_update_cpuid()
138 best = kvm_find_cpuid_entry(vcpu, 0x1, 0); in kvm_update_cpuid()
139 if (best) { in kvm_update_cpuid()
141 best->ecx |= F(MWAIT); in kvm_update_cpuid()
143 best->ecx &= ~F(MWAIT); in kvm_update_cpuid()
184 struct kvm_cpuid_entry2 *best; in cpuid_query_maxphyaddr() local
186 best = kvm_find_cpuid_entry(vcpu, 0x80000000, 0); in cpuid_query_maxphyaddr()
187 if (!best || best->eax < 0x80000008) in cpuid_query_maxphyaddr()
189 best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0); in cpuid_query_maxphyaddr()
190 if (best) in cpuid_query_maxphyaddr()
191 return best->eax & 0xff; in cpuid_query_maxphyaddr()
959 struct kvm_cpuid_entry2 *best = NULL; in kvm_find_cpuid_entry() local
968 best = e; in kvm_find_cpuid_entry()
972 return best; in kvm_find_cpuid_entry()