X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=420b3166a47300803c34a6e395cb5699fd63d2e5;hb=fc4b7290edb57a3528a26f95c4478fe07d45a581;hp=7897f3e5781a43b0b479864a7f4bc7e7e8d1bb48;hpb=de5c2110458436a9300aa0a171dbbe83e415ee4d;p=palacios.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 7897f3e..420b316 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -229,6 +229,7 @@ static struct v3_config * parse_config(void * cfg_blob) { V3_Print(VM_NONE, VCORE_NONE, "File index=%d id=%s\n", idx, id); strncpy(file->tag, id, V3_MAX_TAG_LEN); + file->tag[V3_MAX_TAG_LEN-1] = 0 ; if (version==0) { struct file_hdr_v0 * hdr = &(files_v0->hdrs[idx]); @@ -385,6 +386,10 @@ static int pre_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * vm_cfg) { if (schedule_hz_str) { sched_hz = atoi(schedule_hz_str); + if (sched_hz==0) { + PrintError(vm,VCORE_NONE,"Cannot set sched Hz to 0\n"); + return -1; + } } PrintDebug(VM_NONE, VCORE_NONE, "CPU_KHZ = %d, schedule_freq=%p\n", V3_CPU_KHZ(), @@ -639,7 +644,7 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) { vm = allocate_guest(num_cores); if (!vm) { - PrintError(VM_NONE, VCORE_NONE, "Could not allocate %d core guest\n", vm->num_cores); + PrintError(VM_NONE, VCORE_NONE, "Could not allocate %d core guest\n", num_cores); return NULL; }