From: Jon Ludlam Date: Wed, 24 Mar 2010 12:16:36 +0000 (+0000) Subject: CA-39123: Fix xapi execution in a VM. The new get_boot_cpufeatures hypercall hasn... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fe81f8d442da9278d622a74ca9182d2aea93c1f0;p=xcp%2Fxen-api-libs.git CA-39123: Fix xapi execution in a VM. The new get_boot_cpufeatures hypercall hasn't yet been implemented in xiu. This is a temporary patch to fix the symptoms until xiu is fixed to do this properly. Original patch by Ian Campbell. Signed-off-by: Jon Ludlam --- diff --git a/cpuid/cpuid.ml b/cpuid/cpuid.ml index 8477e62..6f332b7 100644 --- a/cpuid/cpuid.ml +++ b/cpuid/cpuid.ml @@ -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 ->