X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest.c;h=41158e7db115a91ed42d68a772531cf5685febb7;hb=3650bf4aaa4f83afae52c8fee98fce6e3ee68deb;hp=a12c76497fb8279e35c81e34eba77b1f4ab602da;hpb=a4fd5bcc79e7cdf9a3bd879294566bff0666ced7;p=palacios.git diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index a12c764..41158e7 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -33,6 +33,10 @@ #include #include +#ifdef V3_CONFIG_MEM_TRACK +#include +#endif + v3_cpu_mode_t v3_get_vm_cpu_mode(struct guest_info * info) { struct cr0_32 * cr0; @@ -260,6 +264,10 @@ int v3_init_vm(struct v3_vm_info * vm) { return -1; } +#ifdef V3_CONFIG_MEM_TRACK + v3_mem_track_init(vm); +#endif + v3_init_time_vm(vm); v3_init_vm_debugging(vm); @@ -310,6 +318,14 @@ int v3_free_vm_internal(struct v3_vm_info * vm) { v3_remove_hypercall(vm, GUEST_INFO_HCALL); +#ifdef V3_CONFIG_HVM + v3_deinit_hvm_vm(vm); +#endif + +#ifdef V3_CONFIG_MULTIBOOT + v3_deinit_multiboot_vm(vm); +#endif + #ifdef V3_CONFIG_SYMBIOTIC v3_deinit_symbiotic_vm(vm); @@ -342,6 +358,11 @@ int v3_free_vm_internal(struct v3_vm_info * vm) { v3_deinit_time_vm(vm); v3_deinit_mem_hooks(vm); + +#ifdef V3_CONFIG_SWAPPING + v3_deinit_swapping_vm(vm); +#endif + v3_delete_mem_map(vm); v3_deinit_shdw_impl(vm); v3_deinit_passthrough_paging(vm); @@ -364,8 +385,13 @@ int v3_free_vm_internal(struct v3_vm_info * vm) { v3_deinit_telemetry(vm); #endif + v3_deinit_events(vm); +#ifdef V3_CONFIG_MEM_TRACK + v3_mem_track_deinit(vm); +#endif + v3_fw_cfg_deinit(vm); @@ -449,6 +475,14 @@ int v3_free_core(struct guest_info * core) { v3_deinit_symbiotic_core(core); #endif +#ifdef V3_CONFIG_HVM + v3_deinit_hvm_core(core); +#endif + +#ifdef V3_CONFIG_MULTIBOOT + v3_deinit_multiboot_core(core); +#endif + v3_deinit_decoder(core); v3_deinit_intr_controllers(core); @@ -467,6 +501,7 @@ int v3_free_core(struct guest_info * core) { v3_deinit_core_telemetry(core); #endif + switch (v3_mach_type) { #ifdef V3_CONFIG_SVM case V3_SVM_CPU: