Stanislav Shwartsman
fc6712e3a3
undo part of prev paging commit
2012-01-19 20:01:32 +00:00
Stanislav Shwartsman
12afed23a1
small fix and cleanups in paging code
2012-01-19 06:38:22 +00:00
Stanislav Shwartsman
9461797886
added extra param to debugger phy access callback + cleanup in vmexit functions
2012-01-17 21:50:15 +00:00
Stanislav Shwartsman
f4b49633d4
paging code rework (cont)
2012-01-17 18:20:55 +00:00
Stanislav Shwartsman
0d64a6cb92
fixed paging bug in previous commit
2012-01-16 15:26:25 +00:00
Stanislav Shwartsman
7d641450ec
remove param from check_entry_PAE function - it is always the same for all calls
2012-01-15 20:25:39 +00:00
Stanislav Shwartsman
c7cb99787e
rework in paging code before nested paging implementation for SVM - step 2
...
optimize TLB flush code
2012-01-15 19:38:00 +00:00
Stanislav Shwartsman
4db23355cd
rework in paging code before nested paging implementation for SVM - step 1
2012-01-15 17:54:13 +00:00
Stanislav Shwartsman
edfff5bf44
fixed VMX+EPT VirtualBox failures
2012-01-06 10:30:07 +00:00
Stanislav Shwartsman
e2ff4bc6d4
clear exitinfo1/2 fields in SVM on VMENTER
2012-01-05 22:23:05 +00:00
Stanislav Shwartsman
0a14f08f16
completing SVM coding, missed - CPUID, extended APIC
2011-12-28 16:12:28 +00:00
Stanislav Shwartsman
7f5f917a34
more SVM implementation
2011-12-27 19:42:11 +00:00
Stanislav Shwartsman
75bda1d5cd
implemented SVM emulation support for Bochs (incomplete yet)
...
I am merging the code in order to start making shortcuts between VMX emulation and SVM emulation.
Of course SVM emulation is incomplete, completely untested and not expected to work.
But someone could already take a look one the code and give some suggestions.
Also looking for anybody with existing SVM kernels - as simple as possible - for testing.
Status:
- exceptions intercept is not implemented yet
- IO intercept is not implemented yet
- MSR intercept is not implemented yet
- virtual interrupts are not implemented yet
- CPUID is not implemented yet
No advanced SVM featurez planned - I am implementing the very basic 'Pacifica' document from 2005 using QEMU code as reference.
2011-12-25 19:35:29 +00:00
Stanislav Shwartsman
0547c8823e
compilation w/o x86-64
2011-09-26 19:48:58 +00:00
Stanislav Shwartsman
12ad45395b
enable Penryn VMX capabilities with VMX=1, VMX=2 is required for EPT and heavier stuff
2011-09-26 19:36:20 +00:00
Stanislav Shwartsman
fa930961c2
small optimization
2011-08-23 21:25:34 +00:00
Stanislav Shwartsman
f15bc6cf75
support for NX outside of x86-64.
...
required for Intel Yonah processor which is another interesting CPUID to be added
also found Via C7 CPUID, looking for the way to add it too
2011-08-10 22:04:33 +00:00
Stanislav Shwartsman
0171324877
small favor to VMX OFF for code that compiled with VMX ON
...
avoid function call when not in vmx guest.
2011-08-09 20:50:51 +00:00
Stanislav Shwartsman
17a94fc58e
warning fixes
2011-08-09 18:00:19 +00:00
Stanislav Shwartsman
d11114ac19
Patch for emulating target with larger memory than host has available by Gary Cameron.
...
The patch was posted in mailing list at Thu 6/16/2011.
Desription for CHANGES:
- Memory
- Added new configure option which enables RAM file backing for large guest
memory with a smaller amount host memory, without causing a panic when
host memory is exhausted (patch by Gary Cameron). To enable configure with
--enable-large-ramfile option.
2011-07-22 17:46:06 +00:00
Stanislav Shwartsman
b4118fcbfe
correct natural width VMX field read/write len
2011-07-21 20:58:54 +00:00
Stanislav Shwartsman
f81e47cca2
it is better to handle A20 in paging already
2011-07-18 20:22:59 +00:00
Stanislav Shwartsman
002c86660a
reword all the CPU code in preparation for future CPU speedup implementation.
...
Bochs emulation can be another 10-15% faster using technique described in paper
"Fast Microcode Interpretation with Transactional Commit/Abort"
http://amas-bt.cs.virginia.edu/2011proceedings/amasbt2011-p3.pdf
2011-07-06 20:01:18 +00:00
Stanislav Shwartsman
90c4a74362
typo fix
2011-06-28 16:29:11 +00:00
Stanislav Shwartsman
08ba847ce4
fix bug inserted with prev commit + cleanup
2011-06-28 16:04:40 +00:00
Stanislav Shwartsman
7e57d95364
Fix wrong address translation in debugger
2011-06-24 13:05:36 +00:00
Stanislav Shwartsman
acf2175d6d
paging small change
2011-06-03 20:50:55 +00:00
Stanislav Shwartsman
04e9254e2c
AMD released new Vol4: 128 and 256 bit vector instructions, dropped SSE4A
2011-05-30 20:15:50 +00:00
Stanislav Shwartsman
0de8b08f24
fixed too few arguments for format warning
2011-05-29 20:09:31 +00:00
Stanislav Shwartsman
ee3f9e36cb
Implemented Supervisor Mode Execution Protection (SMEP)
2011-05-29 16:28:26 +00:00
Stanislav Shwartsman
75ec0f835e
small bug fix for 32-bit linear addr wrap
2011-05-27 08:50:38 +00:00
Stanislav Shwartsman
a02d8cfe67
cleanups, simplications, copyright updates
2011-04-23 20:39:27 +00:00
Stanislav Shwartsman
6e79fdfb1e
optimize data hw breakpoint
2011-04-09 05:12:28 +00:00
Stanislav Shwartsman
7d80a6ebe0
Adding Id and Rev property to all files
2011-02-24 21:54:04 +00:00
Stanislav Shwartsman
d8a2736d72
VMX pw loads should ask for RD perm
2011-02-19 08:31:05 +00:00
Stanislav Shwartsman
b5ebe5865e
Fixes for incoming bug report, missed changes in CVS, repository fixups and etc
2011-02-11 09:56:23 +00:00
Stanislav Shwartsman
9aa503cb9d
fixed warnings for win64 compilation
2010-11-23 14:59:36 +00:00
Stanislav Shwartsman
6d089dd238
changed CPUID constants to defines
2010-10-07 16:39:31 +00:00
Stanislav Shwartsman
95df639614
compilation fix
2010-05-25 18:52:01 +00:00
Stanislav Shwartsman
05bbbb1a2c
compilation fix
2010-05-16 05:23:18 +00:00
Stanislav Shwartsman
1c47847e23
Show more fields for verbose debugger 'page'command
2010-05-05 20:10:15 +00:00
Stanislav Shwartsman
9a43a89a61
verbose page command from the debugger
2010-05-04 20:16:38 +00:00
Stanislav Shwartsman
aa76181208
Fixed debug translation
2010-05-04 19:02:51 +00:00
Stanislav Shwartsman
1c2fa8cd0c
move 1G_pages support to runtime option
2010-04-24 09:36:04 +00:00
Stanislav Shwartsman
77f8857ddb
Fixed dbg_linear2phy function for legacy PAE
2010-04-14 15:41:57 +00:00
Stanislav Shwartsman
df07dab80f
verbose phy mem access tracing
2010-04-13 17:56:50 +00:00
Stanislav Shwartsman
6e1204cb84
Merged X2APIC + X2APIC virtualization
2010-04-08 15:50:39 +00:00
Stanislav Shwartsman
df7db31fb4
EPT + VPID - VMXx2 support
2010-04-07 17:12:17 +00:00
Stanislav Shwartsman
c94e72d4d3
make lpf_mask smaller
2010-04-07 14:38:53 +00:00
Stanislav Shwartsman
10505dca81
PDPTR checks fix
2010-04-06 19:26:03 +00:00
Stanislav Shwartsman
aea9f50b4a
implemented Descriptor Table exiting control
2010-04-04 19:23:47 +00:00
Stanislav Shwartsman
eec8c8e3d2
dbg function fix
2010-04-04 09:05:21 +00:00
Stanislav Shwartsman
21de4f8b8b
remove cr3_masked
2010-04-04 09:04:12 +00:00
Stanislav Shwartsman
58bbf0d0b1
compilation fix for 386
2010-04-03 19:21:07 +00:00
Stanislav Shwartsman
eab8826173
restore back some code - optimization conflicting with EPT implementation
2010-04-03 18:00:30 +00:00
Stanislav Shwartsman
a445b5c4f3
optimization + fix
2010-04-03 16:52:33 +00:00
Stanislav Shwartsman
7c42447c77
move secondary VMEXEC controls to -enable-vmx=2 option
...
EPT coming next
2010-04-03 07:30:23 +00:00
Stanislav Shwartsman
8260358afe
removed redundant check
2010-04-02 16:56:59 +00:00
Stanislav Shwartsman
b049646621
compilation fix for x86_64 disable
2010-04-01 20:53:55 +00:00
Stanislav Shwartsman
a625abaaf0
small fixes
2010-04-01 20:08:57 +00:00
Stanislav Shwartsman
585cc3492b
paging similication
2010-04-01 20:06:09 +00:00
Stanislav Shwartsman
9224bf60aa
paging phase 3
2010-04-01 12:23:52 +00:00
Stanislav Shwartsman
6f7b68e1ca
paging redo - step2
2010-04-01 11:53:22 +00:00
Stanislav Shwartsman
1b24ebe9bb
paging anti-code-duplication, phase1
2010-04-01 05:26:20 +00:00
Stanislav Shwartsman
24bd0399d2
fixed dbg paging lookup
2010-03-31 14:17:51 +00:00
Stanislav Shwartsman
2614b3ca2f
continue NX fix
2010-03-30 16:56:41 +00:00
Stanislav Shwartsman
64e9ff6aff
add PDPTRS into param tree
2010-03-25 22:04:31 +00:00
Stanislav Shwartsman
f5ce2a7639
split crreg access functions to separate file
2010-03-25 21:33:07 +00:00
Stanislav Shwartsman
4400edc746
fix for 2795115 NX fault could be missed
2010-03-23 19:58:20 +00:00
Stanislav Shwartsman
da656bf93d
optimization for paging disable mode + preparing for future
2010-03-19 17:00:05 +00:00
Stanislav Shwartsman
79466dffe2
apic virtualization + vmx fixes
2010-03-16 14:51:20 +00:00
Stanislav Shwartsman
cffe32dd2c
remove unused param from exception() call
2010-03-14 15:51:27 +00:00
Stanislav Shwartsman
927c3594d6
enable compilation with CPU_LEVEL <= 6
...
converted SEP to runtime option as well
2010-02-26 11:44:50 +00:00
Stanislav Shwartsman
bd60e0264c
change Copyright to Bochs Project
2009-12-04 16:53:12 +00:00
Stanislav Shwartsman
3e3cfc610f
cleanup
2009-10-31 19:16:09 +00:00
Stanislav Shwartsman
54cdee30c1
fix dbg method as well
2009-10-26 22:05:00 +00:00
Stanislav Shwartsman
220c893c6d
remove dbg print
2009-10-26 21:19:23 +00:00
Stanislav Shwartsman
40352dc310
fix 4M paging
2009-10-26 21:16:04 +00:00
Stanislav Shwartsman
e9967c6b83
fixed 4M paging
2009-10-24 21:00:43 +00:00
Stanislav Shwartsman
b6155ef5ca
compilation fix
2009-10-03 11:39:29 +00:00
Stanislav Shwartsman
a7f3038cc4
cleanups + fix
2009-09-26 13:50:09 +00:00
Stanislav Shwartsman
e05040e891
rework in paging.cc - phase1
2009-09-26 06:05:23 +00:00
Stanislav Shwartsman
e5daa4abee
bugfiX
2009-09-25 14:25:24 +00:00
Stanislav Shwartsman
c940141323
bugfix
2009-09-17 05:28:51 +00:00
Stanislav Shwartsman
7a473a14f3
Revert incorrect changE
2009-06-15 19:05:29 +00:00
Stanislav Shwartsman
26a1cef63b
removed redundant (now) compilation directives
2009-06-15 09:34:49 +00:00
Stanislav Shwartsman
cd445195dd
cleanup configure options. All paging related stuff is now automatically set/unset according to cpu-level option.
...
Related configure options (--enable-pae, --enable-mtrr, --enable-global-pages, --enable-large-pages) are deprecated.
Less configure options - less configure problems :)
2009-06-15 09:30:56 +00:00
Stanislav Shwartsman
03ba2ec988
implement pdptr checks in legacy PAE mode
2009-05-31 07:49:04 +00:00
Stanislav Shwartsman
222129db4b
Rewritten long mode page walk - large code cleanup and few bugfixes
2009-05-30 15:09:38 +00:00
Stanislav Shwartsman
4fc66aab31
Fixes for compilation by Visual Studio 2008
2009-04-07 16:12:19 +00:00
Stanislav Shwartsman
a0b1fda178
bugfixes
2009-03-27 16:42:21 +00:00
Stanislav Shwartsman
6fe0b40b44
move a20 handling into getHostAddr method of BX_MEM
2009-03-08 21:23:40 +00:00
Stanislav Shwartsman
e6685b3557
Fixed comp err with APIC disabled
2009-02-23 17:09:39 +00:00
Stanislav Shwartsman
1b72e66bb3
support for apic global disable
...
separate between I/O apic and local apic
2009-02-18 22:25:04 +00:00
Stanislav Shwartsman
3a1852ea23
take local APIC read/write access into CPU class from BX_MEM (needed for APIC virtualization later)
2009-02-17 19:20:47 +00:00
Stanislav Shwartsman
7c0582e4ea
Some fixes for X86-64 OFF mode
2009-02-04 16:05:47 +00:00
Stanislav Shwartsman
f8185a6bc6
Added Intel VMX emulation to Bochs CPU
2009-01-31 10:43:24 +00:00
Stanislav Shwartsman
9929e6ed78
- updated FSF address
2009-01-16 18:18:59 +00:00
Stanislav Shwartsman
a794bef607
optimize invlpg for split large pages
2008-12-19 16:03:25 +00:00
Stanislav Shwartsman
2682738968
added ifdefs around 1G paging implementation
2008-12-11 21:30:37 +00:00
Stanislav Shwartsman
a2e07ff971
- Removed --enable-guest2hos-tlb configure option. The option will be
...
always enabled for any Bochs configuration.
2008-12-11 21:19:38 +00:00
Stanislav Shwartsman
69bd21bf1d
1G pages support for CPU
2008-12-11 21:00:01 +00:00
Stanislav Shwartsman
5174f9fe82
Fixed debian i386 image freeze
2008-12-08 20:01:26 +00:00
Stanislav Shwartsman
d7fa44d270
optimize code access detection
2008-12-05 22:34:42 +00:00
Stanislav Shwartsman
ef36cec716
moving definition to config.h
2008-12-01 19:35:25 +00:00
Stanislav Shwartsman
e402062499
-Fixes for INVLPG
2008-11-29 19:28:10 +00:00
Stanislav Shwartsman
3d97374ce8
Some fixes for functionality
2008-09-24 10:39:35 +00:00
Stanislav Shwartsman
991ae348cb
Clean invalidate_prefetch_q when not needed
2008-08-23 13:55:37 +00:00
Stanislav Shwartsman
5e92a1642d
Fixed compilation errors, added BX_ASSERT in paging.cc
2008-08-18 05:20:23 +00:00
Stanislav Shwartsman
e2fa98b629
- Fixed TLB flush on CR3 change - flush all pages is CR4.PGE is OFF
2008-08-16 15:35:35 +00:00
Stanislav Shwartsman
5eb845763e
Fixed corner case problem cause by my prev optimization
2008-08-15 14:30:50 +00:00
Stanislav Shwartsman
aea946b4a3
One more change to speedup memory access through HostPtr check
2008-08-14 22:26:15 +00:00
Stanislav Shwartsman
dcb82ec4bf
Optimize TLB flush methods
2008-08-13 21:51:54 +00:00
Stanislav Shwartsman
cddcdccd99
Fixed paging bug
2008-08-10 20:32:00 +00:00
Stanislav Shwartsman
5dd02b26e3
Make even more efficient RmAddr calculation - good optimizing compiler could make more efficient code than it was before
2008-08-08 09:22:49 +00:00
Stanislav Shwartsman
bbf02a8bc5
More clean rewrite of the TLB access bits
2008-08-07 22:14:38 +00:00
Stanislav Shwartsman
67eb13bf24
Fixed bug in PDPE cache implementation
2008-08-04 14:46:28 +00:00
Stanislav Shwartsman
4808a0d581
Fixed accessBits algebra
2008-08-04 05:30:37 +00:00
Stanislav Shwartsman
6398ebb1d4
First step of access bits cleanup and optimization - no perf gain yet
2008-08-03 19:53:09 +00:00
Stanislav Shwartsman
67f302352c
Implement PDPE cache to support faster PAE paging tranlsation
2008-08-01 13:28:44 +00:00
Stanislav Shwartsman
709d74728d
Call #UD exception directly instead of UndefinedOpcode function - for future use
2008-07-13 15:35:10 +00:00
Stanislav Shwartsman
c1f308d80d
Push error code if segment violation occurs when pushing arguments into a new stack
2008-06-25 02:28:31 +00:00
Stanislav Shwartsman
a0e66d0e4c
fixed variable name
2008-06-14 16:55:45 +00:00
Stanislav Shwartsman
b7480b3e6f
- Fixed x86 data breakpoint match when breakpoint length is 8 bytes
...
- FIxed x86 data breakpoint in paging disabled mode
2008-06-02 18:41:08 +00:00
Stanislav Shwartsman
5c75e54d45
cleanup and small optimization for non-paging mode
2008-05-30 16:58:47 +00:00
Stanislav Shwartsman
6c5f82c4c8
- Fixed bug in global pages TLB invalidation
2008-05-30 12:14:00 +00:00
Stanislav Shwartsman
d76297d01e
Fixed compilation err
2008-05-23 17:58:42 +00:00
Stanislav Shwartsman
3619c0f6b4
Some changes to make x86-debugger feature working back
2008-05-23 17:49:46 +00:00
Stanislav Shwartsman
3f1e436926
Removed unused variables in bx_dbg struct
2008-05-23 14:04:45 +00:00
Stanislav Shwartsman
4e091f2a3a
Improved debug prints
2008-05-21 21:38:59 +00:00
Stanislav Shwartsman
82d8e9a3b0
Fixed compilation warning
2008-05-19 20:05:03 +00:00
Stanislav Shwartsman
4e5d10d02e
Code reorganization + small bug fixes in translate linear code
2008-05-19 18:10:32 +00:00
Stanislav Shwartsman
c3f96973ba
Added debug prints
2008-05-12 19:19:03 +00:00
Stanislav Shwartsman
d934190370
Fixed data type for cr3_masked
2008-05-11 19:58:41 +00:00
Stanislav Shwartsman
4a76bd2169
Fixed setting of reserved bits in CR3 register
2008-05-11 19:36:06 +00:00
Stanislav Shwartsman
56a44d675b
Fixed potential memory overflow in dbg paging function
2008-05-10 22:11:48 +00:00
Stanislav Shwartsman
6ebae41ad7
print physcial address with special format - preparations for 64-bit physical address emu
2008-05-09 22:33:37 +00:00
Stanislav Shwartsman
ed4be45a8b
Split shift/rotate opcodes in 32-bit mode and 64-bit mode
2008-05-02 22:47:07 +00:00
Stanislav Shwartsman
67e534832b
Remove from CPU reference to MEM object - it is only one and could be static
2008-04-27 19:49:02 +00:00
Stanislav Shwartsman
9047c9be96
Support for reserved bits checking in paging
...
Check for page is in DTLB before invalidating by INVLPG
2008-04-25 20:08:23 +00:00
Stanislav Shwartsman
3c7949948b
- Added >32bit physical address PANIC in PSE mode with 4M paging
...
- Fixed LAR/LSL instructions in 64-bit mode
2008-04-22 22:05:38 +00:00
Stanislav Shwartsman
c09934f90a
some small cleanup in paging code
2008-04-21 20:17:45 +00:00
Stanislav Shwartsman
359eb92c73
More fixes for CPU emulation
2008-04-19 20:00:28 +00:00
Stanislav Shwartsman
e10bd0b7a5
tasking - read state first and only when store state in new TSS
...
paging - fixed data for trace-mem callbacks
2008-04-19 14:13:43 +00:00
Stanislav Shwartsman
bdaef81603
Added debugger memory trace functionality. Enable by 'trace-mem on' command
2008-04-19 13:21:23 +00:00
Stanislav Shwartsman
20a8bf03ad
Added comments for >32 bit physical address error message
2008-04-11 14:30:15 +00:00
Stanislav Shwartsman
fea49bb270
Fixed linear address wrap in legacy (not long64) mode
2008-04-07 18:39:17 +00:00
Stanislav Shwartsman
90f1973bef
Removed BX_USE_TLB - TLB is always used, only Guest2HostTLB is optional feature
...
Use Guest2HostTLB in prefetch code for IFETCHES - speedup above 3%
2008-04-05 20:41:00 +00:00
Stanislav Shwartsman
e91409704f
Convert EFER to val32 register, similar to other control registers
2008-03-31 20:56:27 +00:00
Stanislav Shwartsman
3f2487a0af
Enabled tracing cross repeated instructions
2008-03-31 18:53:08 +00:00