Shwartsman
6f4f217a08
implemented AMX_FP16 and aMX_COMPLEX, fixes for daz handling in AVX_NE_CONVERT FB16
...
updated CHANGES
2024-01-12 12:38:31 +02:00
Stanislav Shwartsman
0eab037907
dynamically allocate VMCB_CACHE only if SVM is actually enabled by CPU model
...
also reduces include dependency on svm.h
2024-01-12 00:56:09 +02:00
Stanislav Shwartsman
3a02e85599
AMX support ( #212 )
2024-01-10 20:13:25 +02:00
Stanislav Shwartsman
ec7ef85ed9
exclude cpuid.h from cpu.h to reduce compilation dependency
2023-12-29 21:27:24 +02:00
Stanislav Shwartsman
e3612c30f8
Implement support for LA57 and 5-level paging
2023-12-29 14:48:38 +02:00
Shwartsman
7c9bab8182
handle getexp methods though templates
2023-12-25 08:07:07 +02:00
Shwartsman
19dbd7314b
convert more instructions to template
2023-12-23 22:01:13 +02:00
Shwartsman
8e76c9b6bb
move many SSE/AVX/AVX512 methods to template functions
2023-12-23 21:00:51 +02:00
Shwartsman
fc919cd132
use true/false instead of 0/1 for bool in the cpu code
2023-12-19 20:44:56 +02:00
Shwartsman
d794b516e1
rewrite XSAVE/XRESTORE CPUID leaf reporting,
...
fixed several bugs and made code correct for all future XSAVE extensions
2023-12-18 11:35:55 +02:00
Stanislav Shwartsman
54831068df
implement RDMSRLIST/WRMSRLIST instructions (+related VMX extensions) ( #176 )
2023-12-16 21:59:34 +02:00
Stanislav Shwartsman
00e8e0bca0
implemented MOVDIR64B instruction and enabled in TigerLake model
2023-12-01 18:03:25 +02:00
Stanislav Shwartsman
2e89b9bcba
implemented WAITPKG instruction set ( #150 )
...
still missing : UMWAIT/TPAUSE should set CF flag if it was using OS
deadline and woken up after deadline (i.e. not from monitored store)
also not clear in the spec: should UWAITX/TPAUSE always wait until
deadline due to 'while(tsc<deadline)' statement ?
+include small fixes for AMD's MONITORX/MWAITX
2023-12-01 18:00:03 +02:00
Shwartsman
3c857f2ad1
make APIC from static object to dynamic so many cc files won't need to be dependent on apic.h
2023-11-28 11:08:42 +02:00
Shwartsman
8dd9649389
fixed compilation for VMX=1 X86_64=1
...
updated (c) for many files
2023-11-28 10:36:56 +02:00
Shwartsman
4efcabb1a1
reduce code duplication with making new simpler to use physical access methods
2023-11-28 10:24:11 +02:00
Shwartsman
cc4f594ede
implemented process-posted-interrupts VMX extension
2023-11-27 20:15:00 +02:00
Stanislav Shwartsman
a5c6bcfd15
remove in_repeat variable and replace it with correct EFLAGS.RF management
2023-11-27 13:51:25 +02:00
Stanislav Shwartsman
ca4ca03be8
remove #ifdef around in_repeat variable, it is always needed
2023-11-26 23:21:51 +02:00
Shwartsman
b013b389ea
fixed code duplication, extract some code to functions
...
make special phy memory read methods which help to write cleaner code
2023-11-26 18:25:54 +02:00
Shwartsman
ab629f16f6
remove redundant #if BX_SUPPORT_X86_64 around UINTR
...
it is checked already in config.h
2023-11-26 17:41:26 +02:00
Stanislav Shwartsman
280303d76c
initial code for UINTR implementation ( #138 )
...
First step into implementing UINTR - User Level Interrupts ISA extension
To be continued
---------
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-11-25 16:43:47 +02:00
Stanislav Shwartsman
c1c391a9c6
fix common code duplication by introducing new method get_Virtual_TSC()
...
it computes TSC as needed for RDTSC(P) and RDMSR TSC taking into account VMX and SVM adjustments
replaces previous get_TSC_VMXAdjust(Bit64u0
2023-11-25 15:00:39 +02:00
Shwartsman
4d08659621
Implement 'Tertiary VMEXEC Controls' for VMX
...
Currently none of the controls were not enabled, all clear but infra is here
2023-11-23 19:38:59 +02:00
Shwartsman
f4f41cffc4
fix code duplication and optimize code
2023-11-21 20:26:48 +02:00
Stanislav Shwartsman
f90fdbc353
add methods to query local apic state
2023-11-21 15:43:38 +02:00
Stanislav Shwartsman
c1c102ab04
coding style, cleanups and optimizations
2023-11-19 20:31:05 +02:00
Stanislav Shwartsman
a3fe8c2c8d
introduce get_efer_allow_mask function to avoid placing that code directly in init.cc
2023-11-17 23:40:28 +02:00
Stanislav Shwartsman
9bda4eba28
introduce GET64_FROM_HI32_LO32 to form 64-bit integer from 2 32-bit
2023-11-17 23:31:38 +02:00
Stanislav Shwartsman
1ad2ee6d4c
use isReadOK instead of magic arithmetic for system_read_* methods
...
introduce system_write_qword as well
2023-11-17 23:14:38 +02:00
Stanislav Shwartsman
60cc8020e8
Fixed VMCS_GUEST_PENDING_DBG_EXCEPTIONS saved on VMEXIT (should be cleared after most of VMEXITs)
2023-11-13 20:02:03 +02:00
Stanislav Shwartsman
8594972389
final resolution for issue #2 : address VEXPAND* and VPSHUFBITQMB instructions
2023-11-09 19:15:32 +02:00
Stanislav Shwartsman
b78e93c9e3
optimize handling of allowed_to_run_FPU_MMX instructios common block
...
now checked at decode and not at every instruction
simpler code and also 1% faster winXP boot time as bonus
other x87 and mmx heavy guests may benefit even more
2023-11-08 06:48:53 +02:00
Stanislav Shwartsman
7469bcb69a
measure host stack depth during simulation to avoid excessive chainin… ( #119 )
...
…g depth
never allow beyong 64K stack
2023-11-05 07:08:36 +02:00
Stanislav Shwartsman
18deee022f
make CPU to use C++ template for implementation of CPU methods ( #115 )
...
this allow to remove a lot of code from CPU common methods
2023-10-30 06:57:16 +02:00
Shwartsman
02c4f85a89
implemented proper masked load for VPMOVSX/ZX instructions + bugfix
2023-10-20 20:13:29 +03:00
Stanislav Shwartsman
ffa64461ab
implementation of AVX-NE-CONVERT ISA ( #89 )
...
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-14 14:55:12 +03:00
Stanislav Shwartsman
4a309478f9
SHA512 instructions implemented ( #88 )
...
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-10 21:33:16 +03:00
Stanislav Shwartsman
3234e9b88e
implemented AVX VNNI INT16 ISA extension ( #87 )
...
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-10 20:22:07 +03:00
Stanislav Shwartsman
44eea71f37
implemented SM3 instructions ( #84 )
...
add rol/ror methods to scalar_arith.h and use in more places
---------
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2023-10-07 21:34:04 +03:00
Stanislav Shwartsman
1dcae848d7
change nullptr to NULL to help some old hosts not supporting C++ standard
2023-08-20 19:40:08 +03:00
Stanislav Shwartsman
0e4524f38f
Implemented CMPccXADD instructions
2022-10-08 20:04:22 +03:00
Stanislav Shwartsman
4aed72e0ef
fix issue with AVX IFMA when EVEX is not compiled in
2022-10-02 23:07:05 +03:00
Stanislav Shwartsman
a56144833a
add support for AVX encoded VNNI INT8 extensions
2022-10-02 23:00:46 +03:00
Stanislav Shwartsman
1e4f1624c8
remove trailing whitespace from source files
2022-08-23 21:46:04 +03:00
Satoshi Tanda
30ef7f4842
Fix dbg_xlate_linear2phy
for NPT ( #30 )
2022-08-22 07:20:47 +03:00
Stanislav Shwartsman
c9d8413422
allow TLB caching of SPP paging writes
...
it is possible that SPP-protected subpage block is allowing write but all others are not.
the TLB entry cannot be cached as writeOK based on SPP subblock check
2022-08-14 21:09:18 +03:00
Stanislav Shwartsman
4d227d15fb
remove instrument.h from bochs.h so it won't be included everywhere
...
include it only where required
move PHY_ADDRESS reserved bits consts to cpu.h
2022-07-30 22:35:43 +03:00
Stanislav Shwartsman
3f65841714
use boolean constants true/false instead of 0/1 ( #26 )
...
* use boolean constants true/false instead of 0/1
* fix code comment
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2022-07-30 18:38:22 +03:00
Stanislav Shwartsman
f44f4ae753
MBE (Mode Based Execution Control) emulation ( #22 )
...
* MBE (Mode Based Execution Control) emulation
2022-07-30 15:26:47 +03:00