MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xenpv_setup_local

Function xenpv_setup_local

freebsd/x86/xen/pvcpu_enum.c:170–186  ·  view source on GitHub ↗

* Initialize the vCPU id of the BSP */

Source from the content-addressed store, hash-verified

168 * Initialize the vCPU id of the BSP
169 */
170static int
171xenpv_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

Callers

nothing calls this directly

Calls 3

HYPERVISOR_vcpu_opFunction · 0.85
lapic_createFunction · 0.85
lapic_initFunction · 0.85

Tested by

no test coverage detected