Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


*** empty log message ***
[palacios.git] / palacios / src / palacios / svm_halt.c
1 #include <palacios/svm_halt.h>
2 #include <palacios/vmm_intr.h>
3 // From GeekOS
4 void Yield(void);
5
6
7 int handle_svm_halt(struct guest_info * info)
8 {
9   // What we should do is starting waiting on an OS event that will
10   // result in an injection of an interrupt.
11
12   // What we will hackishly do instead is resume on any event
13   // Plus is this totally GeekOS specific
14
15   ullong_t yield_start = 0;
16   ullong_t yield_stop = 0;
17   uint32_t gap = 0;
18
19   PrintDebug("GeekOS Yield\n");
20
21   rdtscll(yield_start);
22   Yield();
23   rdtscll(yield_stop);
24
25
26   //v3_update_time(info, yield_stop - yield_start);
27   gap = yield_stop - yield_start;
28   v3_raise_irq(info, 0);
29
30   PrintDebug("GeekOS Yield Done (%d cycles)\n", gap);
31
32   info->rip+=1;
33
34   return 0;
35
36 }