Hi Ewan/Alistair, I have a patch that looks like this:
diff -r a39ad4c78850 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Wed Aug 30 13:51:12 2006 +0100
+++ b/tools/libxc/xenctrl.h Wed Aug 30 15:11:20 2006 -0500
@@ -416,6 +416,10 @@ int xc_domain_memory_populate_physmap(in
unsigned int address_bits,
xen_pfn_t *extent_start);
+int xc_alloc_real_mode_area(int xc_handle,
+ uint32_t domid,
+ unsigned int log);
+
int xc_domain_translate_gpfn_list(int xc_handle,
uint32_t domid,
unsigned long nr_gpfns,
diff -r a39ad4c78850 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Aug 30 13:51:12 2006 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Aug 30 15:11:20 2006 -0500
@@ -732,6 +732,26 @@ static PyObject *pyxc_domain_memory_incr
return zero;
}
+static PyObject *pyxc_alloc_real_mode_area(XcObject *self,
+ PyObject *args,
+ PyObject *kwds)
+{
+ uint32_t dom;
+ unsigned int log;
+
+ static char *kwd_list[] = { "dom", "log", NULL };
+
+ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list,
+ &dom, &log) )
+ return NULL;
+
+ if ( xc_alloc_real_mode_area(self->xc_handle, dom, log) )
+ return PyErr_SetFromErrno(xc_error);
+
+ Py_INCREF(zero);
+ return zero;
+}
+
static PyObject *pyxc_domain_ioport_permission(XcObject *self,
PyObject *args,
PyObject *kwds)
@@ -1088,6 +1108,14 @@ static PyMethodDef pyxc_methods[] = {
"Increase a domain's memory reservation\n"
" dom [int]: Identifier of domain.\n"
" mem_kb [long]: .\n"
+ "Returns: [int] 0 on success; -1 on error.\n" },
+
+ { "alloc_real_mode_area",
+ (PyCFunction)pyxc_alloc_real_mode_area,
+ METH_VARARGS | METH_KEYWORDS, "\n"
+ "Allocate a domain's real mode area.\n"
+ " dom [int]: Identifier of domain.\n"
+ " log [int]: Specifies the area's size.\n"
"Returns: [int] 0 on success; -1 on error.\n" },
{ "domain_ioport_permission",
xc_alloc_real_mode_area() is a PowerPC-specific libxc function. How
would you like this handled in xc.c? Just an ifdef?
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|