mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[HVM] save restore: frame work
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> frame work for HVM save restore in Control Panel
This commit is contained in:
1 parent
ccace2b704
commit
4a13cf1b70
10 files changed
+260
-17
No files matched your search
@@ -160,6 +160,20 @@ static PyObject *pyxc_domain_destroy(XcObject *self, PyObject *args)
|
||||
return dom_op(self, args, xc_domain_destroy);
|
||||
}
|
||||
|
||||
static PyObject *pyxc_domain_shutdown(XcObject *self, PyObject *args)
|
||||
{
|
||||
uint32_t dom, reason;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "ii", &dom, &reason))
|
||||
return NULL;
|
||||
|
||||
if (xc_domain_shutdown(self->xc_handle, dom, reason) != 0)
|
||||
return pyxc_error_to_exception();
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *pyxc_vcpu_setaffinity(XcObject *self,
|
||||
PyObject *args,
|
||||
@@ -1029,6 +1043,14 @@ static PyMethodDef pyxc_methods[] = {
|
||||
" dom [int]: Identifier of domain to be destroyed.\n\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "domain_shutdown",
|
||||
(PyCFunction)pyxc_domain_shutdown,
|
||||
METH_VARARGS, "\n"
|
||||
"Shutdown a domain.\n"
|
||||
" dom [int, 0]: Domain identifier to use.\n"
|
||||
" reason [int, 0]: Reason for shutdown.\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
|
||||
{ "vcpu_setaffinity",
|
||||
(PyCFunction)pyxc_vcpu_setaffinity,
|
||||
METH_VARARGS | METH_KEYWORDS, "\n"
|
||||
|
||||