Lines Matching refs:cpuid
126 struct kvm_cpuid2 *vcpu_alloc_cpuid(struct kvm_vm *vm, vm_vaddr_t *p_gva, struct kvm_cpuid2 *cpuid) in vcpu_alloc_cpuid() argument
128 int size = sizeof(*cpuid) + cpuid->nent * sizeof(cpuid->entries[0]); in vcpu_alloc_cpuid()
132 memcpy(guest_cpuids, cpuid, size); in vcpu_alloc_cpuid()
168 struct kvm_cpuid2 *cpuid = allocate_kvm_cpuid2(vcpu->cpuid->nent + 1); in test_get_cpuid2() local
171 vcpu_ioctl(vcpu, KVM_GET_CPUID2, cpuid); in test_get_cpuid2()
172 TEST_ASSERT(cpuid->nent == vcpu->cpuid->nent, in test_get_cpuid2()
174 vcpu->cpuid->nent, cpuid->nent); in test_get_cpuid2()
176 for (i = 0; i < vcpu->cpuid->nent; i++) { in test_get_cpuid2()
177 cpuid->nent = i; in test_get_cpuid2()
178 r = __vcpu_ioctl(vcpu, KVM_GET_CPUID2, cpuid); in test_get_cpuid2()
180 TEST_ASSERT(cpuid->nent == i, "KVM modified nent on failure"); in test_get_cpuid2()
182 free(cpuid); in test_get_cpuid2()
194 compare_cpuids(kvm_get_supported_cpuid(), vcpu->cpuid); in main()
196 vcpu_alloc_cpuid(vm, &cpuid_gva, vcpu->cpuid); in main()