Lines Matching refs:eax
36 u32 eax, ebx, ecx, edx, offset; in xstate_required_size() local
37 cpuid_count(0xD, feature_bit, &eax, &ebx, &ecx, &edx); in xstate_required_size()
39 ret = max(ret, offset + eax); in xstate_required_size()
90 (best->eax | ((u64)best->edx << 32)) & in kvm_update_cpuid()
97 if (best && (best->eax & (F(XSAVES) | F(XSAVEC)))) in kvm_update_cpuid()
109 if (best && ((best->eax & 0xff00) >> 8) != 48 && in kvm_update_cpuid()
110 ((best->eax & 0xff00) >> 8) != 0) in kvm_update_cpuid()
152 if (!best || best->eax < 0x80000008) in cpuid_query_maxphyaddr()
156 return best->eax & 0xff; in cpuid_query_maxphyaddr()
183 vcpu->arch.cpuid_entries[i].eax = cpuid_entries[i].eax; in kvm_vcpu_ioctl_set_cpuid()
257 &entry->eax, &entry->ebx, &entry->ecx, &entry->edx); in do_cpuid_1_ent()
266 entry->eax = 1; /* only one leaf currently */ in __do_cpuid_ent_emulated()
370 entry->eax = min(entry->eax, (u32)0xd); in __do_cpuid_ent()
386 int t, times = entry->eax & 0xff; in __do_cpuid_ent()
410 cache_type = entry[i - 1].eax & 0x1f; in __do_cpuid_ent()
421 entry->eax = 0x4; /* allow ARAT */ in __do_cpuid_ent()
436 entry->eax = 0; in __do_cpuid_ent()
445 union cpuid10_eax eax; in __do_cpuid_ent() local
457 eax.split.version_id = min(cap.version, 2); in __do_cpuid_ent()
458 eax.split.num_counters = cap.num_counters_gp; in __do_cpuid_ent()
459 eax.split.bit_width = cap.bit_width_gp; in __do_cpuid_ent()
460 eax.split.mask_length = cap.events_mask_len; in __do_cpuid_ent()
466 entry->eax = eax.full; in __do_cpuid_ent()
496 entry->eax &= supported; in __do_cpuid_ent()
511 entry[i].eax &= kvm_supported_word10_x86_features; in __do_cpuid_ent()
512 cpuid_mask(&entry[i].eax, 10); in __do_cpuid_ent()
514 if (entry[i].eax & (F(XSAVES)|F(XSAVEC))) in __do_cpuid_ent()
519 if (entry[i].eax == 0 || !(supported & mask)) in __do_cpuid_ent()
536 entry->eax = KVM_CPUID_FEATURES; in __do_cpuid_ent()
543 entry->eax = (1 << KVM_FEATURE_CLOCKSOURCE) | in __do_cpuid_ent()
552 entry->eax |= (1 << KVM_FEATURE_STEAL_TIME); in __do_cpuid_ent()
559 entry->eax = min(entry->eax, 0x8000001a); in __do_cpuid_ent()
572 entry->eax = entry->ebx = entry->ecx = 0; in __do_cpuid_ent()
575 unsigned g_phys_as = (entry->eax >> 16) & 0xff; in __do_cpuid_ent()
576 unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U); in __do_cpuid_ent()
577 unsigned phys_as = entry->eax & 0xff; in __do_cpuid_ent()
581 entry->eax = g_phys_as | (virt_as << 8); in __do_cpuid_ent()
595 entry->eax = min(entry->eax, 0xC0000004); in __do_cpuid_ent()
607 entry->eax = entry->ebx = entry->ecx = entry->edx = 0; in __do_cpuid_ent()
715 limit = cpuid_entries[nent - 1].eax; in kvm_dev_ioctl_get_cpuid()
801 if (!maxlevel || maxlevel->eax >= function) in check_cpuid_limit()
808 return kvm_find_cpuid_entry(vcpu, maxlevel->eax, index); in check_cpuid_limit()
811 void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx) in kvm_cpuid() argument
813 u32 function = *eax, index = *ecx; in kvm_cpuid()
828 *eax = best->eax; in kvm_cpuid()
833 *eax = *ebx = *ecx = *edx = 0; in kvm_cpuid()
834 trace_kvm_cpuid(function, *eax, *ebx, *ecx, *edx); in kvm_cpuid()
840 u32 function, eax, ebx, ecx, edx; in kvm_emulate_cpuid() local
842 function = eax = kvm_register_read(vcpu, VCPU_REGS_RAX); in kvm_emulate_cpuid()
844 kvm_cpuid(vcpu, &eax, &ebx, &ecx, &edx); in kvm_emulate_cpuid()
845 kvm_register_write(vcpu, VCPU_REGS_RAX, eax); in kvm_emulate_cpuid()