ChangeSet 1.1320, 2005/04/18 22:59:54+01:00, iap10@xxxxxxxxxxxxxxxxxxxxx
Merge
freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-2.0-testing.bk
into
freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
xc_domain.c | 40 +++++++++++-----------------------------
1 files changed, 11 insertions(+), 29 deletions(-)
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c 2005-04-18 21:06:09 -04:00
+++ b/tools/libxc/xc_domain.c 2005-04-18 21:06:09 -04:00
@@ -69,6 +69,7 @@
dom0_op_t op;
op.cmd = DOM0_PINCPUDOMAIN;
op.u.pincpudomain.domain = (domid_t)domid;
+ op.u.pincpudomain.exec_domain = 0;
op.u.pincpudomain.cpu = cpu;
return do_dom0_op(xc_handle, &op);
}
@@ -87,6 +88,7 @@
{
op.cmd = DOM0_GETDOMAININFO;
op.u.getdomaininfo.domain = (domid_t)next_domid;
+ op.u.getdomaininfo.exec_domain = 0; // FIX ME?!?
op.u.getdomaininfo.ctxt = NULL; /* no exec context info, thanks. */
if ( do_dom0_op(xc_handle, &op) < 0 )
break;
@@ -120,6 +122,7 @@
int xc_domain_getfullinfo(int xc_handle,
u32 domid,
+ u32 vcpu,
xc_domaininfo_t *info,
full_execution_context_t *ctxt)
{
@@ -128,6 +131,7 @@
op.cmd = DOM0_GETDOMAININFO;
op.u.getdomaininfo.domain = (domid_t)domid;
+ op.u.getdomaininfo.exec_domain = (u16)vcpu;
op.u.getdomaininfo.ctxt = ctxt;
rc = do_dom0_op(xc_handle, &op);
@@ -174,10 +178,10 @@
int ret;
/* Figure out which scheduler is currently used: */
- if((ret = xc_sched_id(xc_handle, &sched_id)))
+ if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 )
return ret;
- switch(sched_id)
+ switch ( sched_id )
{
case SCHED_BVT:
{
@@ -189,30 +193,21 @@
/* Preserve all the scheduling parameters apart
of MCU advance. */
- if((ret = xc_bvtsched_domain_get(xc_handle, domid, &mcuadv,
- &warpback, &warpvalue, &warpl, &warpu)))
+ if ( (ret = xc_bvtsched_domain_get(
+ xc_handle, domid, &mcuadv,
+ &warpback, &warpvalue, &warpl, &warpu)) != 0 )
return ret;
/* The MCU advance is inverse of the weight.
Default value of the weight is 1, default mcuadv 10.
The scaling factor is therefore 10. */
- if(weight > 0) mcuadv = 10 / weight;
+ if ( weight > 0 )
+ mcuadv = 10 / weight;
ret = xc_bvtsched_domain_set(xc_handle, domid, mcuadv,
warpback, warpvalue, warpl, warpu);
break;
}
-
- case SCHED_RROBIN:
- {
- /* The weight cannot be set for RRobin */
- break;
- }
- case SCHED_ATROPOS:
- {
- /* TODO - can we set weights in Atropos? */
- break;
- }
}
return ret;
@@ -238,18 +233,5 @@
op.cmd = DOM0_SETDOMAINMAXMEM;
op.u.setdomainmaxmem.domain = (domid_t)domid;
op.u.setdomainmaxmem.max_memkb = max_memkb;
- return do_dom0_op(xc_handle, &op);
-}
-
-int xc_domain_setvmassist(int xc_handle,
- u32 domid,
- unsigned int cmd,
- unsigned int type)
-{
- dom0_op_t op;
- op.cmd = DOM0_SETDOMAINVMASSIST;
- op.u.setdomainvmassist.domain = (domid_t)domid;
- op.u.setdomainvmassist.cmd = cmd;
- op.u.setdomainvmassist.type = type;
return do_dom0_op(xc_handle, &op);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|