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