bitkeeper revision 1.1385.1.2 (426ebce6uikcKvm56neQ1G3uFEGApw)

Properly set memory parameters for newly created domains.

Signed-off-by: Bin Ren <bin.ren@cl.cam.ac.uk>
This commit is contained in:
bren@br260.wolfson.cam.ac.uk committed 2005-04-26 22:12:54 +00:00
1 parent 324df1cf56
commit 06418b32fe
3 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ int xc_domain_create(int xc_handle,
goto fail;
if ( (err = do_dom_mem_op(xc_handle, MEMOP_increase_reservation,
NULL, mem_kb/4, 0, *pdomid)) != (mem_kb/4) )
NULL, mem_kb/4 + 1, 0, *pdomid)) != (mem_kb/4) )
{
if ( err > 0 )
errno = ENOMEM;
+2 -1
View File
@@ -411,7 +411,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
d = find_domain_by_id(op->u.setdomainmaxmem.domain);
if ( d != NULL )
{
d->max_pages = op->u.setdomainmaxmem.max_memkb >> (PAGE_SHIFT-10);
d->max_pages = (op->u.setdomainmaxmem.max_memkb +
((PAGE_SIZE-1)>>10)) >> (PAGE_SHIFT-10);
put_domain(d);
ret = 0;
}
+3
View File
@@ -61,6 +61,9 @@ alloc_dom_mem(struct domain *d,
return i;
}
/* Initialise the machine-to-phys mapping for this page. */
set_machinetophys(page_to_pfn(page), d->tot_pages - 1);
/* Inform the domain of the new page's machine address. */
if ( (extent_list != NULL) &&
(__put_user(page_to_pfn(page), &extent_list[i]) != 0) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.