* Initialize the vCPU id of the BSP */
| 168 | * Initialize the vCPU id of the BSP |
| 169 | */ |
| 170 | static int |
| 171 | xenpv_setup_local(void) |
| 172 | { |
| 173 | #ifdef SMP |
| 174 | int i, ret; |
| 175 | |
| 176 | for (i = 0; i < MAXCPU && (i * 2) < MAX_APIC_ID; i++) { |
| 177 | ret = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); |
| 178 | if (ret >= 0) |
| 179 | lapic_create((i * 2), (i == 0)); |
| 180 | } |
| 181 | #endif |
| 182 | |
| 183 | PCPU_SET(vcpu_id, 0); |
| 184 | lapic_init(0); |
| 185 | return (0); |
| 186 | } |
| 187 | |
| 188 | /* |
| 189 | * On PVH guests there's no IO APIC |
nothing calls this directly
no test coverage detected