X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=be73f33ebf6c4892ebcfe3b318190133729ac2a1;hb=ee177da9b30ebf340c63fb5b9d535c729f90134d;hp=88db635f3afd0690f0d5c333b652426395e176bf;hpb=5e83847991f155d6aabffc2b71f5a9224a5fbd59;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 88db635..be73f33 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,9 +281,7 @@ 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 * ide = NULL; struct vm_device * ram_cd = 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(); struct vm_device * pic = v3_create_pic(); @@ -299,7 +299,7 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ int use_ramdisk = config_ptr->use_ramdisk; int use_generic = USE_GENERIC; - ide = v3_create_ide(); + ide = v3_create_ide(pci); if (use_ramdisk) { PrintDebug("Creating Ramdisk\n"); @@ -313,9 +313,8 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ generic = configure_generic(info, config_ptr); } -#ifdef DEBUG_PCI + v3_attach_device(info, pci); -#endif v3_attach_device(info, nvram); //v3_attach_device(info, timer);