Commit Graph

2629 Commits

Author SHA1 Message Date
Stanislav Shwartsman
08d4655886 X2APIC: incorrect write to self IPI X2APIC register (with reserved bits set) should not trigger the self IPI 2012-05-12 12:49:05 +00:00
Stanislav Shwartsman
03162d86f5 LAPIC: fixed timer interrupts after reloading of LAPIC Timer Divide Configuration register 2012-05-12 11:52:29 +00:00
Stanislav Shwartsman
9ea0987396 fixed send_ipi case in x2apic 2012-05-12 08:07:30 +00:00
Stanislav Shwartsman
6180a0a733 remove unused leafs from generic_cpuid 2012-05-11 06:51:04 +00:00
Stanislav Shwartsman
b5c5082ff2 Completely remove b1() field from bxInstruction structure and resuse it for AVX instructions flags.
the iaOpcode field has no masking anymore.

fixed bug during the code reorganization:
                        
+ XOP: Fixed instructions with operands order depending on VEX.W (fixed VEX.W read from instruction object)
2012-05-11 06:35:16 +00:00
Volker Ruppert
53e1a5d204 - fixed typo (file names are case sensitive on Linux and others) 2012-05-08 18:33:26 +00:00
Stanislav Shwartsman
f01e5f3e11 removed b1() from shift methods in CPU - lead to removal of b1() field from bxInstruction_c 2012-05-08 16:42:15 +00:00
Stanislav Shwartsman
708fc666c8 Added Corei7 ivyBridge configuration to CPUDB 2012-05-07 12:31:22 +00:00
Stanislav Shwartsman
9d802e2762 very small cleanup 2012-05-05 18:40:37 +00:00
Stanislav Shwartsman
2188322ab3 fixed CR8 SVM intercepts 2012-05-03 16:12:58 +00:00
Stanislav Shwartsman
39c14ef0d1 Implemented EPT A/D extensions support.
Bochs is fully aligned with the latest published revision of
Intel Architecture Manual (revision 043) now.
2012-05-02 18:11:39 +00:00
Stanislav Shwartsman
e12494bf7b fixed segfault when setting ESP/EIP in GUI debugger 2012-04-16 19:18:23 +00:00
Stanislav Shwartsman
c7c431f88e bx_instr_mem_data_access became completely obsolete with new stack optimization merged into SVN.
It already had limited usability before. With stack direct access optimization the callback won't be called for stack accesses as well.
See note by Brian Slechta:

=== Cut Hete ===
While using Bochs as a reference model for simulations, the simulator needs
information about what loads/stores are taking place with each instruction.
Presumably,  that  is  what  the BX_INSTR_MEM_DATA() instrumentation macros
cover (which is the place where our simulator hooks up).

The RETnear_xxx() functions call access_linear() directly, rather than call
read_virtual_xxx()  functions. This is a problem for code making use of the
BX_INSTR_MEM_DATA()   hook  because  it  does  not  get  called  for  these
instructions.  Should  this  be  changed along with some other instructions
that exhibit this?
=== Cut Hete ===

For Bryan's usage bx_instr_lin_access and bx_instr_phy_read/bx_instr_phy_write callbacks should be used.
2012-04-11 19:01:25 +00:00
Stanislav Shwartsman
59e13d5299 fixed compilation error with 386/486 and internal dbger enabled 2012-04-11 18:11:14 +00:00
Stanislav Shwartsman
a68ad9a7f6 small code optimization 2012-04-06 09:41:58 +00:00
Stanislav Shwartsman
a6f0ca70ff more robust SVM fix 2012-04-04 19:55:36 +00:00
Stanislav Shwartsman
72a00ce9dd improved debug prints in MOV to/from CR
SVM bugfix
remove redundant TLB flush call from SVM and VMX code
2012-04-04 19:31:02 +00:00
Stanislav Shwartsman
279c61dc67 updated + fixed instrumentation example for instr histogram, code cleanup in the cpu 2012-03-28 21:11:19 +00:00
Stanislav Shwartsman
90fc12d9e4 switching between compatibility and long64 mode also affect SS.BASE which is always zero in long64 mode 2012-03-27 15:21:40 +00:00
Stanislav Shwartsman
e7a4a1bec8 surprisingly, opensuse 12.1 requre alignment check support in hardware so I can't disable it by default for all configurations.
but in case you want a few %% of extra emulation performance - it is still possible to disable it with configure option.
most guests I saw do not use it !
2012-03-26 19:33:38 +00:00
Stanislav Shwartsman
8b78f6ca2c fixed prev commit 2012-03-26 19:24:20 +00:00
Stanislav Shwartsman
97a6d0ad46 missed ; 2012-03-26 19:08:28 +00:00
Stanislav Shwartsman
547678e8bd fixed compilation error in 386 config. also fixed bugs in tasking code found by new assertion added in stack.cc new code 2012-03-26 19:05:58 +00:00
Stanislav Shwartsman
bfca96f8ce added TLB contents to param tree for debugger purposes. Nopw the TLB could be browsed through param-tree in debugger and GUI debugger as well 2012-03-25 20:56:18 +00:00
Stanislav Shwartsman
d4688e8b95 - Do not compile support for alignment check (#AC exception) by default
for CPU emulation performance reasons, the alignment check compilation
    still can be enabled using configure option --enable-alignment-check.

There is no software in the world which enable #AC exception checking, this
x86 feature is completely legacy but its emulation support costs up to 3-5%
emulation speed.

The checking for #AC exception enable still will be done, if

 CPL == 3, EFLAGS.AC = 1 and CR0.AM = 1

but the alignment check is not compiled in, the Bochs will PANIC with corresponding message.
You can press 'always continue' and ignore the PANIC, the simulation will continue as if alignment checking is not enabled.
2012-03-25 19:07:17 +00:00
Stanislav Shwartsman
3ca29cbdf3 stack direct access optimization - 5% emu speedup to all 32-bit guests, for 64-bit guests speedup is less because they have less stack accesses 2012-03-25 11:54:32 +00:00
Stanislav Shwartsman
b5a33e82ac fixed a lot of code duplication in debugging/instrumentation of mem access 2012-03-20 18:26:04 +00:00
Stanislav Shwartsman
e1506e3e29 some cleanup in CPU code + patch SVM SS.DPL instead of failing VMRUN 2012-03-19 19:24:15 +00:00
Stanislav Shwartsman
a8565cdfc3 added missed line in MSR fix 2012-03-17 12:07:27 +00:00
Stanislav Shwartsman
bd4aa017fe Lazy flags improvement patch by Darek Mihocka - measured 5% speedup everywhere accross the board
The problem with Parity is it is generally referenced very rarely so the current lazy flags code is not efficient to updated Parify flag only (because it updates low 8 bits of .result value the existing Zero Flag has to be shadowed in .auxbits.
So I flipped it around, to make Parity be shadowed in auxbits.  .result now is only needed to derive Zero Flag, and both Sign and Parify are derived from .result + .auxbits (as Zero Flag is now).  For the 90% of the conditional jumps that are JZ or JNZ, this is a speedup.
Parity is now derived from 8 bits in .result and 8 bits in .auxbits, and Sign is derived from one flag in .result and 1 bit in .auxbits by XOR-ing them all together.  It makes the code sequences for SAHF and POPF simpler too.
2012-03-17 08:51:52 +00:00
Stanislav Shwartsman
5a33b1be84 mvoed MWAIT_IS_NOP option from CPUID to CPU - it has meaning even if CPUID tree is not used because CPU is configured with CPUDB pre-defined configuration 2012-03-15 19:46:57 +00:00
Stanislav Shwartsman
9d5d33632c VMX: Fixed reading of VMX MSR-HI (0xC0000000 <= index <= 0xC0001FFF) bitmaps / Fixed memory overflow 2012-03-14 19:42:06 +00:00
Stanislav Shwartsman
a9d03340d6 correctly handle EFER.LMA and EFER.LME with unrestricted guests 2012-03-14 19:17:27 +00:00
Stanislav Shwartsman
a668ff9908 small code optimization 2012-03-13 19:41:10 +00:00
Stanislav Shwartsman
25ffaeeea8 fixed VMX issue + small code reorg 2012-03-13 15:18:21 +00:00
Stanislav Shwartsman
9c27d279b9 removed incorrect BX_INFO msg 2012-03-07 20:07:57 +00:00
Stanislav Shwartsman
562c8c91d1 fixed FMA4 instructions sources 2012-03-06 15:18:35 +00:00
Stanislav Shwartsman
bde2f4d829 correctly handle #UD because of XOP.VVV 2012-03-05 19:48:55 +00:00
Stanislav Shwartsman
95e4191cd1 any vex instruction must use VEX.VVV or #UD 2012-03-04 17:56:22 +00:00
Stanislav Shwartsman
c52d97cb7f fixed comments in paging.cc 2012-02-28 22:39:33 +00:00
Stanislav Shwartsman
1f14c171ed rename some SSE handlers 2012-02-28 18:53:58 +00:00
Stanislav Shwartsman
d4541f1a88 removed dedicated handler for MOVNTI - can be replaced with existing handlers 2012-02-27 15:50:43 +00:00
Stanislav Shwartsman
959ab435cf fixed compilation err with SVM 2012-02-24 21:31:31 +00:00
Stanislav Shwartsman
86c7033a63 name cpu log functions in lower case 2012-02-23 19:31:02 +00:00
Stanislav Shwartsman
1599031869 changed BX_INFO back to BX_DEBUG 2012-02-19 20:16:10 +00:00
Stanislav Shwartsman
f48317affc SVM: Added EXITINFO2 write on VMEXIT (missed in prev commit)
Added phenom_8650_toliman <AMD Phenom X3 8650 (Toliman)> comment into .bochsrc example with all other supported CPU configs.
Added missed SVM definitions into Toliman CPUDB module
2012-02-19 20:15:23 +00:00
Stanislav Shwartsman
92376fb693 svm updates 2012-02-19 12:16:58 +00:00
Stanislav Shwartsman
c70a42c5d7 merged patch ftom SF bug 3459998 Bochs cannot be compiled outside the source tree 2012-02-19 12:16:14 +00:00
Stanislav Shwartsman
c2670b40d5 small cleanup in paging code 2012-02-15 19:49:35 +00:00
Stanislav Shwartsman
2f7e5ab3a3 fixed bugs in toliman configuration 2012-02-14 22:01:50 +00:00