[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 08/13] python: remove unused memory related libxc python bindings
Mostly for historical reasons Xen includes Python bindings for libxc. They have been used by xm/xend in the past but nowadays there is no user of most memory related python binding left. Remove them. Especially xc.domain_set_target_mem() and xc.domain_setmaxmem() will not be removed as there are some out of tree users. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 92 --------------------------------------- 1 file changed, 92 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 6c4ad18..02f1694 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -953,59 +953,6 @@ static PyObject *pyxc_xeninfo(XcObject *self) "cc_compile_date", xen_cc.compile_date); } -static PyObject *pyxc_shadow_control(PyObject *self, - PyObject *args, - PyObject *kwds) -{ - XcObject *xc = (XcObject *)self; - - uint32_t dom; - int op=0; - - static char *kwd_list[] = { "dom", "op", NULL }; - - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, - &dom, &op) ) - return NULL; - - if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, NULL, 0, NULL) - < 0 ) - return pyxc_error_to_exception(xc->xc_handle); - - Py_INCREF(zero); - return zero; -} - -static PyObject *pyxc_shadow_mem_control(PyObject *self, - PyObject *args, - PyObject *kwds) -{ - XcObject *xc = (XcObject *)self; - int op; - uint32_t dom; - int mbarg = -1; - unsigned long mb; - - static char *kwd_list[] = { "dom", "mb", NULL }; - - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, - &dom, &mbarg) ) - return NULL; - - if ( mbarg < 0 ) - op = XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION; - else - { - mb = mbarg; - op = XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION; - } - if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, &mb, 0, NULL) < 0 ) - return pyxc_error_to_exception(xc->xc_handle); - - mbarg = mb; - return Py_BuildValue("i", mbarg); -} - static PyObject *pyxc_domain_setmaxmem(XcObject *self, PyObject *args) { uint32_t dom; @@ -1039,21 +986,6 @@ static PyObject *pyxc_domain_set_target_mem(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(self->xc_handle); - - Py_INCREF(zero); - return zero; -} - static PyObject *pyxc_domain_ioport_permission(XcObject *self, PyObject *args, PyObject *kwds) @@ -1530,22 +1462,6 @@ static PyMethodDef pyxc_methods[] = { "Returns [dict]: information about Xen" " [None]: on failure.\n" }, - { "shadow_control", - (PyCFunction)pyxc_shadow_control, - METH_VARARGS | METH_KEYWORDS, "\n" - "Set parameter for shadow pagetable interface\n" - " dom [int]: Identifier of domain.\n" - " op [int, 0]: operation\n\n" - "Returns: [int] 0 on success; -1 on error.\n" }, - - { "shadow_mem_control", - (PyCFunction)pyxc_shadow_mem_control, - METH_VARARGS | METH_KEYWORDS, "\n" - "Set or read shadow pagetable memory use\n" - " dom [int]: Identifier of domain.\n" - " mb [int, -1]: MB of shadow memory this domain should have.\n\n" - "Returns: [int] MB of shadow memory in use by this domain.\n" }, - { "domain_setmaxmem", (PyCFunction)pyxc_domain_setmaxmem, METH_VARARGS, "\n" @@ -1562,14 +1478,6 @@ static PyMethodDef pyxc_methods[] = { " mem_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_ioport_permission", (PyCFunction)pyxc_domain_ioport_permission, METH_VARARGS | METH_KEYWORDS, "\n" -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |