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=88db635f3afd0690f0d5c333b652426395e176bf;hb=c535b3199977444c3aa2c44b852cc82ce659c5ff;hpb=5e83847991f155d6aabffc2b71f5a9224a5fbd59 diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 88db635..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,10 +281,9 @@ 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 * ram_cd = NULL; + struct vm_device * ram_hd = NULL; 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,11 +301,14 @@ 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"); - 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); } @@ -313,9 +318,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); @@ -334,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) {