search for: x86_emulate

Displaying 20 results from an estimated 38 matches for "x86_emulate".

2008 Apr 21
1
[PATCH] x86-64: emulation support for cmpxchg16b
...08-04-15/tools/tests/test_x86_emulator.c 2008-04-15 08:48:15.000000000 +0200 @@ -74,7 +74,7 @@ static int cmpxchg( return X86EMUL_OKAY; } -static int cmpxchg8b( +static int cmpxchg2( unsigned int seg, unsigned long offset, unsigned long old_lo, @@ -94,7 +94,7 @@ static struct x86_emulate_ops emulops = .insn_fetch = read, .write = write, .cmpxchg = cmpxchg, - .cmpxchg8b = cmpxchg8b + .cmpxchg2 = cmpxchg2 }; int main(int argc, char **argv) Index: 2008-04-15/tools/tests/x86_emulate.c =================================================================...
2013 Aug 28
3
[PATCH] x86: AVX instruction emulation fixes
...ion" :: "c" (NULL) ); + + memcpy(instr, vmovdqu_to_mem, 15); + memset(res, 0x55, 128); + memset(res + 16, 0xff, 16); + memset(res + 20, 0x00, 16); + regs.eip = (unsigned long)&instr[0]; + regs.ecx = (unsigned long)res; + rc = x86_emulate(&ctxt, &emulops); + if ( (rc != X86EMUL_OKAY) || memcmp(res, res + 16, 64) ) + goto fail; + printf("okay\n"); + } + else + printf("skipped\n"); + + printf("%-40s", "Testing vmovdqu (%edx),%ymm4..."); + 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("i...
2011 Nov 30
0
[PATCH 4/4] x86/emulator: cleanup
Utilize some of the additions in the prior patches to clean up other code: - keep track of REP prefixes in only one variable - use REX_W in a few more places (instead of a literal number) 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 @@ -304,6 +304,10 @@ union vex { ptr[1] = rex | REX_PREFIX; \ } while (0) +#define rep_prefix() (vex.pfx >= vex_f3) +#define repe_prefix() (vex.pfx == vex_f3) +#define repne_prefix() (vex.pfx == vex_f2) + /* Type, address...
2008 Mar 17
12
[PATCH]Fix the bug of guest os installation failure and win2k boot failure
...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 emulation code walks through the path: vmx_realmode() -> realmode_emulate_one() -> hvm_emulate_one() -> x86_emulate().       The I/O handle code in x86_emulate() checks the cpl and iopl value, and if cpl > iopl, it will generat...
2011 Dec 15
10
fsincos emulation on AMD CPUs
All, in the light of erratum #573 I''m wondering if we need to tweak or conditionally suppress fsincos emulation. The question is whether there is any possibility for getting the emulator to hit this instruction on AMD (as no real mode emulation ought to be taking place there), i.e. whether there are places where emulation gets continued eagerly in anticipation of the need for emulation
2013 Nov 19
1
[PATCH] x86: fix emulation of indirect far calls and jumps
Commit 86781624 ("x86_emulate: PUSH <mem> must read source operand just once") corrected the operands of those of the operations of opcode extension group 5 that only read memory from SrcMem to DstMem, but failed to also switch the use of "dst" here to "src". Reported-by: Anthony Perard <antho...
2007 Nov 27
1
build error with current (changeset 16475) xen-unstable tree
...c -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/home/xen-unstable.hg/xen/include -I/home/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/home/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -DCONFIG_X86_PAE=1 -g -D__XEN__ -c x86_emulate.c -o x86_emulate.o cc1: warnings being treated as errors x86_emulate.c: In function âx86_emulateâ: x86_emulate.c:2709: warning: âea.bytesâ is used uninitialized in this function make[5]: *** [x86_emulate.o] Fehler 1 make[5]: Leaving directory `/home/xen-unstable.hg/xen/arch/x86'' make[4]: *...
2006 May 17
20
X86_emulate to be moved into qemu...
...mio. ;-) In the process of solving this one, I''ve got to (another) of the blocking points... At the moment, we translate the virtual address from the guest in the page-fault-handler to guest physical address via the gva_to_gpa() function in svm.c/vmx.c: xxx_do_page_fault(). When using x86_emulate.c inside qemu, we''d need to feed in the virtual address, but we also need to translate to (guest-)physical address. Any hints or tricks for this, or do I need to read the page-table and get the info that way [and CAN I even do that]? [And I''m sorry if this shows my complete and ut...
2011 Nov 30
0
[PATCH 2/4] x86/emulator: add emulation of SIMD FP moves
...(%1)\n" + ".popsection" :: "m" (res[10]), "c" (NULL) ); + + memcpy(instr, movsd_to_mem, 15); + regs.eip = (unsigned long)&instr[0]; + regs.ecx = (unsigned long)(res + 2); + regs.edx = 0; + rc = x86_emulate(&ctxt, &emulops); + if ( (rc != X86EMUL_OKAY) || memcmp(res, res + 8, 32) ) + goto fail; + printf("okay\n"); + } + else + { + printf("skipped\n"); + memset(res + 2, 0x66, 8); + } + + printf("%-40s", "Te...
2011 Nov 30
0
[PATCH 3/4] x86/emulator: properly handle lzcnt and tzcnt
These instructions are prefix selected flavors of bsf and bsr respectively, and hence the presences of the F3 prefix must be handled in the emulation 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_ha...
2008 Jun 06
4
Query regarding x86_emulate_memop() function
Hi there, I have a question regarding the functionality of x86_emulate_memop (Xen 3.1) or x86_emulate (Xen 3.2) function. This function gets called from sh_page_fault() function which is invoked when Xen receives a page fault. Since I am not clear completely about the emulation operation performed by Xen, I have following questions with a below mentioned scenario? 1...
2008 Mar 13
0
printk: cc1 warnings being treated as errors
Hi, I was trying to write printk statements in x86_emulate.c and I am getting following error. cc1: warnings being treated as errors x86_emulate.c: In function ''x86_emulate'': x86_emulate.c:2913: warning: ISO C90 forbids mixed declarations and code x86_emulate.c:2939: warning: ISO C90 forbids mixed declarations and code Yes, I know proba...
2008 Mar 13
0
printk: cc1 warnings being treated as errors
Hi, I was trying to write printk statements in x86_emulate.c and I am getting following error. cc1: warnings being treated as errors x86_emulate.c: In function ''x86_emulate'': x86_emulate.c:2913: warning: ISO C90 forbids mixed declarations and code x86_emulate.c:2939: warning: ISO C90 forbids mixed declarations and code Yes, I know proba...
2012 Oct 02
18
[PATCH 0/3] x86: adjust entry frame generation
This set of patches converts the way frames gets created from using PUSHes/POPs to using MOVes, thus allowing (in certain cases) to avoid saving/restoring part of the register set. While the place where the (small) win from this comes from varies between CPUs, the net effect is a 1 to 2% reduction on a combined interruption entry and exit when the full state save can be avoided. 1: use MOV
2005 Nov 11
3
[PATCH] add MOVSX instr support to VMX MMIO decoder
Add MOVSX instr support to VMX MMIO decoder. Signed-off-by: Xin Li <xin.b.li@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2007 Feb 15
0
[PATCH] x86 emulation: suppress rep prefix handling on non-repeatable instructions
Otherwise, pause or the recommended one-byte ret workaround on AMD processors may have ill side effects. Signed-off-by: Jan Beulich <jbeulich@novell.com> Index: 2007-02-07/xen/arch/x86/x86_emulate.c =================================================================== --- 2007-02-07.orig/xen/arch/x86/x86_emulate.c 2007-02-08 08:46:39.000000000 +0100 +++ 2007-02-07/xen/arch/x86/x86_emulate.c 2007-02-08 09:32:00.000000000 +0100 @@ -1579,7 +1579,9 @@ x86_emulate( if ( twobyte ) goto...
2012 May 04
9
[hybrid]: unable to boot hvm due to eflags.ID
Hi guys, At a loss trying to figure why if (has_eflag(X86_EFLAGS_ID)) returns false in my HVM domU. Standard function has_eflag() in cpucheck.c running in real mode. Works fine on PV dom0, but fails when guest is booting on my hybrid dom0. LMK if any ideas. I''ll keep digging in the manuals, but nothing so far. thanks, Mukesh
2008 Nov 20
10
issues with movnti emulation
We''ve got reports of that change causing HVM data corruption issues. While I can''t see what''s wrong with the patch, I''d suggest at least reverting it from the 3.3 tree (which is what our code is based upon) for the time being. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com
2011 Jan 31
9
[PATCH][SVM] Fix 32bit Windows guest VMs save/restore
The attached patch fixes the save/restore issue seen with 32bit Windows guest VMs. The root cause is that current Xen doesn''t intercept SYSENTER-related MSRs for 32bit guest VMs. As a result, the guest_sysenter_xxx fields contain incorrect values and shouldn''t be used for save/restore. This patch checks the LMA bit of EFER register in the save/restore code path. Please apply it