1 /* (c) 2008, Peter Dinda <pdinda@northwestern.edu> */
2 /* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
3 /* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
6 #include <palacios/svm_halt.h>
7 #include <palacios/vmm_intr.h>
13 // This should trigger a #GP if cpl!=0, otherwise, yield to host
16 int handle_svm_halt(struct guest_info * info)
19 v3_raise_exception(info, GPF_EXCEPTION);
22 // What we should do is starting waiting on an OS event that will
23 // result in an injection of an interrupt.
25 // What we will hackishly do instead is resume on any event
26 // Plus is this totally GeekOS specific
28 ullong_t yield_start = 0;
29 ullong_t yield_stop = 0;
32 PrintDebug("GeekOS Yield\n");
39 //v3_update_time(info, yield_stop - yield_start);
40 gap = yield_stop - yield_start;
41 v3_raise_irq(info, 0);
43 PrintDebug("GeekOS Yield Done (%d cycles)\n", gap);