Lines Matching refs:regs
83 unsigned int func, regs[4], logical_cpus, param; in x86_emulate_cpuid() local
127 cpuid_count(func, param, regs); in x86_emulate_cpuid()
130 cpuid_count(func, param, regs); in x86_emulate_cpuid()
137 regs[1] &= (AMDFEID_CLZERO | AMDFEID_IRPERF | in x86_emulate_cpuid()
154 regs[2] = (width << AMDID_COREID_SIZE_SHIFT) | logical_cpus; in x86_emulate_cpuid()
159 cpuid_count(func, param, regs); in x86_emulate_cpuid()
164 regs[2] &= ~AMDID2_SVM; in x86_emulate_cpuid()
170 regs[2] &= ~AMDID2_PCXC; in x86_emulate_cpuid()
171 regs[2] &= ~AMDID2_PNXC; in x86_emulate_cpuid()
172 regs[2] &= ~AMDID2_PTSCEL2I; in x86_emulate_cpuid()
177 regs[2] &= ~AMDID2_IBS; in x86_emulate_cpuid()
180 regs[2] &= ~AMDID2_NODE_ID; in x86_emulate_cpuid()
183 regs[2] &= ~AMDID2_OSVW; in x86_emulate_cpuid()
186 regs[2] &= ~AMDID2_MWAITX; in x86_emulate_cpuid()
192 regs[3] |= AMDID_RDTSCP; in x86_emulate_cpuid()
194 regs[3] &= ~AMDID_RDTSCP; in x86_emulate_cpuid()
208 regs[0] = 0; in x86_emulate_cpuid()
209 regs[1] = 0; in x86_emulate_cpuid()
210 regs[2] = 0; in x86_emulate_cpuid()
211 regs[3] = 0; in x86_emulate_cpuid()
225 regs[3] |= AMDPM_TSC_INVARIANT; in x86_emulate_cpuid()
264 regs[0] = (logical_cpus << 14) | (1 << 8) | in x86_emulate_cpuid()
266 regs[1] = (func > 0) ? (CACHE_LINE_SIZE - 1) : 0; in x86_emulate_cpuid()
273 regs[2] = 0; in x86_emulate_cpuid()
275 regs[3] = 0; in x86_emulate_cpuid()
288 regs[0] = vcpu_id; in x86_emulate_cpuid()
290 regs[1] = (threads << 8) | in x86_emulate_cpuid()
296 regs[2] = 0; in x86_emulate_cpuid()
297 regs[3] = 0; in x86_emulate_cpuid()
301 do_cpuid(1, regs); in x86_emulate_cpuid()
312 regs[1] &= ~(CPUID_LOCAL_APIC_ID); in x86_emulate_cpuid()
313 regs[1] |= (vcpu_id << CPUID_0000_0001_APICID_SHIFT); in x86_emulate_cpuid()
319 regs[2] &= ~(CPUID2_VMX | CPUID2_EST | CPUID2_TM2); in x86_emulate_cpuid()
320 regs[2] &= ~(CPUID2_SMX); in x86_emulate_cpuid()
322 regs[2] |= CPUID2_HV; in x86_emulate_cpuid()
325 regs[2] |= CPUID2_X2APIC; in x86_emulate_cpuid()
327 regs[2] &= ~CPUID2_X2APIC; in x86_emulate_cpuid()
333 if (!(regs[2] & CPUID2_OSXSAVE)) in x86_emulate_cpuid()
334 regs[2] &= ~CPUID2_XSAVE; in x86_emulate_cpuid()
341 regs[2] &= ~CPUID2_OSXSAVE; in x86_emulate_cpuid()
342 if (regs[2] & CPUID2_XSAVE) { in x86_emulate_cpuid()
349 regs[2] |= CPUID2_OSXSAVE; in x86_emulate_cpuid()
356 regs[2] &= ~CPUID2_MON; in x86_emulate_cpuid()
361 regs[2] &= ~CPUID2_PDCM; in x86_emulate_cpuid()
366 regs[2] &= ~CPUID2_TSCDLT; in x86_emulate_cpuid()
371 regs[3] &= ~(CPUID_ACPI | CPUID_TM); in x86_emulate_cpuid()
376 regs[3] &= ~CPUID_DS; in x86_emulate_cpuid()
384 regs[3] |= (CPUID_MCA | CPUID_MCE | CPUID_MTRR); in x86_emulate_cpuid()
389 regs[1] &= ~CPUID_HTT_CORES; in x86_emulate_cpuid()
390 regs[1] |= (logical_cpus & 0xff) << 16; in x86_emulate_cpuid()
391 regs[3] |= CPUID_HTT; in x86_emulate_cpuid()
395 cpuid_count(func, param, regs); in x86_emulate_cpuid()
397 if (regs[0] || regs[1] || regs[2] || regs[3]) { in x86_emulate_cpuid()
400 regs[0] &= 0x3ff; in x86_emulate_cpuid()
401 regs[0] |= (cores - 1) << 26; in x86_emulate_cpuid()
410 level = (regs[0] >> 5) & 0x7; in x86_emulate_cpuid()
413 regs[0] |= (logical_cpus - 1) << 14; in x86_emulate_cpuid()
418 regs[0] = 0; in x86_emulate_cpuid()
419 regs[1] = 0; in x86_emulate_cpuid()
420 regs[2] = 0; in x86_emulate_cpuid()
421 regs[3] = 0; in x86_emulate_cpuid()
425 cpuid_count(func, param, regs); in x86_emulate_cpuid()
428 regs[0] = 0; in x86_emulate_cpuid()
433 regs[1] &= CPUID_STDEXT_FSGSBASE | in x86_emulate_cpuid()
447 regs[2] &= CPUID_STDEXT2_VAES | in x86_emulate_cpuid()
449 regs[3] &= CPUID_STDEXT3_MD_CLEAR; in x86_emulate_cpuid()
455 regs[2] |= CPUID_STDEXT2_RDPID; in x86_emulate_cpuid()
461 regs[1] |= CPUID_STDEXT_INVPCID; in x86_emulate_cpuid()
466 regs[0] = CPUTPM1_ARAT; in x86_emulate_cpuid()
467 regs[1] = 0; in x86_emulate_cpuid()
468 regs[2] = 0; in x86_emulate_cpuid()
469 regs[3] = 0; in x86_emulate_cpuid()
477 regs[0] = 0; in x86_emulate_cpuid()
478 regs[1] = 0; in x86_emulate_cpuid()
479 regs[2] = 0; in x86_emulate_cpuid()
480 regs[3] = 0; in x86_emulate_cpuid()
511 regs[0] = width & 0x1f; in x86_emulate_cpuid()
512 regs[1] = logical_cpus & 0xffff; in x86_emulate_cpuid()
513 regs[2] = (level << 8) | (param & 0xff); in x86_emulate_cpuid()
514 regs[3] = x2apic_id; in x86_emulate_cpuid()
516 regs[0] = 0; in x86_emulate_cpuid()
517 regs[1] = 0; in x86_emulate_cpuid()
518 regs[2] = 0; in x86_emulate_cpuid()
519 regs[3] = 0; in x86_emulate_cpuid()
526 regs[0] = 0; in x86_emulate_cpuid()
527 regs[1] = 0; in x86_emulate_cpuid()
528 regs[2] = 0; in x86_emulate_cpuid()
529 regs[3] = 0; in x86_emulate_cpuid()
533 cpuid_count(func, param, regs); in x86_emulate_cpuid()
547 regs[0] &= limits->xcr0_allowed; in x86_emulate_cpuid()
548 regs[2] = limits->xsave_max_size; in x86_emulate_cpuid()
549 regs[3] &= (limits->xcr0_allowed >> 32); in x86_emulate_cpuid()
553 regs[0] &= CPUID_EXTSTATE_XSAVEOPT; in x86_emulate_cpuid()
554 regs[1] = 0; in x86_emulate_cpuid()
555 regs[2] = 0; in x86_emulate_cpuid()
556 regs[3] = 0; in x86_emulate_cpuid()
565 regs[0] = 0; in x86_emulate_cpuid()
566 regs[1] = 0; in x86_emulate_cpuid()
567 regs[2] = 0; in x86_emulate_cpuid()
568 regs[3] = 0; in x86_emulate_cpuid()
586 regs[0] = 0; in x86_emulate_cpuid()
587 regs[1] = 0; in x86_emulate_cpuid()
588 regs[2] = 0; in x86_emulate_cpuid()
589 regs[3] = 0; in x86_emulate_cpuid()
598 regs[0] = 0; in x86_emulate_cpuid()
599 regs[1] = 0; in x86_emulate_cpuid()
600 regs[2] = 0; in x86_emulate_cpuid()
601 regs[3] = 0; in x86_emulate_cpuid()
605 regs[0] = CPUID_VM_HIGH; in x86_emulate_cpuid()
606 bcopy(bhyve_id, ®s[1], 4); in x86_emulate_cpuid()
607 bcopy(bhyve_id + 4, ®s[2], 4); in x86_emulate_cpuid()
608 bcopy(bhyve_id + 8, ®s[3], 4); in x86_emulate_cpuid()
619 cpuid_count(func, param, regs); in x86_emulate_cpuid()
626 *rax = regs[0]; in x86_emulate_cpuid()
627 *rbx = regs[1]; in x86_emulate_cpuid()
628 *rcx = regs[2]; in x86_emulate_cpuid()
629 *rdx = regs[3]; in x86_emulate_cpuid()