mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[XEN] Implement XENMEM_set_memory_map, which specifies memory map to
be returned by XENMEM_memory_map. Hook this into the domain builder. Based on a patch by Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
a3b9408baf
commit
43ff8f0aef
7 files changed
+149
-8
No files matched your search
@@ -758,6 +758,21 @@ static PyObject *pyxc_domain_setmaxmem(XcObject *self, PyObject *args)
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_domain_set_memmap_limit(XcObject *self, PyObject *args)
|
||||
{
|
||||
uint32_t dom;
|
||||
unsigned int maplimit_kb;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "ii", &dom, &maplimit_kb) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_domain_set_memmap_limit(self->xc_handle, dom, maplimit_kb) != 0 )
|
||||
return pyxc_error_to_exception();
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_domain_memory_increase_reservation(XcObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -1141,6 +1156,14 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" maxmem_kb [int]: .\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "domain_set_memmap_limit",
|
||||
(PyCFunction)pyxc_domain_set_memmap_limit,
|
||||
METH_VARARGS, "\n"
|
||||
"Set a domain's physical memory mappping limit\n"
|
||||
" dom [int]: Identifier of domain.\n"
|
||||
" map_limitkb [int]: .\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "domain_memory_increase_reservation",
|
||||
(PyCFunction)pyxc_domain_memory_increase_reservation,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
|
||||