Stanislav Shwartsman
13a6524acb
hw task switch tempdr6 hanlding fix
2013-03-15 08:26:22 +00:00
Stanislav Shwartsman
913e3defd1
fixed SIPI delivery bug from one the latest checkins
2013-03-13 19:06:55 +00:00
Stanislav Shwartsman
53d14c01b5
correctly signal bit 12 (nmi unblocking by iret) in vmx interruption info. todo: find how to implement it clean way
2013-03-06 21:11:23 +00:00
Stanislav Shwartsman
1a770dd260
implementation of virtual NMI
2013-03-05 21:12:43 +00:00
Stanislav Shwartsman
39ae66b5a3
Suppress 'entering paged real mode' CR0 check for SVM guest
...
After a lot of thinking and browsing in the SVM arch forums I assume now that it shold be fine to enter to paged real mode under SVM guest.
The test case to consider:
(paged) real mode guest -> entering Pmode (not paged) -> disabling the Pmode back
Ths assumption still should be validated with real AMD hardware
Context: AMD's manual about CR0 intercept priority :
"Checks non-memory exceptions (CPL, illegal bit combinations, etc.) before the intercept"
The check for 'paged real mode' suposed to be illegal bit combination ...
2013-02-27 19:11:28 +00:00
Stanislav Shwartsman
ab63b22a68
SVM: implemented missed RSM, LDTR READ/WRITE, TR READ/WRITE and IRET intercepts
2013-02-25 19:36:41 +00:00
Stanislav Shwartsman
8708d05bea
rename some VMX controls to match intel docs. added missed VMX consistency check
2013-02-24 20:22:22 +00:00
Volker Ruppert
058c0e05fb
- removed wx debugger dialogs (enhanced gui debugger now almost stable with wx)
2013-02-16 12:22:13 +00:00
Stanislav Shwartsman
e43ac349a6
fixed injected exception err code check for unrestricted guests
2013-02-14 19:31:42 +00:00
Stanislav Shwartsman
40669115e1
use different formatter for printing phy address in paging dbg messages
2013-02-14 19:30:59 +00:00
Volker Ruppert
97de484efb
use enhanced gui debugger instead of classic wx debugger if BX_DEBUGGER_GUI == 1
...
The Windows version looks almost stable, but the GTK version fails in some cases.
That's why the classic wx debugger is still available if BX_DEBUGGER_GUI is set to 0.
- added function close_debug_dialog() to handle the simulation stop case in wx
- disable all the wx debugger related code if BX_DEBUGGER_GUI is set to 1
- added enhanced debugger specific init code similar to the code in sdl.cc
- include debugger related resources on Windows
- TODO: make the GTK / wxGTK case stable and remove the wx debugger
2013-02-12 21:08:35 +00:00
Stanislav Shwartsman
ec971d0ce8
add #VE exception specific VMCS fields into VMCS bitmap
2013-01-28 20:20:54 +00:00
Stanislav Shwartsman
863e1a0f8a
fixed compilation with debugger enabled
2013-01-28 18:26:56 +00:00
Stanislav Shwartsman
64df073617
implemented virtualization exception feature
2013-01-28 16:30:25 +00:00
Stanislav Shwartsman
d38fce8218
preparation for future extension in translate_linear - I would like to return data to caller through tlbEntry
2013-01-27 19:27:30 +00:00
Stanislav Shwartsman
016e112ac2
fixed compilation err with vmx=1
2013-01-23 19:04:53 +00:00
Stanislav Shwartsman
a0c9522fef
fix compilation with no vmx enabled
2013-01-22 19:06:20 +00:00
Stanislav Shwartsman
8865df606a
fixed typo bug in VMX code
2013-01-22 08:39:41 +00:00
Stanislav Shwartsman
608775cd5a
vmread/vmwrite should always check for CPL, also when in vmx guest
2013-01-21 20:20:14 +00:00
Stanislav Shwartsman
3ab0331307
implemented VMCS shadowing (Intel SDM rev045)
2013-01-21 19:55:00 +00:00
Stanislav Shwartsman
9e896ce0bf
SFENCE instruction doesn't require SSE2
2013-01-20 17:56:08 +00:00
Stanislav Shwartsman
4bed791ccb
Added year 2013 to Copyright in all files already modified in new year
2013-01-19 20:45:03 +00:00
Stanislav Shwartsman
05d36f0acc
fixed performance bug in smap/smep fix - tlb never had user executable page permission
2013-01-19 20:14:44 +00:00
Stanislav Shwartsman
eda28b95f4
unfortunately this change is rquired to make SMAP and SMEP features to work.
...
I observed ~5% emulation slowdown ... thinking about possible mitigations
this fixes TLB issue with SMAP and SMEP features.
these features introduce a new behavior when page can be inaccessible by System (CPL=0).
Current behavior is accessBits was not supporting it but legacy (from Bochs 2.3.6) was.
The wrong behavior can be observed if user access a user page and system access the same page later.
user access is fine and pass SMEP/SMA checks and stores the translation in TLB.
the system access will hit the TLB and nobody could detect that system cannot access that page.
2013-01-16 17:28:20 +00:00
Stanislav Shwartsman
c337b7babb
Intel Software Developers Manual rev45 was released
...
Added CPUID bits and preparations for newly documented VMX features
2013-01-16 16:57:48 +00:00
Stanislav Shwartsman
c96f5e27a9
flush tlb also when cr4.smap changes
2013-01-14 17:02:51 +00:00
Stanislav Shwartsman
d93607cfe6
implemented pause threshold count in SVN + bugfix in SMAP
2013-01-08 21:03:22 +00:00
Stanislav Shwartsman
93d6c2e1fc
added AMD Bulldozer architecture CPU (Zambezi) to CPUDB
2013-01-07 19:33:04 +00:00
Stanislav Shwartsman
c6b1f6c22b
fixed IsValidPageAlignedPhyAddr check for VMX/SVM
2012-12-30 19:49:20 +00:00
Stanislav Shwartsman
685e0091b4
fixed decoding of RDRAND/RDSEED with 0x66 prefix
2012-12-27 19:31:21 +00:00
Stanislav Shwartsman
48d7fa3786
fixed code duplication, mainly in vmx/svm code
2012-12-26 21:59:16 +00:00
Stanislav Shwartsman
6e5a934eea
XSAVE: Fixed XCR0 reserved combination checking in XSETBV instruction
2012-12-23 16:54:18 +00:00
Stanislav Shwartsman
ce2751a13c
move misaligned_sse from compile time to .bochsrc option
2012-12-20 19:43:11 +00:00
Stanislav Shwartsman
db4d75317a
fixed small avx issues
2012-12-11 21:01:05 +00:00
Stanislav Shwartsman
318ad5e26d
optimize avx stores
2012-12-10 14:43:21 +00:00
Stanislav Shwartsman
182ad65ea3
changes in avx emulation code
2012-12-09 16:42:48 +00:00
Stanislav Shwartsman
574b69c81e
fixed MSDEV warnings
2012-11-27 15:40:45 +00:00
Stanislav Shwartsman
64f9c12bbc
name new CPUID bits from AMD
2012-11-10 11:00:09 +00:00
Stanislav Shwartsman
edf4ea4c74
fixed SF bug #1318 dbg: several issues with 'set' command
2012-11-06 20:01:02 +00:00
Stanislav Shwartsman
7bace61c12
fixed compilation issue
2012-11-05 06:41:10 +00:00
Stanislav Shwartsman
8a01ee1661
implemented SVM decode assists. some is still missing - coming soon
2012-11-02 07:46:50 +00:00
Stanislav Shwartsman
8d32f2e305
fixed another compilaton err in vapic
2012-10-28 18:32:58 +00:00
Stanislav Shwartsman
7e663e785e
fix compilation err
2012-10-28 16:34:25 +00:00
Stanislav Shwartsman
744001e35e
Implemented VMX APIC Registers Virtualization and VMX Virtual Interrupt Delivery emulation
...
Bugfix: VMX: VmEntry should do TPR Virtualization (TPR Shadow + APIC Access Virtualization case is affected) and even could possibly cause TPR Threshold VMEXIT
2012-10-26 18:43:53 +00:00
Stanislav Shwartsman
9b65cae026
make WRMSR end-of-trace instruction
2012-10-25 16:49:22 +00:00
Stanislav Shwartsman
4273b41d00
fixed write to apicbase when in x2apic mode
2012-10-25 16:09:34 +00:00
Stanislav Shwartsman
7e1b67f91e
fixed bugs in vmx code
2012-10-25 16:08:28 +00:00
Stanislav Shwartsman
e4d659c54d
fix compilation err
2012-10-25 16:07:11 +00:00
Stanislav Shwartsman
45d5d690d7
initialize random generator for RDRAND/RDSEED
2012-10-09 20:53:50 +00:00
Stanislav Shwartsman
2638c1136a
Add RDRAND/RDSEED instructions support (+ disasm)
...
Of course no true random numbers will be generated - use standard "C" rand() function as stub.
In future it will be possible to improve (using another random generator) or even use real rdrand/rdseed intrinsics
2012-10-09 15:16:48 +00:00
Stanislav Shwartsman
e7a2c9892c
re-implement VTPF write using event handling interface as trap event (in preparation to more apic virtualization features)
2012-10-07 09:16:13 +00:00
Stanislav Shwartsman
b0edc32f4c
fixed compilation with VMX
2012-10-06 09:13:41 +00:00
Stanislav Shwartsman
c48e516386
implemented injection of MTF event. The MTF VMexec control is still not implemented yet
2012-10-05 20:48:22 +00:00
Stanislav Shwartsman
3cd11b02ee
optimization and bugfix for prev commit
2012-10-04 21:30:50 +00:00
Stanislav Shwartsman
1b228aec32
Fixed double and triple fault detection in exception.cc. Remove errorno variable from CPU (redundant now)
2012-10-04 20:52:27 +00:00
Stanislav Shwartsman
f69bc016d2
vmx: nmi blocking after NMI event injection. better dbg print for VMEXIT
2012-10-04 16:15:58 +00:00
Stanislav Shwartsman
be1642e02e
fixed compile with debugger enabled
2012-10-03 20:32:02 +00:00
Stanislav Shwartsman
2ca0c6c677
Move INTR, Local APIC INTR and SVN VINTR into new event interface (hardest part)
...
Minor speedup (of 1-2%) was observed due to new implementation
Remove obsolete dbg_take_irq function and dbg_force_interrupt function from CPU code, the functions were not working properly anyway
2012-10-03 20:24:29 +00:00
Stanislav Shwartsman
49bb3ba8f5
some cleanups and optimizations with new event interface
2012-10-03 15:49:45 +00:00
Stanislav Shwartsman
ae06a0825b
svm virq - move to new event interface
2012-10-02 20:49:16 +00:00
Stanislav Shwartsman
9132c29280
optimization and code duplication cleanup in event handling code
2012-10-02 20:07:26 +00:00
Stanislav Shwartsman
dbb23aed43
close another SMC hole
2012-10-01 18:19:09 +00:00
Stanislav Shwartsman
3a6f649b18
fixed comment
2012-10-01 12:08:23 +00:00
Stanislav Shwartsman
e397a86ce0
fixed code duplication related to EXT field
2012-09-29 09:31:34 +00:00
Stanislav Shwartsman
dc369d831f
small cleanup
2012-09-27 07:03:25 +00:00
Stanislav Shwartsman
8189a5ed20
fixed compilation with SMP
2012-09-26 16:00:49 +00:00
Stanislav Shwartsman
b2afa834c5
fixed compilation with intrumentation w/o x86-64
2012-09-25 20:48:46 +00:00
Stanislav Shwartsman
66a9a769fc
fixed nmi window exiting
2012-09-25 20:00:33 +00:00
Stanislav Shwartsman
08d0ef6dbf
fixes for new event handling code
2012-09-25 13:53:26 +00:00
Stanislav Shwartsman
d5f858d100
transfer VMX NMI window exiting into event vector infrastructure
2012-09-25 10:21:29 +00:00
Stanislav Shwartsman
40ba9c8d7b
introducing new interface for handling CPU events based on vector of events and not on many not related variables. this is very initial implementation which takes into new interface only few events, more will code soon
2012-09-25 09:35:38 +00:00
Stanislav Shwartsman
f0c153e550
fixed warning
2012-09-24 19:53:49 +00:00
Stanislav Shwartsman
da150bc163
small optimization in icache
2012-09-23 19:35:46 +00:00
Stanislav Shwartsman
eb348992c2
optimize POPCNT implementation
2012-09-21 14:56:56 +00:00
Stanislav Shwartsman
74f5bb1934
WBINVD not necessary havw to flush ICACHE
2012-09-21 08:55:10 +00:00
Stanislav Shwartsman
f419798ca5
fixed reset value for mtrr
2012-09-15 19:52:11 +00:00
Stanislav Shwartsman
4f6557697b
small comments updates in vmx code
2012-09-13 05:33:05 +00:00
Volker Ruppert
c2560a8d44
- fpu directory is now a subdirectory in 'cpu'
2012-09-12 21:08:40 +00:00
Stanislav Shwartsman
2c5165bc06
fix check of error_code feild on event injection
2012-09-12 04:12:58 +00:00
Stanislav Shwartsman
2f3c7ff8e4
implemented SMAP (Supervisor Mode Access Protection) from [Intel Architecture Instruction Set Extensions Programming Reference] rev14
...
fixed enabling of ADX extensions in generic CPUID when enabled through .bochsrc
Small code cleanups on the way to implementation of APIC Registers Virtualization features disclosed in recent Intel SDM rev043
2012-09-10 15:22:26 +00:00
Stanislav Shwartsman
0386f49e03
fixed comments for SHLD/SHRD instructrions and make code a little more clear
2012-09-09 17:44:42 +00:00
Stanislav Shwartsman
7e48b30b5d
fixed random freeze issues caused by commit rev11402
2012-09-06 19:51:33 +00:00
Stanislav Shwartsman
bff3ba1535
small optimization in lazy flags code
2012-09-06 19:49:14 +00:00
Stanislav Shwartsman
f1fd44b2cf
preparations for apic regs virtualization feature described in SDM rev044
2012-09-06 15:21:08 +00:00
Stanislav Shwartsman
8044a2bda6
rename i->execute field in the instruction
...
move victim cache lookup into cache lookup so traces could be linked with victim cache hits directly
2012-09-04 15:45:05 +00:00
Stanislav Shwartsman
295e3ab8db
fixed compilation warning
2012-09-02 18:38:04 +00:00
Stanislav Shwartsman
d1879b839e
increase icache size
2012-09-01 19:13:01 +00:00
Stanislav Shwartsman
86a06ff9f6
more new vmx defines
2012-08-31 15:38:28 +00:00
Stanislav Shwartsman
2a459fb9be
add more disclosed VMCS fields and vmexit codes to enums (from rev44 published today)
2012-08-31 09:25:13 +00:00
Stanislav Shwartsman
40a9992aa6
small cleanups
2012-08-28 16:05:39 +00:00
Stanislav Shwartsman
e17cffab57
simplify generated code
2012-08-26 15:49:30 +00:00
Stanislav Shwartsman
c41cbe6d56
Link traces over taken branch optimization which makes handlers chaining even more efficient.
...
I observed 5% speedup in all disk images over 2.6pre1.
The change is safe (passed all regressions) and I will be glad to make it into Bochs 2.6!
2012-08-21 19:58:41 +00:00
Stanislav Shwartsman
399168e37d
small cleanup
2012-08-19 18:44:08 +00:00
Stanislav Shwartsman
dd7b968404
SSE cvt instructions: transition from FPU to MMX state has higher priority than SSE exception (#XF/#UD)
2012-08-11 07:41:13 +00:00
Stanislav Shwartsman
df90b80352
set of small cpu fixes
2012-08-09 13:11:25 +00:00
Stanislav Shwartsman
0c11901d6b
fixed segment limit check for AVX mem access - same fix for stores
2012-08-08 20:43:07 +00:00
Stanislav Shwartsman
af9e072ad6
fixed segment limit check for AVX mem access
2012-08-08 20:39:36 +00:00
Stanislav Shwartsman
be76f38b46
correct MOVBE decoding with prefix 0x66, also correct ADX decoding
2012-08-08 20:11:27 +00:00
Stanislav Shwartsman
fee1000ba2
split PINSRB instruction to /r and /m form
2012-08-07 14:38:43 +00:00
Stanislav Shwartsman
cac261553d
Fixed stupid typo which caused incorrect VMX instr info on LDTR/TR instruction VMEXIT
2012-08-06 20:41:16 +00:00