[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86emul: support fencing insns
commit 7507ab8e7fec22f56bc374f280cda6f9b0388880 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Jan 6 15:04:22 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jan 6 15:04:22 2017 +0100 x86emul: support fencing insns Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/x86_emulate/x86_emulate.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 5b5c254..5694d09 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -5343,8 +5343,27 @@ x86_emulate( case X86EMUL_OPC(0x0f, 0xae): case X86EMUL_OPC_66(0x0f, 0xae): /* Grp15 */ switch ( modrm_reg & 7 ) { - case 7: /* clflush{,opt} */ - fail_if(modrm_mod == 3); + case 5: /* lfence */ + fail_if(modrm_mod != 3); + generate_exception_if(vex.pfx, EXC_UD); + vcpu_must_have(sse2); + asm volatile ( "lfence" ::: "memory" ); + break; + case 6: /* mfence */ + fail_if(modrm_mod != 3); + generate_exception_if(vex.pfx, EXC_UD); + vcpu_must_have(sse2); + asm volatile ( "mfence" ::: "memory" ); + break; + case 7: + if ( modrm_mod == 3 ) /* sfence */ + { + generate_exception_if(vex.pfx, EXC_UD); + vcpu_must_have(sse); + asm volatile ( "sfence" ::: "memory" ); + break; + } + /* else clflush{,opt} */ if ( !vex.pfx ) vcpu_must_have(clflush); else -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |