mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
[XEN] New event-channel reset operation.
Plumbed through libxenctrl to python. From: Andrei Petrov <andrei.petrov@xensource.com> Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
f272b20670
commit
115209d91b
5 files changed
+79
-1
No files matched your search
@@ -478,6 +478,24 @@ static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
|
||||
return PyInt_FromLong(port);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_evtchn_reset(XcObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
{
|
||||
uint32_t dom;
|
||||
|
||||
static char *kwd_list[] = { "dom", NULL };
|
||||
|
||||
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &dom) )
|
||||
return NULL;
|
||||
|
||||
if ( xc_evtchn_reset(self->xc_handle, dom) < 0 )
|
||||
return pyxc_error_to_exception();
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_physdev_pci_access_modify(XcObject *self,
|
||||
PyObject *args,
|
||||
PyObject *kwds)
|
||||
@@ -1202,6 +1220,12 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" remote_dom [int]: Remote domain to accept connections from.\n\n"
|
||||
"Returns: [int] Unbound event-channel port.\n" },
|
||||
|
||||
{ "evtchn_reset",
|
||||
(PyCFunction)pyxc_evtchn_reset,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
"Reset all connections.\n"
|
||||
" dom [int]: Domain to reset.\n" },
|
||||
|
||||
{ "physdev_pci_access_modify",
|
||||
(PyCFunction)pyxc_physdev_pci_access_modify,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
|
||||