diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/examples/xc_dom_create.py | 6 | ||||
-rw-r--r-- | tools/xc/lib/xc.h | 6 | ||||
-rw-r--r-- | tools/xc/lib/xc_linux_build.c | 10 | ||||
-rw-r--r-- | tools/xc/lib/xc_netbsd_build.c | 10 | ||||
-rw-r--r-- | tools/xc/py/Xc.c | 36 |
5 files changed, 27 insertions, 41 deletions
diff --git a/tools/examples/xc_dom_create.py b/tools/examples/xc_dom_create.py index 382d580032..0a66613da4 100755 --- a/tools/examples/xc_dom_create.py +++ b/tools/examples/xc_dom_create.py @@ -248,10 +248,6 @@ def make_domain(): xc.domain_destroy ( dom=id ) sys.exit() - # will the domain have IO privileges? - if pci_device_list != []: io_priv = True - else: io_priv = False - if restore: ret = eval('xc.%s_restore ( dom=id, state_file=state_file, progress=1)' % (builder_fn) ) if ret < 0: @@ -261,7 +257,7 @@ def make_domain(): sys.exit() else: - ret = eval('xc.%s_build ( dom=id, image=image, ramdisk=ramdisk, cmdline=cmdline, control_evtchn=cons_response["remote_port"], io_priv=%d )' % (builder_fn, io_priv) ) + ret = eval('xc.%s_build ( dom=id, image=image, ramdisk=ramdisk, cmdline=cmdline, control_evtchn=cons_response["remote_port"] )' % builder_fn ) if ret < 0: print "Error building Linux guest OS: " print "Return code = " + str(ret) diff --git a/tools/xc/lib/xc.h b/tools/xc/lib/xc.h index eb1b07da91..9a0fab2257 100644 --- a/tools/xc/lib/xc.h +++ b/tools/xc/lib/xc.h @@ -74,15 +74,13 @@ int xc_linux_build(int xc_handle, const char *image_name, const char *ramdisk_name, const char *cmdline, - unsigned int control_evtchn, - int io_priv); + unsigned int control_evtchn); int xc_netbsd_build(int xc_handle, u64 domid, const char *image_name, const char *cmdline, - unsigned int control_evtchn, - int io_priv); + unsigned int control_evtchn); int xc_bvtsched_global_set(int xc_handle, unsigned long ctx_allow); diff --git a/tools/xc/lib/xc_linux_build.c b/tools/xc/lib/xc_linux_build.c index 67351210fc..83debd904d 100644 --- a/tools/xc/lib/xc_linux_build.c +++ b/tools/xc/lib/xc_linux_build.c @@ -74,8 +74,7 @@ static int setup_guestos(int xc_handle, full_execution_context_t *ctxt, const char *cmdline, unsigned long shared_info_frame, - unsigned int control_evtchn, - int io_priv) + unsigned int control_evtchn) { l1_pgentry_t *vl1tab=NULL, *vl1e=NULL; l2_pgentry_t *vl2tab=NULL, *vl2e=NULL; @@ -269,7 +268,7 @@ static int setup_guestos(int xc_handle, memset(start_info, 0, sizeof(*start_info)); start_info->nr_pages = nr_pages; start_info->shared_info = shared_info_frame << PAGE_SHIFT; - start_info->flags = io_priv ? SIF_PRIVILEGED : 0; + start_info->flags = 0; start_info->pt_base = vpt_start; start_info->nr_pt_frames = nr_pt_pages; start_info->mfn_list = vphysmap_start; @@ -382,8 +381,7 @@ int xc_linux_build(int xc_handle, const char *image_name, const char *ramdisk_name, const char *cmdline, - unsigned int control_evtchn, - int io_priv) + unsigned int control_evtchn) { dom0_op_t launch_op, op; int initrd_fd = -1; @@ -448,7 +446,7 @@ int xc_linux_build(int xc_handle, &vstartinfo_start, &vkern_entry, ctxt, cmdline, op.u.getdomaininfo.shared_info_frame, - control_evtchn, io_priv) < 0 ) + control_evtchn) < 0 ) { ERROR("Error constructing guest OS"); goto error_out; diff --git a/tools/xc/lib/xc_netbsd_build.c b/tools/xc/lib/xc_netbsd_build.c index 8260c75ea4..7c67d57d71 100644 --- a/tools/xc/lib/xc_netbsd_build.c +++ b/tools/xc/lib/xc_netbsd_build.c @@ -63,8 +63,7 @@ static int setup_guestos(int xc_handle, full_execution_context_t *ctxt, const char *cmdline, unsigned long shared_info_frame, - unsigned int control_evtchn, - int io_priv) + unsigned int control_evtchn) { l1_pgentry_t *vl1tab=NULL, *vl1e=NULL; l2_pgentry_t *vl2tab=NULL, *vl2e=NULL; @@ -176,7 +175,7 @@ static int setup_guestos(int xc_handle, start_info->mod_len = symtab_len; start_info->nr_pages = tot_pages; start_info->shared_info = shared_info_frame << PAGE_SHIFT; - start_info->flags = io_priv ? SIF_PRIVILEGED : 0; + start_info->flags = 0; start_info->domain_controller_evtchn = control_evtchn; strncpy(start_info->cmd_line, cmdline, MAX_CMDLINE); start_info->cmd_line[MAX_CMDLINE-1] = '\0'; @@ -213,8 +212,7 @@ int xc_netbsd_build(int xc_handle, u64 domid, const char *image_name, const char *cmdline, - unsigned int control_evtchn, - int io_priv) + unsigned int control_evtchn) { dom0_op_t launch_op, op; unsigned long load_addr; @@ -271,7 +269,7 @@ int xc_netbsd_build(int xc_handle, &virt_startinfo_addr, &load_addr, &st_ctxt, cmdline, op.u.getdomaininfo.shared_info_frame, - control_evtchn, io_priv) < 0 ) + control_evtchn) < 0 ) { ERROR("Error constructing guest OS"); goto error_out; diff --git a/tools/xc/py/Xc.c b/tools/xc/py/Xc.c index 322a20b411..6453281a61 100644 --- a/tools/xc/py/Xc.c +++ b/tools/xc/py/Xc.c @@ -228,19 +228,18 @@ static PyObject *pyxc_linux_build(PyObject *self, u64 dom; char *image, *ramdisk = NULL, *cmdline = ""; - int control_evtchn, io_priv = 0; + int control_evtchn; static char *kwd_list[] = { "dom", "control_evtchn", - "image", "ramdisk", "cmdline", "io_priv", - NULL }; + "image", "ramdisk", "cmdline", NULL }; - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "Lis|ssi", kwd_list, + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "Lis|ss", kwd_list, &dom, &control_evtchn, - &image, &ramdisk, &cmdline, &io_priv) ) + &image, &ramdisk, &cmdline) ) return NULL; if ( xc_linux_build(xc->xc_handle, dom, image, - ramdisk, cmdline, control_evtchn, io_priv) != 0 ) + ramdisk, cmdline, control_evtchn) != 0 ) return PyErr_SetFromErrno(xc_error); Py_INCREF(zero); @@ -255,19 +254,18 @@ static PyObject *pyxc_netbsd_build(PyObject *self, u64 dom; char *image, *ramdisk = NULL, *cmdline = ""; - int control_evtchn, io_priv = 0; + int control_evtchn; static char *kwd_list[] = { "dom", "control_evtchn", - "image", "ramdisk", "cmdline", "io_priv", - NULL }; + "image", "ramdisk", "cmdline", NULL }; if ( !PyArg_ParseTupleAndKeywords(args, kwds, "Lis|ssi", kwd_list, &dom, &control_evtchn, - &image, &ramdisk, &cmdline, &io_priv) ) + &image, &ramdisk, &cmdline) ) return NULL; if ( xc_netbsd_build(xc->xc_handle, dom, image, - cmdline, control_evtchn, io_priv) != 0 ) + cmdline, control_evtchn) != 0 ) return PyErr_SetFromErrno(xc_error); Py_INCREF(zero); @@ -1162,8 +1160,7 @@ static PyMethodDef pyxc_methods[] = { " dom [long]: Identifier of domain to build into.\n" " image [str]: Name of kernel image file. May be gzipped.\n" " ramdisk [str, n/a]: Name of ramdisk file, if any.\n" - " cmdline [str, n/a]: Kernel parameters, if any.\n" - " io_priv [boolean]: Does the domain have IO privileges?\n\n" + " cmdline [str, n/a]: Kernel parameters, if any.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "netbsd_build", @@ -1172,15 +1169,14 @@ static PyMethodDef pyxc_methods[] = { "Build a new NetBSD guest OS.\n" " dom [long]: Identifier of domain to build into.\n" " image [str]: Name of kernel image file. May be gzipped.\n" - " cmdline [str, n/a]: Kernel parameters, if any.\n" - " io_priv [boolean]: Does the domain have IO privileges?\n\n" + " cmdline [str, n/a]: Kernel parameters, if any.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "bvtsched_global_set", (PyCFunction)pyxc_bvtsched_global_set, METH_VARARGS | METH_KEYWORDS, "\n" "Set global tuning parameters for Borrowed Virtual Time scheduler.\n" - " ctx_allow [int]: Minimal guaranteed quantum (I think!).\n\n" + " ctx_allow [int]: Minimal guaranteed quantum.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "bvtsched_global_get", @@ -1195,10 +1191,10 @@ static PyMethodDef pyxc_methods[] = { METH_VARARGS | METH_KEYWORDS, "\n" "Set per-domain tuning parameters for Borrowed Virtual Time scheduler.\n" " dom [long]: Identifier of domain to be tuned.\n" - " mcuadv [int]: Internal BVT parameter.\n" - " warp [int]: Internal BVT parameter.\n" - " warpl [int]: Internal BVT parameter.\n" - " warpu [int]: Internal BVT parameter.\n\n" + " mcuadv [int]: Proportional to the inverse of the domain's weight.\n" + " warp [int]: How far to warp domain's EVT on unblock.\n" + " warpl [int]: How long the domain can run warped.\n" + " warpu [int]: How long before the domain can warp again.\n\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "bvtsched_domain_get", |