- 27 Nov, 2007 3 commits
-
-
Amit Shah authored
emulator_write_std() is not implemented, and calling write_emulated should work just as well in place of write_std. Fixes emulator failures with the push r/m instruction. Signed-off-by:
Amit Shah <amit.shah@qumranet.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Izik Eidus authored
this make sure that no matter what is the operand size, all the value of the eip will be saved Signed-off-by:
Izik Eidus <izike@qumranet.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Izik Eidus authored
Change JMP_REL to call to register_address_increment(): the operands size should not effect the calculation of the eip, instead the ad_bytes should affect it. Signed-off-by:
Izik Eidus <izike@qumranet.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 08 Nov, 2007 2 commits
-
-
Avi Kivity authored
Emulate the 'invd' instruction (opcode 0f 08). Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Avi Kivity authored
'push imm8' found itself in the wrong switch somehow, so it is never executed. This fixes Windows 2003 installation. Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 22 Oct, 2007 4 commits
-
-
Aurelien Jarno authored
The patch belows changes the access type to register from memory for instructions that are declared as SrcMem or DstMem, but have a ModR/M byte with Mod = 3. It fixes (at least) the lmsw and smsw instructions on an AMD64 CPU, which are needed for FreeBSD. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Sheng Yang authored
Implement emulation of instruction: movnti m32/m64, r32/r64 opcode: 0x0f 0xc3 Signed-off-by:
Sheng Yang <sheng.yang@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Laurent Vivier authored
The repnz/repne instructions must set rep_prefix to 1 like rep/repe/repz. This patch correct the disk probe problem met with OpenBSD. This issue appears with commit e70669ab because before it, the decoding was done internally to kvm and after it is done by x86_emulate.c (which doesn't do it correctly). Signed-off-by:
Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
This code has gone to wrong place in the file. Moving it back to right location. Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 13 Oct, 2007 25 commits
-
-
Nitin A Kamble authored
Implement emulation of instruction: popf opcode: 0x9d Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Some operand fetches are less than the machine word size and can result in stale bits if used together with operands of different sizes. Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction: jump absolute r/m opcode: 0xff /4 Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction lea r16/r32, m opcode: 0x8d: Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of more jump conditional instructions jcc shortrel opcodes: 0x70 - 0x7f Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction: jump conditional rel opcodes: 0x0f 0x80 - 0x0f 0x8f Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction pushf opcode: 0x9c Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction opcode: 0xe8 call (near) Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement the instruction push imm8 opcode: 0x6a Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Christian Ehrhardt authored
This patch just renames the current (misnamed) _arch namings to _x86 to ensure better readability when a real arch layer takes place. Signed-off-by:
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Rusty Russell authored
invlpg shouldn't fetch the "src" address, since it may not be valid, however SVM's "solution" which neuters emulation of all group 7 instruction is horrible and breaks kvm-lite. The simplest fix is to put a special check in for invlpg. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Avi Kivity authored
Pointed out by Rusty Russell. Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Implement emulation of instruction and al imm8 (opcode 0x24) and ax/eax imm16/imm32 (opcode 0x25) Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Laurent Vivier authored
Split kvm_setup_pio() into two functions, one to setup in/out pio (kvm_emulate_pio()) and one to setup ins/outs pio (kvm_emulate_pio_string()). Signed-off-by:
Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Laurent Vivier authored
Both vmx and svm decode the I/O instructions, and both botch the job, requiring the instruction prefixes to be fetched in order to completely decode the instruction. So, if we see a string I/O instruction, use the x86 emulator to decode it, as it already has all the prefix decoding machinery. This patch defines ins/outs opcodes in x86_emulate.c and calls emulate_instruction() from io_interception() (svm.c) and from handle_io() (vmx.c). It removes all vmx/svm prefix instruction decoders (get_addr_size(), io_get_override(), io_address(), get_io_count()) Signed-off-by:
Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Laurent Vivier authored
... instead of a x86_emulate_ctxt, so that other callers can use it easily. Signed-off-by:
Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Aurelien Jarno authored
The writeback fixes (02c03a32 ) let some dead code in the cmpxchg instruction emulation. Remove it. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Avi Kivity authored
Right now, the bug is harmless as we never emulate one-byte 0xb6 or 0xb7. But things may change. Noted by the mysterious Gabriel C. Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Avi Kivity authored
The writeback fixes (02c03a32 ) broke cmov emulation. Fix. Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Rusty Russell authored
Speling error in comment. Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Rusty Russell authored
I have shied away from touching x86_emulate.c (it could definitely use some love, but it is forked from the Xen code, and it would be more productive to cross-merge fixes). Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 07 Aug, 2007 1 commit
-
-
Avi Kivity authored
More fallout from the writeback fixes: debug register transfer instructions do their own writeback and thus need to disable the general writeback mechanism. This fixes oopses and some guest failures on AMD machines (the Intel variant decodes the instruction in hardware and thus does not need emulation). Cc: Alistair John Strachan <alistair@devzero.co.uk> Signed-off-by:
Avi Kivity <avi@qumranet.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 25 Jul, 2007 1 commit
-
-
Aurelien Jarno authored
0x0f 0x01 instructions (ie lgdt, lidt, smsw, lmsw and invlpg) does not use writeback. This patch set no_wb=1 when emulating those instructions. This fixes a regression booting the FreeBSD kernel on AMD. Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 20 Jul, 2007 1 commit
-
-
Avi Kivity authored
Allow real-mode emulation of rdmsr and wrmsr. This allows smp Windows to boot, presumably for its sipi trampoline. Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
- 16 Jul, 2007 3 commits
-
-
Luca Tettamanti authored
When the old value and new one are the same the emulator skips the write; this is undesirable when the destination is a MMIO area and the write shall be performed regardless of the previous value. This optimization breaks e.g. a Linux guest APIC compiled without X86_GOOD_APIC. Remove the check and perform the writeback stage in the emulation unless it's explicitly disabled (currently push and some 2 bytes instructions may disable the writeback). Signed-Off-By:
Luca Tettamanti <kronos.it@gmail.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-
Nitin A Kamble authored
For use in real mode. Signed-off-by:
Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by:
Avi Kivity <avi@qumranet.com>
-