struct guest_info * core;
+ void * controller_handle;
+
struct v3_timer * timer;
uint32_t eoi;
// host maitains logical proc->phsysical proc
PrintDebug(" non-local core, forcing it to exit\n");
+#ifdef CONFIG_MULTITHREAD_OS
v3_interrupt_cpu(dst_core->vm_info, dst_core->cpu_id, 0);
+#else
+ V3_ASSERT(0);
+#endif
}
break;
activate_apic_irq(apic, irq);
if (V3_Get_CPU() != dst) {
+#ifdef CONFIG_MULTITHREAD_OS
v3_interrupt_cpu(vm, dst, 0);
+#else
+ V3_ASSERT(0);
+#endif
}
return 0;
vm = core->vm_info;
- // unregister intr controller
+ v3_remove_intr_controller(core, apic->controller_handle);
if (apic->timer) {
v3_remove_timer(core, apic->timer);
init_apic_state(apic, i);
- v3_register_intr_controller(core, &intr_ops, apic_dev);
+ apic->controller_handle = v3_register_intr_controller(core, &intr_ops, apic_dev);
apic->timer = v3_add_timer(core, &timer_ops, apic_dev);