X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=eb03b0ee67ffa002e4928bb36a222af09afedba6;hp=1236a0b2d9d6524e172f6ea1eed06220b07490f0;hb=d0886c953a9e5969ee0f54f11bb146bfe888bfe3;hpb=a0e1d8274aef54adcf50dce0b3843489f2a3cd21 diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 1236a0b..eb03b0e 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -289,7 +289,7 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ struct vm_device * northbridge = NULL; struct vm_device * southbridge = NULL; - struct vm_device * nvram = v3_create_nvram(); + struct vm_device * nvram = NULL; struct vm_device * pic = v3_create_pic(); struct vm_device * keyboard = v3_create_keyboard(); struct vm_device * pit = v3_create_pit(); @@ -316,6 +316,9 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ } + + nvram = v3_create_nvram(ide); + if (config_ptr->use_ram_cd == 1) { PrintDebug("Creating Ram CD\n"); ramdisk = v3_create_ram_cd(ide, 0, 0, @@ -336,7 +339,7 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ - v3_attach_device(info, nvram); + v3_attach_device(info, pic); v3_attach_device(info, pit); v3_attach_device(info, keyboard); @@ -361,7 +364,6 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ PrintDebug("Attaching IDE\n"); v3_attach_device(info, ide); - if (ramdisk != NULL) { v3_attach_device(info, ramdisk); } @@ -370,6 +372,9 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_ // Important that this be attached last! v3_attach_device(info, generic); } + + // This should go last because it contains the hardware state + v3_attach_device(info, nvram); PrintDebugDevMgr(info);