diff options
Diffstat (limited to 'tools/xc/lib/xc_misc.c')
-rw-r--r-- | tools/xc/lib/xc_misc.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/xc/lib/xc_misc.c b/tools/xc/lib/xc_misc.c index e4efec4a41..63c53146b7 100644 --- a/tools/xc/lib/xc_misc.c +++ b/tools/xc/lib/xc_misc.c @@ -46,3 +46,25 @@ int xc_readconsolering(int xc_handle, return ret; } + +int xc_physinfo(int xc_handle, + xc_physinfo_t *put_info) +{ + int ret; + dom0_op_t op; + dom0_physinfo_t *got_info = &op.u.physinfo; + + op.cmd = DOM0_PHYSINFO; + op.interface_version = DOM0_INTERFACE_VERSION; + + if((ret = do_dom0_op(xc_handle, &op))) return ret; + + put_info->ht_per_core = got_info->ht_per_core; + put_info->cores = got_info->cores; + put_info->total_pages = got_info->total_pages; + put_info->free_pages = got_info->free_pages; + put_info->cpu_khz = got_info->cpu_khz; + + return 0; +} + |