X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=c0c713e0ef721931e8b5890ad58d6723bc681eea;hb=1fe82881720f7f9f64f789871f763aca93b47a7e;hp=344548fd2025866ecff5c888e2d6d9ca8b3023bc;hpb=541622f47d7e0aeedfe1c11fc2e9b7811df9565d;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 344548f..c0c713e 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -88,10 +88,12 @@ int v3_config_guest(struct guest_info * info, struct v3_vm_config * config_ptr) v3_init_hypercall_map(info); - - if (v3_cpu_type == V3_SVM_REV3_CPU) { + if ((v3_cpu_type == V3_SVM_REV3_CPU) && + (config_ptr->enable_nested_paging == 1)) { + PrintDebug("Guest Page Mode: NESTED_PAGING\n"); info->shdw_pg_mode = NESTED_PAGING; } else { + PrintDebug("Guest Page Mode: SHADOW_PAGING\n"); v3_init_shadow_page_state(info); info->shdw_pg_mode = SHADOW_PAGING; } @@ -279,12 +281,12 @@ static int setup_memory_map(struct guest_info * info, struct v3_vm_config * conf static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ptr) { struct vm_device * ramdisk = NULL; struct vm_device * cdrom = NULL; +#ifdef DEBUG_PCI struct vm_device * pci = v3_create_pci(); +#endif struct vm_device * nvram = v3_create_nvram(); //struct vm_device * timer = v3_create_timer(); -#ifdef DEBUG_PCI struct vm_device * pic = v3_create_pic(); -#endif struct vm_device * keyboard = v3_create_keyboard(); struct vm_device * pit = v3_create_pit(); struct vm_device * bochs_debug = v3_create_bochs_debug();