]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-39123: Fix xapi execution in a VM. The new get_boot_cpufeatures hypercall hasn...
authorJon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Wed, 24 Mar 2010 12:16:36 +0000 (12:16 +0000)
committerJon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Wed, 24 Mar 2010 12:16:36 +0000 (12:16 +0000)
Original patch by Ian Campbell.

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
cpuid/cpuid.ml

index 8477e628365fa44e263cc5e61b12534c41bb7b41..6f332b77dbdc880a7a82617ff78c5d5fe3e36eed 100644 (file)
@@ -128,7 +128,10 @@ let is_maskable manufacturer family model stepping =
                else false
 
 let get_features_from_xen () =
-       let features = Xc.with_intf (fun xc -> Xc.get_boot_cpufeatures xc) in
+       let features = 
+         try Xc.with_intf (fun xc -> Xc.get_boot_cpufeatures xc) 
+         with _ -> 0l, 0l, 0l, 0l, 0l, 0l, 0l, 0l 
+       in
        match features with
        | base_ecx, base_edx, ext_ecx, ext_edx,
                masked_base_ecx, masked_base_edx, masked_ext_ecx, masked_ext_edx ->