]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: force CLZERO feature flag in test harness
authorJan Beulich <jbeulich@suse.com>
Wed, 19 Apr 2017 11:30:27 +0000 (13:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 19 Apr 2017 11:30:27 +0000 (13:30 +0200)
Commit b988e88cc0 ("x86/emul: Add feature check for clzero") added a
feature check to the emulator, which breaks the harness without this
flag being forced to true.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
tools/tests/x86_emulator/x86_emulate.c

index cea0595ae29b98be5b27f442b11b008f7d295e5f..79661d5c2b37b9e4cdcf22f52870560dadef1130 100644 (file)
@@ -89,6 +89,13 @@ int emul_test_cpuid(
         res->c |= 1U << 22;
     }
 
+    /*
+     * The emulator doesn't itself use CLZERO, so we can always run the
+     * respective test(s).
+     */
+    if ( leaf == 0x80000008 )
+        res->b |= 1U << 0;
+
     return X86EMUL_OKAY;
 }