mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Give each domain some memory below 4GB. This solves the "PGD's must be below 4GB" for the initial page tables. I'm not sure we'll stick with this approach, but this is good enough for the time being.
PAE should be a *lot* more robust on systems that actually have more than 4GB thanks to all the various patches that went in today. I find it astounding that it ever appeared to work at all! Signed-off-by: ian@xensource.com
This commit is contained in:
1 parent
73167306c7
commit
8b1b30d3cb
7 files changed
+32
-11
No files matched your search
@@ -841,14 +841,16 @@ static PyObject *pyxc_domain_memory_increase_reservation(PyObject *self,
|
||||
|
||||
u32 dom;
|
||||
unsigned long mem_kb;
|
||||
unsigned int extent_order = 0 , address_bits = 0;
|
||||
|
||||
static char *kwd_list[] = { "dom", "mem_kb", NULL };
|
||||
static char *kwd_list[] = { "dom", "mem_kb", "extent_order", "address_bits", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list,
|
||||
&dom, &mem_kb) )
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii|ii", kwd_list,
|
||||
&dom, &mem_kb, &extent_order, &address_bits) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_domain_memory_increase_reservation(xc->xc_handle, dom, mem_kb) )
|
||||
if ( xc_domain_memory_increase_reservation(xc->xc_handle, dom,
|
||||
mem_kb, extent_order, address_bits) )
|
||||
return PyErr_SetFromErrno(xc_error);
|
||||
|
||||
Py_INCREF(zero);
|
||||
|
||||
@@ -159,7 +159,11 @@ class ImageHandler:
|
||||
xc.domain_setmaxmem(dom, mem_kb)
|
||||
|
||||
try:
|
||||
xc.domain_memory_increase_reservation(dom, mem_kb)
|
||||
# Give the domain some memory below 4GB
|
||||
lmem_kb = 4096
|
||||
xc.domain_memory_increase_reservation(dom, min(lmem_kb,mem_kb), 0, 32)
|
||||
if mem_kb > lmem_kb:
|
||||
xc.domain_memory_increase_reservation(dom, mem_kb-lmem_kb, 0, 0)
|
||||
except:
|
||||
xc.domain_destroy(dom)
|
||||
raise
|
||||
|
||||