# HG changeset patch # User Jonathan Ludlam # Date 1269430677 0 # Node ID f265eaa8be2f3570dd0961a6f6f652ff4655a7b2 # Parent 194044dccbca88d5b1de83f91c2394f64205ea53 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 -r 194044dccbca -r f265eaa8be2f cpuid/cpuid.ml --- a/cpuid/cpuid.ml Tue Mar 16 20:54:36 2010 +0000 +++ b/cpuid/cpuid.ml Wed Mar 24 11:37:57 2010 +0000 @@ -128,7 +128,10 @@ 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 ->