X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=01fcaf7b4d389679940c6b9669152f361409a9b7;hp=a5ec77e4f77d4be25ff3d74464160f976008a125;hb=c535b3199977444c3aa2c44b852cc82ce659c5ff;hpb=709ff8e4b1ca5412e4dd66101e25dc67751c8df7 diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index a5ec77e..01fcaf7 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -88,10 +89,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; } @@ -278,7 +281,8 @@ 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; + //struct vm_device * ram_cd = NULL; + struct vm_device * ram_hd = NULL; struct vm_device * pci = v3_create_pci(); struct vm_device * nvram = v3_create_nvram(); //struct vm_device * timer = v3_create_timer(); @@ -301,7 +305,10 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ if (use_ramdisk) { PrintDebug("Creating Ramdisk\n"); - ram_cd = v3_create_ram_cd(ide, 0, 0, + //ram_cd = v3_create_ram_cd(ide, 0, 0, + // (addr_t)(config_ptr->ramdisk), + // config_ptr->ramdisk_size); + ram_hd = v3_create_ram_hd(ide, 0, 0, (addr_t)(config_ptr->ramdisk), config_ptr->ramdisk_size); } @@ -331,7 +338,8 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ v3_attach_device(info, ide); if (use_ramdisk) { - v3_attach_device(info, ram_cd); + // v3_attach_device(info, ram_cd); + v3_attach_device(info, ram_hd); } if (use_generic) {