1 #include <palacios/svm_halt.h>
2 #include <palacios/vmm_intr.h>
8 // This should trigger a #GP if cpl!=0, otherwise, yield to host
11 int handle_svm_halt(struct guest_info * info)
14 v3_raise_exception(info, GPF_EXCEPTION);
17 // What we should do is starting waiting on an OS event that will
18 // result in an injection of an interrupt.
20 // What we will hackishly do instead is resume on any event
21 // Plus is this totally GeekOS specific
23 ullong_t yield_start = 0;
24 ullong_t yield_stop = 0;
27 PrintDebug("GeekOS Yield\n");
34 //v3_update_time(info, yield_stop - yield_start);
35 gap = yield_stop - yield_start;
36 v3_raise_irq(info, 0);
38 PrintDebug("GeekOS Yield Done (%d cycles)\n", gap);