From fe81f8d442da9278d622a74ca9182d2aea93c1f0 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 24 Mar 2010 12:16:36 +0000 Subject: [PATCH] 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 --- cpuid/cpuid.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -> -- 2.39.5