* Test each possible vCPU in order to find the number of vCPUs */
| 149 | * Test each possible vCPU in order to find the number of vCPUs |
| 150 | */ |
| 151 | static int |
| 152 | xenpv_probe_cpus(void) |
| 153 | { |
| 154 | #ifdef SMP |
| 155 | int i, ret; |
| 156 | |
| 157 | for (i = 0; i < MAXCPU && (i * 2) < MAX_APIC_ID; i++) { |
| 158 | ret = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); |
| 159 | mp_ncpus = min(mp_ncpus + 1, MAXCPU); |
| 160 | } |
| 161 | mp_maxid = mp_ncpus - 1; |
| 162 | max_apic_id = mp_ncpus * 2; |
| 163 | #endif |
| 164 | return (0); |
| 165 | } |
| 166 | |
| 167 | /* |
| 168 | * Initialize the vCPU id of the BSP |
nothing calls this directly
no test coverage detected