X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fparagraph.c;h=973c580ebbb4c5faac21b389a1e1c347a430b8ac;hb=198151f1d58834ff7889389007232a3d250f51f1;hp=32f07f1de502f050816adca57bf119d3f8750b6c;hpb=82071a7f5f0b18fbf1a4adc2a37fed1624572a79;p=palacios.git diff --git a/palacios/src/devices/paragraph.c b/palacios/src/devices/paragraph.c index 32f07f1..973c580 100644 --- a/palacios/src/devices/paragraph.c +++ b/palacios/src/devices/paragraph.c @@ -247,7 +247,7 @@ static int register_dev(struct paragraph_state *state) target_size = state->mem_size; break; case GCONS_DIRECT: - target_size = state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; + target_size = (uint64_t)state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; break; default: PrintError(state->vm, VCORE_NONE, "paragraph: Unknown mode\n"); @@ -344,7 +344,7 @@ static int render_callback(v3_graphics_console_t cons, PrintDebug(state->vm, VCORE_NONE, "paragraph: render callback GCONS_MEM\n"); void *fb = v3_graphics_console_get_frame_buffer_data_rw(state->host_cons,&(state->target_spec)); - uint64_t target_size = state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; + uint64_t target_size = (uint64_t)state->target_spec.height*state->target_spec.width*state->target_spec.bytes_per_pixel; // must be smaller than the memory we have allocated target_size = target_sizemem_size ? target_size : state->mem_size; @@ -452,7 +452,7 @@ static int paragraph_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) if (state->mode==MEM || state->mode==GCONS_MEM) { state->mem_size=MAXX*MAXY*MAXBPP; PrintDebug(vm, VCORE_NONE, "paragraph: allocating %llu bytes for local framebuffer\n", state->mem_size); - state->mem_paddr = V3_AllocShadowSafePages(vm,ceil_pages(state->mem_size)); + state->mem_paddr = V3_AllocPages(ceil_pages(state->mem_size)); if (!state->mem_paddr) { PrintError(state->vm, VCORE_NONE, "paragraph: Cannot allocate memory for framebuffer\n"); paragraph_free_internal(state);