diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 14:05:41 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 14:05:41 +0000 |
commit | aa9c44021251b17ad24add472751e03b5718cbde (patch) | |
tree | 7bc56f75c711db3a4900c2813481173b16827ffe /xen/arch/x86/platform_hypercall.c | |
parent | 7132ae7e553f5dead2cb246165490ad4155ee83b (diff) | |
download | xen-aa9c44021251b17ad24add472751e03b5718cbde.tar.gz xen-aa9c44021251b17ad24add472751e03b5718cbde.tar.bz2 xen-aa9c44021251b17ad24add472751e03b5718cbde.zip |
Avoid negative runstate pieces.
Also consolidate all places to get cpu idle time.
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/platform_hypercall.c')
-rw-r--r-- | xen/arch/x86/platform_hypercall.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 28ab32678b..4bf6777923 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -337,16 +337,8 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) for_each_cpu_mask ( cpu, cpumap ) { if ( (v = idle_vcpu[cpu]) != NULL ) - { - idletime = v->runstate.time[RUNSTATE_running]; - if ( v->is_running ) - idletime += now - v->runstate.state_entry_time; - } - else - { - idletime = 0; cpu_clear(cpu, cpumap); - } + idletime = get_cpu_idle_time(cpu); ret = -EFAULT; if ( copy_to_guest_offset(idletimes, cpu, &idletime, 1) ) |