int V3_init_devices();
-
+int V3_deinit_devices();
struct v3_device_ops {
int V3_init_shdw_paging();
+int V3_deinit_shdw_paging();
#define register_shdw_pg_impl(impl) \
static struct v3_shdw_pg_impl * _v3_shdw_pg_impl \
}
}
+#if 0
+static void deinit_cpu(void * arg) {
+// uint32_t cpu_id = (uint32_t)(addr_t)arg;
+
+ #ifdef CONFIG_SVM
+ if (v3_is_svm_capable()) {
+ PrintDebug("Machine is SVM Capable\n");
+ //v3_deinit_svm_cpu(cpu_id);
+
+ } else
+#endif
+#ifdef CONFIG_VMX
+ if (v3_is_vmx_capable()) {
+ PrintDebug("Machine is VMX Capable\n");
+ //v3_deinit_vmx_cpu(cpu_id);
+
+ } else
+#endif
+ {
+ PrintError("CPU has no virtualization Extensions\n");
+ }
+}
+#endif
void Init_V3(struct v3_os_hooks * hooks, int num_cpus) {
}
-void Deinit_V3() {
-
+void Shutdown_V3() {
+ // int i;
+
+ V3_deinit_devices();
+ V3_deinit_shdw_paging();
+
+#if 0
+
+#ifdef CONFIG_SYMMOD
+ V3_deinit_symmod();
+#endif
+
+#ifdef CONFIG_INSTRUMENT_VMM
+ v3_deinit_instrumentation();
+#endif
+
+#ifdef CONFIG_VNET
+ v3_deinit_vnet();
+#endif
+
+#ifdef CONFIG_MULTITHREAD_OS
+ if ((hooks) && (hooks->call_on_cpu)) {
+ for (i = 0; i < CONFIG_MAX_CPUS; i++) {
+ if (v3_cpu_types[i] != V3_INVALID_CPU) {
+ deinit_cpu(i);
+ }
+ }
+ }
+#else
+ deinit_cpu(0);
+#endif
+
+#endif
}
return NULL;
}
-
V3_Print("File index=%d id=%s\n", idx, id);
strncpy(file->tag, id, 256);
return alignment;
}
-static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
+static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) {
char * memory_str = v3_cfg_val(vm_cfg, "memory");
char * schedule_hz_str = v3_cfg_val(vm_cfg, "schedule_hz");
char * vm_class = v3_cfg_val(vm_cfg, "class");
return 0;
}
-static int determine_paging_mode(struct guest_info *info, v3_cfg_tree_t * core_cfg)
-{
+
+static int determine_paging_mode(struct guest_info * info, v3_cfg_tree_t * core_cfg) {
extern v3_cpu_arch_t v3_cpu_types[];
v3_cfg_tree_t * vm_tree = info->vm_info->cfg_data->cfg;
}
+int V3_deinit_devices() {
+ v3_free_htable(master_dev_table, 0, 0);
+ return 0;
+}
+
+
int v3_init_dev_mgr(struct v3_vm_info * vm) {
struct vmm_dev_mgr * mgr = &(vm->dev_mgr);
return 0;
}
+int V3_deinit_shdw_paging() {
+ v3_free_htable(master_shdw_pg_table, 0, 0);
+ return 0;
+}
+
/***