* Round up to the next power of two, if necessary, and then take log2. * Returns -1 if argument is zero. */
| 80 | * Returns -1 if argument is zero. |
| 81 | */ |
| 82 | static __inline int |
| 83 | log2(u_int x) |
| 84 | { |
| 85 | |
| 86 | return (fls(x << (1 - powerof2(x))) - 1); |
| 87 | } |
| 88 | |
| 89 | int |
| 90 | x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint64_t *rax, uint64_t *rbx, |