X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=f14d94d6f0a5478b21cafbf5817de32c92fea4c5;hb=0b618729352e97aa06ec2f19f33595f6caaeb9d1;hp=e67a7020c418c6de835769cc5685f46237848d84;hpb=fa7a42a55338e5fa49ec760b367225ca752df4fd;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index e67a702..f14d94d 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -177,6 +178,11 @@ int handle_svm_exit(struct guest_info * info) { if (handle_svm_halt(info) == -1) { return -1; } + } else if (exit_code == VMEXIT_PAUSE) { + PrintDebug("Guest paused\n"); + if (handle_svm_pause(info) == -1) { + return -1; + } } else { addr_t rip_addr; char buf[15]; @@ -230,7 +236,7 @@ int handle_svm_exit(struct guest_info * info) { PrintTraceMemDump(buf, 15); - while(1); + return -1; } @@ -243,6 +249,9 @@ int handle_svm_exit(struct guest_info * info) { case EXTERNAL_IRQ: { uint_t irq = get_intr_number(info); + + // check to see if ==-1 (non exists) + /* guest_ctrl->EVENTINJ.vector = irq; guest_ctrl->EVENTINJ.valid = 1; @@ -269,7 +278,7 @@ int handle_svm_exit(struct guest_info * info) { guest_ctrl->EVENTINJ.type = SVM_INJECTION_EXCEPTION; - if (info->intr_state.excp_error_code) { + if (info->intr_state.excp_error_code_valid) { //PAD guest_ctrl->EVENTINJ.error_code = info->intr_state.excp_error_code; guest_ctrl->EVENTINJ.ev = 1; PrintDebug("Injecting error code %x\n", guest_ctrl->EVENTINJ.error_code);