X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx_handler.c;fp=palacios%2Fsrc%2Fpalacios%2Fvmx_handler.c;h=7b738ca6441674c62a4e78f007809ec443e21a55;hp=67f03a4f581af919266940bf7fa3f2171e152d0a;hb=de6084de2145f3889a16d8498e5e7d44e96e0162;hpb=87b1679efe8bee960b65cfd730188ccc94966b71 diff --git a/palacios/src/palacios/vmx_handler.c b/palacios/src/palacios/vmx_handler.c index 67f03a4..7b738ca 100644 --- a/palacios/src/palacios/vmx_handler.c +++ b/palacios/src/palacios/vmx_handler.c @@ -32,16 +32,17 @@ #include #include -#ifdef CONFIG_TELEMETRY -#include -#endif - - #ifdef CONFIG_VNET #include #endif +#ifdef CONFIG_LINUX_VIRTIO_NET + extern int v3_virtionic_pktprocess(struct guest_info * info); +#endif +#ifdef CONFIG_TELEMETRY +#include +#endif /* At this point the GPRs are already copied into the guest_info state */ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_info) { @@ -61,12 +62,20 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf } #endif +#ifdef VNET_PROFILE + uint64_t exit_start_time, vnet_start_time; + uint64_t exit_end_time, vnet_end_time; + rdtscll(exit_start_time); + num_exit ++; + if (last_exit_time > 0) + guest_time += exit_start_time - last_exit_time; +#endif + switch (exit_info->exit_reason) { case VMEXIT_INFO_EXCEPTION_OR_NMI: { pf_error_t error_code = *(pf_error_t *)&(exit_info->int_err); - - // JRL: Change "0x0e" to a macro value + // JRL: Change "0x0e" to a macro value if ((uint8_t)exit_info->int_info == 0x0e) { #ifdef CONFIG_DEBUG_SHADOW_PAGING PrintDebug("Page Fault at %p error_code=%x\n", (void *)exit_info->exit_qual, *(uint32_t *)&error_code); @@ -226,16 +235,22 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf return -1; } + #ifdef CONFIG_VNET v3_vnet_pkt_process(info); #endif +#ifdef CONFIG_LINUX_VIRTIO_NET + v3_virtionic_pktprocess(info); +#endif + #ifdef CONFIG_TELEMETRY if (info->enable_telemetry) { v3_telemetry_end_exit(info, exit_info->exit_reason); } #endif + return 0; }