search for: vcpu_has_lzcnt

Displaying 2 results from an estimated 2 matches for "vcpu_has_lzcnt".

2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
...on code in order to avoid running into problems on newer CPUs. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1058,6 +1058,9 @@ static bool_t vcpu_has( return rc == X86EMUL_OKAY; } +#define vcpu_has_lzcnt() vcpu_has(0x80000001, ECX, 5, ctxt, ops) +#define vcpu_has_bmi1() vcpu_has(0x00000007, EBX, 3, ctxt, ops) + #define vcpu_must_have(leaf, reg, bit) \ generate_exception_if(!vcpu_has(leaf, reg, bit, ctxt, ops), EXC_UD, -1) #define vcpu_must_have_mmx() vcpu_must_have(0x00000001, EDX, 23) @...
2011 Nov 30
0
[PATCH 4/4] x86/emulator: cleanup
..._regs.eflags &= ~EFLG_CF; if ( zf ) @@ -4391,7 +4392,7 @@ x86_emulate( : "=r" (dst.val), "=q" (zf) : "r" (src.val) ); _regs.eflags &= ~EFLG_ZF; - if ( (rep_prefix == REPE_PREFIX) && vcpu_has_lzcnt() ) + if ( (vex.pfx == vex_f3) && vcpu_has_lzcnt() ) { _regs.eflags &= ~EFLG_CF; if ( zf ) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel