search for: generate_exception_if

Displaying 8 results from an estimated 8 matches for "generate_exception_if".

2007 Dec 19
3
x86_emulate(): forgot to generate_exception_if() for 0xff?
Hi all, In arch/x86/x86_emulate.c: x86_emulate(): 1716 case 0xfe: /* Grp4 */ 1717 generate_exception_if((m odrm_reg & 7) >= 2, EXC_UD); 1718 case 0xff: /* Grp5 */ 1719 switch ( modrm_reg & 7 ) 1720 { 1721 case 0: /* inc */ 1722 emulate_1op("inc", dst, _regs.eflags); 1723 break; 1724 case 1: /* dec */...
2008 Apr 21
1
[PATCH] x86-64: emulation support for cmpxchg16b
...emulate.c 2008-04-15 08:48:15.000000000 +0200 @@ -3346,60 +3346,64 @@ x86_emulate( src.val = x86_seg_gs; goto pop_seg; - case 0xc7: /* Grp9 (cmpxchg8b) */ -#if defined(__i386__) - { - unsigned long old_lo, old_hi; + case 0xc7: /* Grp9 (cmpxchg{8,16}b) */ generate_exception_if((modrm_reg & 7) != 1, EXC_UD, -1); generate_exception_if(ea.type != OP_MEM, EXC_UD, -1); - if ( (rc = ops->read(ea.mem.seg, ea.mem.off+0, &old_lo, 4, ctxt)) || - (rc = ops->read(ea.mem.seg, ea.mem.off+4, &old_hi, 4, ctxt)) ) - goto done; -...
2013 Nov 19
1
[PATCH] x86: fix emulation of indirect far calls and jumps
...src.val = dst.val; goto push; - break; case 4: /* jmp (near) */ _regs.eip = src.val; dst.type = OP_NONE; @@ -3580,9 +3579,9 @@ x86_emulate( case 5: /* jmp (far, absolute indirect) */ { unsigned long sel; - generate_exception_if(dst.type != OP_MEM, EXC_UD, -1); + generate_exception_if(src.type != OP_MEM, EXC_UD, -1); - if ( (rc = read_ulong(dst.mem.seg, dst.mem.off+dst.bytes, + if ( (rc = read_ulong(src.mem.seg, src.mem.off + op_bytes, &sel, 2, ctxt,...
2008 Mar 17
12
[PATCH]Fix the bug of guest os installation failure and win2k boot failure
Hi, Keir, This patch is to fix the problem of Linux guest installation failure and Windows 2000 boot failure.       In the early code, we use vmx_vmexit_handler() -> vmx_io_instruction() function to emulate I/O instructions. But now, we use vmx_vmexit_handler() -> handle_mmio -> hvm_emulate_one() -> x86_emulate() to emulate I/O instructions. Also nowadays, the realmode
2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
...rch/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) @@ -4357,13 +4360,24 @@ x86_emulate( dst.val = (uint8_t)src.val; break; - case 0xbc: /* bsf */ { - int zf; + case 0xbc: /* bsf or tzcnt */ { +...
2013 Aug 28
3
[PATCH] x86: AVX instruction emulation fixes
...t;); + } + else + printf("skipped\n"); + for ( j = 1; j <= 2; j++ ) { #if defined(__i386__) --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1454,10 +1454,10 @@ x86_emulate( /* VEX */ generate_exception_if(rex_prefix || vex.pfx, EXC_UD, -1); - vex.raw[0] = b; + vex.raw[0] = modrm; if ( b & 1 ) { - vex.raw[1] = b; + vex.raw[1] = modrm; vex.opcx = vex_0f;...
2011 Nov 30
0
[PATCH 4/4] x86/emulator: cleanup
...break; } @@ -4076,7 +4077,7 @@ x86_emulate( case 0x35: /* sysexit */ { uint64_t msr_content; struct segment_register cs, ss; - int user64 = !!(rex_prefix & 8); /* REX.W */ + bool_t user64 = !!(rex_prefix & REX_W); int rc; generate_exception_if(!mode_ring0(), EXC_GP, 0); @@ -4366,7 +4367,7 @@ x86_emulate( : "=r" (dst.val), "=q" (zf) : "r" (src.val) ); _regs.eflags &= ~EFLG_ZF; - if ( (rep_prefix == REPE_PREFIX) && vcpu_has_bmi1() ) + if ( (vex.p...
2011 Nov 30
0
[PATCH 2/4] x86/emulator: add emulation of SIMD FP moves
...ea.bytes = 16 << vex.l; + } + if ( vex.pfx & VEX_PREFIX_SCALAR_MASK ) + ea.bytes = vex.pfx & VEX_PREFIX_DOUBLE_MASK ? 8 : 4; + if ( ea.type == OP_MEM ) + { + /* XXX enable once there is ops->ea() or equivalent + generate_exception_if((b >= 0x28) && + (ops->ea(ea.mem.seg, ea.mem.off) + & (ea.bytes - 1)), EXC_GP, 0); */ + if ( !(b & 1) ) + rc = ops->read(ea.mem.seg, ea.mem.off+0, mmvalp, +...