|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Extend VCPUINFO dom0_op to return status information abo
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 27d7c7f226f489ea6dd9e4952ab6044e477653a3
# Parent 26862e5458ebd047005a5e1897299d5d3defc568
Extend VCPUINFO dom0_op to return status information about
run state of the VCPU. VCPUCONTEXT returns info about
hotplugged VCPUs.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r 26862e5458eb -r 27d7c7f226f4 xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c Sat Oct 15 07:33:19 2005
+++ b/xen/common/dom0_ops.c Sat Oct 15 07:52:22 2005
@@ -447,7 +447,7 @@
ret = -ESRCH;
v = d->vcpu[op->u.getvcpucontext.vcpu];
- if ( (v == NULL) || test_bit(_VCPUF_down, &v->vcpu_flags) )
+ if ( (v == NULL) || !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
goto getvcpucontext_out;
ret = -ENOMEM;
@@ -490,10 +490,12 @@
goto getvcpuinfo_out;
ret = -ESRCH;
- v = d->vcpu[op->u.getvcpuinfo.vcpu];
- if ( (v == NULL) || test_bit(_VCPUF_down, &v->vcpu_flags) )
+ if ( (v = d->vcpu[op->u.getvcpuinfo.vcpu]) == NULL )
goto getvcpuinfo_out;
+ op->u.getvcpuinfo.online = !test_bit(_VCPUF_down, &v->vcpu_flags);
+ op->u.getvcpuinfo.blocked = test_bit(_VCPUF_blocked, &v->vcpu_flags);
+ op->u.getvcpuinfo.running = test_bit(_VCPUF_running, &v->vcpu_flags);
op->u.getvcpuinfo.cpu_time = v->cpu_time;
op->u.getvcpuinfo.cpu = v->processor;
op->u.getvcpuinfo.cpumap = v->cpumap;
diff -r 26862e5458eb -r 27d7c7f226f4 xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h Sat Oct 15 07:33:19 2005
+++ b/xen/include/public/dom0_ops.h Sat Oct 15 07:52:22 2005
@@ -365,7 +365,10 @@
domid_t domain; /* domain to be affected */
uint16_t vcpu; /* vcpu # */
/* OUT variables. */
- uint64_t cpu_time;
+ uint8_t online; /* currently online (not hotplugged)? */
+ uint8_t blocked; /* blocked waiting for an event? */
+ uint8_t running; /* currently scheduled on its CPU? */
+ uint64_t cpu_time; /* total cpu time consumed (ns) */
uint32_t cpu; /* current mapping */
cpumap_t cpumap; /* allowable mapping */
} dom0_getvcpuinfo_t;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Extend VCPUINFO dom0_op to return status information about,
Xen patchbot -unstable <=
|
|
|
|
|