]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
expose the capabilities in xenops physinfo
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Fri, 26 Jun 2009 10:32:11 +0000 (11:32 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Fri, 26 Jun 2009 10:32:11 +0000 (11:32 +0100)
xenvm/xenops.ml

index 7e28f4040d69fff14a9b227a942efe8290edf358..b59c7a4a6c1010701b5f446867893e4ee4f8cffb 100644 (file)
@@ -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