#include <palacios/vmx.h>
#endif
-#ifdef V3_CONFIG_VNET
-#include <vnet/vnet.h>
-#endif
-
v3_cpu_arch_t v3_cpu_types[V3_CONFIG_MAX_CPUS];
struct v3_os_hooks * os_hooks = NULL;
+
static void init_cpu(void * arg) {
uint32_t cpu_id = (uint32_t)(addr_t)arg;
#endif
-#ifdef V3_CONFIG_VNET
- v3_init_vnet();
-#endif
-
#ifdef V3_CONFIG_MULTITHREAD_OS
if ((hooks) && (hooks->call_on_cpu)) {
#endif
-#ifdef V3_CONFIG_VNET
- v3_deinit_vnet();
-#endif
-
#ifdef V3_CONFIG_MULTITHREAD_OS
if ((os_hooks) && (os_hooks->call_on_cpu)) {
for (i = 0; i < V3_CONFIG_MAX_CPUS; i++) {
}
+
+
static int start_core(void * p)
{
struct guest_info * core = (struct guest_info *)p;
}
+int v3_reset_vm_core(struct guest_info * core, addr_t rip) {
+
+ switch (v3_cpu_types[core->pcpu_id]) {
+#ifdef V3_CONFIG_SVM
+ case V3_SVM_CPU:
+ case V3_SVM_REV3_CPU:
+ PrintDebug("Resetting SVM Guest CPU %d\n", core->vcpu_id);
+ return v3_reset_svm_vm_core(core, rip);
+#endif
+#ifdef V3_CONFIG_VMX
+ case V3_VMX_CPU:
+ case V3_VMX_EPT_CPU:
+ case V3_VMX_EPT_UG_CPU:
+ PrintDebug("Resetting VMX Guest CPU %d\n", core->vcpu_id);
+ return v3_reset_vmx_vm_core(core, rip);
+#endif
+ case V3_INVALID_CPU:
+ default:
+ PrintError("CPU has no virtualization Extensions\n");
+ break;
+ }
+
+ return -1;
+}
+
+
+
int v3_stop_vm(struct v3_vm_info * vm) {