From: Vincent Hanquez Date: Fri, 26 Jun 2009 10:32:11 +0000 (+0100) Subject: expose the capabilities in xenops physinfo X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b659172e4e6afd6e2dfb5e3e78f11fce85dc6c08;p=xenclient%2Ftoolstack.git expose the capabilities in xenops physinfo --- diff --git a/xenvm/xenops.ml b/xenvm/xenops.ml index 7e28f40..b59c7a4 100644 --- a/xenvm/xenops.ml +++ b/xenvm/xenops.ml @@ -35,6 +35,11 @@ let print_xen_dmesg ~xc = printf "%s\n" s let print_xen_physinfo ~xc = + let string_of_cap_flag flag = + match flag with + | Xc.CAP_HVM -> "hvm" + | Xc.CAP_DirectIO -> "directio" + in let physinfo = Xc.physinfo xc in let totalmib = Xc.pages_to_mib (Int64.of_nativeint physinfo.Xc.total_pages) and freemib = Xc.pages_to_mib (Int64.of_nativeint physinfo.Xc.free_pages) @@ -47,7 +52,9 @@ let print_xen_physinfo ~xc = printf "cpu_khz = %d\n" physinfo.Xc.cpu_khz; printf "total_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.total_pages) totalmib; printf "free_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.free_pages) freemib; - printf "scrub_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.scrub_pages) scrubmib + printf "scrub_pages = %s (%Ld Mb)\n" (Nativeint.to_string physinfo.Xc.scrub_pages) scrubmib; + printf "capabilities = %s\n" (String.concat " " (List.map string_of_cap_flag physinfo.Xc.capabilities)); + () let print_pcpus_info ~xc = let physinfo = Xc.physinfo xc in