X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm.c;h=ed0cfb99257d355c9a352b4df5a21c4be47f5c5b;hb=ce0f119828348c3c57a00c4aa268a8a223ccd7f8;hp=d1125eef170aaade706f46412b7d466035f03f29;hpb=e8ee9e1536b3fa2e69f5537a90f5e034e9529248;p=palacios.git diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index d1125ee..ed0cfb9 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -53,6 +53,10 @@ #include +#ifdef V3_CONFIG_MEM_TRACK +#include +#endif + #ifdef V3_CONFIG_TM_FUNC #include #endif @@ -633,12 +637,17 @@ int v3_svm_enter(struct guest_info * info) { // Conditionally yield the CPU if the timeslice has expired v3_schedule(info); +#ifdef V3_CONFIG_MEM_TRACK + v3_mem_track_entry(info); +#endif + // Update timer devices after being in the VM before doing // IRQ updates, so that any interrupts they raise get seen // immediately. v3_advance_time(info, NULL); v3_update_timers(info); + // disable global interrupts for vm state transition v3_clgi(); @@ -799,6 +808,7 @@ int v3_svm_enter(struct guest_info * info) { // reenable global interrupts after vm exit v3_stgi(); + // Conditionally yield the CPU if the timeslice has expired v3_schedule(info); @@ -808,6 +818,7 @@ int v3_svm_enter(struct guest_info * info) { v3_advance_time(info, NULL); v3_update_timers(info); + { int ret = v3_handle_svm_exit(info, exit_code, exit_info1, exit_info2); @@ -823,6 +834,10 @@ int v3_svm_enter(struct guest_info * info) { v3_handle_timeouts(info, guest_cycles); } +#ifdef V3_CONFIG_MEM_TRACK + v3_mem_track_exit(info); +#endif + return 0; }