aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-01-06 12:53:19 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-01-06 12:53:19 +0100
commit5becda0913a2ef028296a1ebf6745299cdb85d5c (patch)
treec5fb2737c94310b2a3e8d379f6fb0f3b257d6cc8 /tools
parent7b1872e6f58e6eb324291f02fcfd1d0fa03bbb62 (diff)
downloadxen-5becda0913a2ef028296a1ebf6745299cdb85d5c.tar.gz
xen-5becda0913a2ef028296a1ebf6745299cdb85d5c.tar.bz2
xen-5becda0913a2ef028296a1ebf6745299cdb85d5c.zip
Fix a couple of bogus dom0_op names:
setdomaininfo -> setvcpucontext pincpudomain -> setvcpuaffinity Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/debugger/libxendebug/xendebug.c12
-rw-r--r--tools/libxc/xc_core.c2
-rw-r--r--tools/libxc/xc_domain.c42
-rw-r--r--tools/libxc/xc_ia64_stubs.c10
-rw-r--r--tools/libxc/xc_linux_build.c10
-rw-r--r--tools/libxc/xc_linux_restore.c10
-rw-r--r--tools/libxc/xc_linux_save.c4
-rw-r--r--tools/libxc/xc_pagetab.c2
-rw-r--r--tools/libxc/xc_ptrace.c13
-rw-r--r--tools/libxc/xc_vmx_build.c10
-rw-r--r--tools/libxc/xenctrl.h30
-rw-r--r--tools/python/xen/lowlevel/xc/xc.c14
-rw-r--r--tools/python/xen/xend/XendDomain.py2
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py2
-rw-r--r--tools/xentrace/xenctx.c4
15 files changed, 83 insertions, 84 deletions
diff --git a/tools/debugger/libxendebug/xendebug.c b/tools/debugger/libxendebug/xendebug.c
index cb939a7424..7a9deaa07f 100644
--- a/tools/debugger/libxendebug/xendebug.c
+++ b/tools/debugger/libxendebug/xendebug.c
@@ -119,8 +119,8 @@ xendebug_get_context (int xc_handle, uint32_t domid, uint32_t vcpu)
if ( !ctxt->valid[vcpu] )
{
- if ( (rc = xc_domain_get_vcpu_context(xc_handle, domid, vcpu,
- &ctxt->context[vcpu])) )
+ if ( (rc = xc_vcpu_getcontext(xc_handle, domid, vcpu,
+ &ctxt->context[vcpu])) )
return NULL;
ctxt->valid[vcpu] = true;
@@ -139,10 +139,10 @@ xendebug_set_context (int xc_handle, domain_context_p ctxt, uint32_t vcpu)
return -EINVAL;
op.interface_version = DOM0_INTERFACE_VERSION;
- op.cmd = DOM0_SETDOMAININFO;
- op.u.setdomaininfo.domain = ctxt->domid;
- op.u.setdomaininfo.vcpu = vcpu;
- op.u.setdomaininfo.ctxt = &ctxt->context[vcpu];
+ op.cmd = DOM0_SETVCPUCONTEXT;
+ op.u.setvcpucontext.domain = ctxt->domid;
+ op.u.setvcpucontext.vcpu = vcpu;
+ op.u.setvcpucontext.ctxt = &ctxt->context[vcpu];
if ( (rc = mlock(&ctxt->context[vcpu], sizeof(vcpu_guest_context_t))) )
return rc;
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index 207fbe8fb1..43ac87d47f 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -55,7 +55,7 @@ xc_domain_dumpcore(int xc_handle,
}
for (i = 0; i < info.max_vcpu_id; i++)
- if (xc_domain_get_vcpu_context(xc_handle, domid,
+ if (xc_vcpu_getcontext(xc_handle, domid,
i, &ctxt[nr_vcpus]) == 0)
nr_vcpus++;
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index b018318d62..aae3236695 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -58,16 +58,16 @@ int xc_domain_destroy(int xc_handle,
return do_dom0_op(xc_handle, &op);
}
-int xc_domain_pincpu(int xc_handle,
- uint32_t domid,
- int vcpu,
- cpumap_t cpumap)
+int xc_vcpu_setaffinity(int xc_handle,
+ uint32_t domid,
+ int vcpu,
+ cpumap_t cpumap)
{
DECLARE_DOM0_OP;
- op.cmd = DOM0_PINCPUDOMAIN;
- op.u.pincpudomain.domain = (domid_t)domid;
- op.u.pincpudomain.vcpu = vcpu;
- op.u.pincpudomain.cpumap = cpumap;
+ op.cmd = DOM0_SETVCPUAFFINITY;
+ op.u.setvcpuaffinity.domain = (domid_t)domid;
+ op.u.setvcpuaffinity.vcpu = vcpu;
+ op.u.setvcpuaffinity.cpumap = cpumap;
return do_dom0_op(xc_handle, &op);
}
@@ -155,7 +155,7 @@ int xc_domain_getinfolist(int xc_handle,
return ret;
}
-int xc_domain_get_vcpu_context(int xc_handle,
+int xc_vcpu_getcontext(int xc_handle,
uint32_t domid,
uint32_t vcpu,
vcpu_guest_context_t *ctxt)
@@ -345,10 +345,10 @@ int xc_domain_sethandle(int xc_handle, uint32_t domid,
return do_dom0_op(xc_handle, &op);
}
-int xc_domain_get_vcpu_info(int xc_handle,
- uint32_t domid,
- uint32_t vcpu,
- xc_vcpuinfo_t *info)
+int xc_vcpu_getinfo(int xc_handle,
+ uint32_t domid,
+ uint32_t vcpu,
+ xc_vcpuinfo_t *info)
{
int rc;
DECLARE_DOM0_OP;
@@ -380,18 +380,18 @@ int xc_domain_ioport_permission(int xc_handle,
return do_dom0_op(xc_handle, &op);
}
-int xc_domain_setinfo(int xc_handle,
- uint32_t domid,
- uint32_t vcpu,
- vcpu_guest_context_t *ctxt)
+int xc_vcpu_setcontext(int xc_handle,
+ uint32_t domid,
+ uint32_t vcpu,
+ vcpu_guest_context_t *ctxt)
{
dom0_op_t op;
int rc;
- op.cmd = DOM0_SETDOMAININFO;
- op.u.setdomaininfo.domain = domid;
- op.u.setdomaininfo.vcpu = vcpu;
- op.u.setdomaininfo.ctxt = ctxt;
+ op.cmd = DOM0_SETVCPUCONTEXT;
+ op.u.setvcpucontext.domain = domid;
+ op.u.setvcpucontext.vcpu = vcpu;
+ op.u.setvcpucontext.ctxt = ctxt;
if ( (rc = mlock(ctxt, sizeof(*ctxt))) != 0 )
return rc;
diff --git a/tools/libxc/xc_ia64_stubs.c b/tools/libxc/xc_ia64_stubs.c
index bc2caa12a9..2a25802c3b 100644
--- a/tools/libxc/xc_ia64_stubs.c
+++ b/tools/libxc/xc_ia64_stubs.c
@@ -664,7 +664,7 @@ int xc_vmx_build(int xc_handle,
goto error_out;
}
- if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) ){
+ if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) ){
PERROR("Could not get vcpu context");
goto error_out;
}
@@ -688,11 +688,11 @@ int xc_vmx_build(int xc_handle,
memset( &launch_op, 0, sizeof(launch_op) );
- launch_op.u.setdomaininfo.domain = (domid_t)domid;
- launch_op.u.setdomaininfo.vcpu = 0;
- launch_op.u.setdomaininfo.ctxt = ctxt;
+ launch_op.u.setvcpucontext.domain = (domid_t)domid;
+ launch_op.u.setvcpucontext.vcpu = 0;
+ launch_op.u.setvcpucontext.ctxt = ctxt;
- launch_op.cmd = DOM0_SETDOMAININFO;
+ launch_op.cmd = DOM0_SETVCPUCONTEXT;
rc = do_dom0_op(xc_handle, &launch_op);
return rc;
diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c
index f684b7185f..a48ecd45bd 100644
--- a/tools/libxc/xc_linux_build.c
+++ b/tools/libxc/xc_linux_build.c
@@ -794,7 +794,7 @@ int xc_linux_build(int xc_handle,
goto error_out;
}
- if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) )
+ if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) )
{
PERROR("Could not get vcpu context");
goto error_out;
@@ -897,11 +897,11 @@ int xc_linux_build(int xc_handle,
memset( &launch_op, 0, sizeof(launch_op) );
- launch_op.u.setdomaininfo.domain = (domid_t)domid;
- launch_op.u.setdomaininfo.vcpu = 0;
- launch_op.u.setdomaininfo.ctxt = ctxt;
+ launch_op.u.setvcpucontext.domain = (domid_t)domid;
+ launch_op.u.setvcpucontext.vcpu = 0;
+ launch_op.u.setvcpucontext.ctxt = ctxt;
- launch_op.cmd = DOM0_SETDOMAININFO;
+ launch_op.cmd = DOM0_SETVCPUCONTEXT;
rc = xc_dom0_op(xc_handle, &launch_op);
return rc;
diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c
index 95ead19389..c91efce4b7 100644
--- a/tools/libxc/xc_linux_restore.c
+++ b/tools/libxc/xc_linux_restore.c
@@ -171,7 +171,7 @@ int xc_linux_restore(int xc_handle, int io_fd,
/* Only have to worry about vcpu 0 even for SMP */
- if (xc_domain_get_vcpu_context( xc_handle, dom, 0, &ctxt)) {
+ if (xc_vcpu_getcontext( xc_handle, dom, 0, &ctxt)) {
ERR("Could not get vcpu context");
goto out;
}
@@ -735,10 +735,10 @@ int xc_linux_restore(int xc_handle, int io_fd,
DPRINTF("Domain ready to be built.\n");
- op.cmd = DOM0_SETDOMAININFO;
- op.u.setdomaininfo.domain = (domid_t)dom;
- op.u.setdomaininfo.vcpu = 0;
- op.u.setdomaininfo.ctxt = &ctxt;
+ op.cmd = DOM0_SETVCPUCONTEXT;
+ op.u.setvcpucontext.domain = (domid_t)dom;
+ op.u.setvcpucontext.vcpu = 0;
+ op.u.setvcpucontext.ctxt = &ctxt;
rc = xc_dom0_op(xc_handle, &op);
if (rc != 0) {
diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c
index 1c32ed8a80..ac8becb442 100644
--- a/tools/libxc/xc_linux_save.c
+++ b/tools/libxc/xc_linux_save.c
@@ -382,7 +382,7 @@ static int suspend_and_state(int xc_handle, int io_fd, int dom,
return -1;
}
- if ( xc_domain_get_vcpu_context(xc_handle, dom, 0 /* XXX */, ctxt))
+ if ( xc_vcpu_getcontext(xc_handle, dom, 0 /* XXX */, ctxt))
ERR("Could not get vcpu context");
@@ -643,7 +643,7 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
}
/* Only have to worry about vcpu 0 even for SMP */
- if (xc_domain_get_vcpu_context(xc_handle, dom, 0, &ctxt)) {
+ if (xc_vcpu_getcontext(xc_handle, dom, 0, &ctxt)) {
ERR("Could not get vcpu context");
goto out;
}
diff --git a/tools/libxc/xc_pagetab.c b/tools/libxc/xc_pagetab.c
index b63ea89ade..02a19b5527 100644
--- a/tools/libxc/xc_pagetab.c
+++ b/tools/libxc/xc_pagetab.c
@@ -74,7 +74,7 @@ unsigned long xc_translate_foreign_address(int xc_handle, uint32_t dom,
#define pt_levels 4
#endif
- if (xc_domain_get_vcpu_context(xc_handle, dom, vcpu, &ctx) != 0) {
+ if (xc_vcpu_getcontext(xc_handle, dom, vcpu, &ctx) != 0) {
fprintf(stderr, "failed to retreive vcpu context\n");
goto out;
}
diff --git a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c
index 0bf365a314..ac30269cfb 100644
--- a/tools/libxc/xc_ptrace.c
+++ b/tools/libxc/xc_ptrace.c
@@ -33,7 +33,7 @@ fetch_regs(int xc_handle, int cpu, int *online)
if (online)
*online = 0;
if ( !(regs_valid & (1 << cpu)) ) {
- retval = xc_domain_get_vcpu_context(xc_handle, current_domid,
+ retval = xc_vcpu_getcontext(xc_handle, current_domid,
cpu, &ctxt[cpu]);
if ( retval )
goto done;
@@ -43,8 +43,7 @@ fetch_regs(int xc_handle, int cpu, int *online)
if ( online == NULL )
goto done;
- retval = xc_domain_get_vcpu_info(xc_handle, current_domid,
- cpu, &info);
+ retval = xc_vcpu_getinfo(xc_handle, current_domid, cpu, &info);
*online = info.online;
done:
@@ -395,7 +394,7 @@ xc_ptrace(
case PTRACE_SETREGS:
SET_XC_REGS(((struct gdb_regs *)data), ctxt[cpu].user_regs);
- retval = xc_domain_setinfo(xc_handle, current_domid, cpu, &ctxt[cpu]);
+ retval = xc_vcpu_setcontext(xc_handle, current_domid, cpu, &ctxt[cpu]);
if (retval)
goto error_out;
break;
@@ -405,7 +404,7 @@ xc_ptrace(
* during single-stepping - but that just seems retarded
*/
ctxt[cpu].user_regs.eflags |= PSL_T;
- retval = xc_domain_setinfo(xc_handle, current_domid, cpu, &ctxt[cpu]);
+ retval = xc_vcpu_setcontext(xc_handle, current_domid, cpu, &ctxt[cpu]);
if ( retval )
{
perror("dom0 op failed");
@@ -423,8 +422,8 @@ xc_ptrace(
/* Clear trace flag */
if ( ctxt[cpu].user_regs.eflags & PSL_T ) {
ctxt[cpu].user_regs.eflags &= ~PSL_T;
- retval = xc_domain_setinfo(xc_handle, current_domid,
- cpu, &ctxt[cpu]);
+ retval = xc_vcpu_setcontext(xc_handle, current_domid,
+ cpu, &ctxt[cpu]);
if ( retval ) {
perror("dom0 op failed");
goto error_out;
diff --git a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
index 7e6839b65d..ee18a4f8a2 100644
--- a/tools/libxc/xc_vmx_build.c
+++ b/tools/libxc/xc_vmx_build.c
@@ -651,7 +651,7 @@ int xc_vmx_build(int xc_handle,
goto error_out;
}
- if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) )
+ if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) )
{
PERROR("Could not get vcpu context");
goto error_out;
@@ -708,11 +708,11 @@ int xc_vmx_build(int xc_handle,
memset( &launch_op, 0, sizeof(launch_op) );
- launch_op.u.setdomaininfo.domain = (domid_t)domid;
- launch_op.u.setdomaininfo.vcpu = 0;
- launch_op.u.setdomaininfo.ctxt = ctxt;
+ launch_op.u.setvcpucontext.domain = (domid_t)domid;
+ launch_op.u.setvcpucontext.vcpu = 0;
+ launch_op.u.setvcpucontext.ctxt = ctxt;
- launch_op.cmd = DOM0_SETDOMAININFO;
+ launch_op.cmd = DOM0_SETVCPUCONTEXT;
rc = xc_dom0_op(xc_handle, &launch_op);
return rc;
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index f558b5985e..2adf825cd4 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -181,10 +181,11 @@ int xc_domain_unpause(int xc_handle,
*/
int xc_domain_destroy(int xc_handle,
uint32_t domid);
-int xc_domain_pincpu(int xc_handle,
- uint32_t domid,
- int vcpu,
- cpumap_t cpumap);
+
+int xc_vcpu_setaffinity(int xc_handle,
+ uint32_t domid,
+ int vcpu,
+ cpumap_t cpumap);
/**
* This function will return information about one or more domains. It is
@@ -208,7 +209,7 @@ int xc_domain_getinfo(int xc_handle,
/**
- * This function will set the vcpu context for the specified domain.
+ * This function will set the execution context for the specified vcpu.
*
* @parm xc_handle a handle to an open hypervisor interface
* @parm domid the domain to set the vcpu context for
@@ -216,10 +217,10 @@ int xc_domain_getinfo(int xc_handle,
* @parm ctxt pointer to the the cpu context with the values to set
* @return the number of domains enumerated or -1 on error
*/
-int xc_domain_setinfo(int xc_handle,
- uint32_t domid,
- uint32_t vcpu,
- vcpu_guest_context_t *ctxt);
+int xc_vcpu_setcontext(int xc_handle,
+ uint32_t domid,
+ uint32_t vcpu,
+ vcpu_guest_context_t *ctxt);
/**
* This function will return information about one or more domains, using a
* single hypercall. The domain information will be stored into the supplied
@@ -249,17 +250,16 @@ int xc_domain_getinfolist(int xc_handle,
* domain
* @return 0 on success, -1 on failure
*/
-int xc_domain_get_vcpu_context(int xc_handle,
+int xc_vcpu_getcontext(int xc_handle,
uint32_t domid,
uint32_t vcpu,
vcpu_guest_context_t *ctxt);
typedef dom0_getvcpuinfo_t xc_vcpuinfo_t;
-int xc_domain_get_vcpu_info(int xc_handle,
- uint32_t domid,
- uint32_t vcpu,
- xc_vcpuinfo_t *info);
-
+int xc_vcpu_getinfo(int xc_handle,
+ uint32_t domid,
+ uint32_t vcpu,
+ xc_vcpuinfo_t *info);
int xc_domain_setcpuweight(int xc_handle,
uint32_t domid,
diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c
index 5a4cbf5558..ea92870d22 100644
--- a/tools/python/xen/lowlevel/xc/xc.c
+++ b/tools/python/xen/lowlevel/xc/xc.c
@@ -135,9 +135,9 @@ static PyObject *pyxc_domain_destroy(XcObject *self, PyObject *args)
}
-static PyObject *pyxc_domain_pincpu(XcObject *self,
- PyObject *args,
- PyObject *kwds)
+static PyObject *pyxc_vcpu_setaffinity(XcObject *self,
+ PyObject *args,
+ PyObject *kwds)
{
uint32_t dom;
int vcpu = 0, i;
@@ -157,7 +157,7 @@ static PyObject *pyxc_domain_pincpu(XcObject *self,
cpumap |= (cpumap_t)1 << PyInt_AsLong(PyList_GetItem(cpulist, i));
}
- if ( xc_domain_pincpu(self->xc_handle, dom, vcpu, cpumap) != 0 )
+ if ( xc_vcpu_setaffinity(self->xc_handle, dom, vcpu, cpumap) != 0 )
return PyErr_SetFromErrno(xc_error);
Py_INCREF(zero);
@@ -297,7 +297,7 @@ static PyObject *pyxc_vcpu_getinfo(XcObject *self,
&dom, &vcpu) )
return NULL;
- rc = xc_domain_get_vcpu_info(self->xc_handle, dom, vcpu, &info);
+ rc = xc_vcpu_getinfo(self->xc_handle, dom, vcpu, &info);
if ( rc < 0 )
return PyErr_SetFromErrno(xc_error);
@@ -890,8 +890,8 @@ static PyMethodDef pyxc_methods[] = {
" dom [int]: Identifier of domain to be destroyed.\n\n"
"Returns: [int] 0 on success; -1 on error.\n" },
- { "domain_pincpu",
- (PyCFunction)pyxc_domain_pincpu,
+ { "vcpu_setaffinity",
+ (PyCFunction)pyxc_vcpu_setaffinity,
METH_VARARGS | METH_KEYWORDS, "\n"
"Pin a VCPU to a specified set CPUs.\n"
" dom [int]: Identifier of domain to which VCPU belongs.\n"
diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py
index 592ab5fd60..e7ab105323 100644
--- a/tools/python/xen/xend/XendDomain.py
+++ b/tools/python/xen/xend/XendDomain.py
@@ -443,7 +443,7 @@ class XendDomain:
cpumap = map(lambda x: int(x),
cpumap.replace("[", "").replace("]", "").split(","))
try:
- return xc.domain_pincpu(dominfo.getDomid(), vcpu, cpumap)
+ return xc.vcpu_setaffinity(dominfo.getDomid(), vcpu, cpumap)
except Exception, ex:
raise XendError(str(ex))
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index 250bd12494..014a308ca1 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -1179,7 +1179,7 @@ class XendDomainInfo:
for v in range(0, self.info['max_vcpu_id']+1):
# pincpu takes a list of ints
cpu = [ int( cpus[v % len(cpus)] ) ]
- xc.domain_pincpu(self.domid, v, cpu)
+ xc.vcpu_setaffinity(self.domid, v, cpu)
m = self.image.getDomainMemory(self.info['memory'] * 1024)
balloon.free(m)
diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 32adccde7e..29c6969b06 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -380,10 +380,10 @@ void dump_ctx(int vcpu)
exit(-1);
}
- ret = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, &ctx);
+ ret = xc_vcpu_getcontext(xc_handle, domid, vcpu, &ctx);
if (ret < 0) {
xc_domain_unpause(xc_handle, domid);
- perror("xc_domain_get_vcpu_context");
+ perror("xc_vcpu_getcontext");
exit(-1);
}