X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest.c;h=7736e383436afd5fa42fb69ed5f3213723964b1c;hb=f1c8d924817188c4f08a97205e97392ff304913f;hp=9f7afe84a8635b7958d3a74421f87641580f4839;hpb=5ef0e92d52b2698fd2706cd7cfc2b01526a6e319;p=palacios.git diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index 9f7afe8..7736e38 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -33,6 +33,13 @@ #include #include +#ifdef V3_CONFIG_MEM_TRACK +#include +#endif +#ifdef V3_CONFIG_CACHEPART +#include +#endif + v3_cpu_mode_t v3_get_vm_cpu_mode(struct guest_info * info) { struct cr0_32 * cr0; @@ -260,6 +267,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 +321,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); @@ -369,10 +388,18 @@ 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); +#ifdef V3_CONFIG_CACHEPART + v3_deinit_cachepart_vm(vm); +#endif return 0; } @@ -387,6 +414,12 @@ int v3_init_core(struct guest_info * core) { /* * Initialize the subsystem data strutures */ + + +#ifdef V3_CONFIG_CACHEPART + v3_init_cachepart_core(core); +#endif + #ifdef V3_CONFIG_TELEMETRY v3_init_core_telemetry(core); #endif @@ -454,6 +487,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); @@ -472,6 +513,8 @@ 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: @@ -497,6 +540,10 @@ int v3_free_core(struct guest_info * core) { return -1; } +#ifdef V3_CONFIG_CACHEPART + v3_deinit_cachepart_core(core); +#endif + return 0; }