Commit Graph

3680 Commits

Author SHA1 Message Date
Stanislav Shwartsman
df849619be more SPP limitations 2022-07-31 22:07:16 +03:00
Stanislav Shwartsman
f052c0f5b2 - VMX: Implemented missing SPP Misconfiguration condition (odd bits of SPP PTE entry are reserved)
- VMX: Fix SPP walk and VMCS access memory type to WB (match memory type listed in IA32_VMX_BASIC MSR)
2022-07-31 19:57:38 +03:00
Stanislav Shwartsman
13aa25919a Revert "do not ignore MSR=0 even if ignore_bad_msrs is set"
MSR=0 is valid MSR (used for Machine Check Architecture)

This reverts commit cf03c00ef0.
2022-07-31 18:47:13 +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
cf03c00ef0 do not ignore MSR=0 even if ignore_bad_msrs is set 2022-07-30 19:53:10 +03:00
Stanislav Shwartsman
d576eaa7c1 list in debug CR4 more already published bits (UINTR)
fix debug print of XCR0
2022-07-30 19:15:32 +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
0f9aec0e1a Merge branch 'master' of https://github.com/stlintel/Bochs 2022-07-30 15:43:25 +03:00
Stanislav Shwartsman
2093c2b1a3 allow 'Save guest MSR_PERF_GLOBAL_CTRL on VMEXIT' VMX control
at least fake it
2022-07-30 15:43:09 +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
Stanislav Shwartsman
fb09790846 dos2unix to all files 2022-07-30 14:31:16 +03:00
Stanislav Shwartsman
8afd14972e
convert many consts from #define to enum or const variables (#23) 2022-07-27 23:20:47 +03:00
Stanislav Shwartsman
94503e7a0b
cpu/vmx definitions (#20)
* update vmx.h with recently published definition
* update actions after conflicts
2022-07-27 20:51:25 +03:00
Stanislav Shwartsman
430ba44b0e
Create hc-cpp.yml (#19)
* Create hc-cpp.yml

* update actions

* update actions

* update actions

* update actions

* update actions

* fix format string for VMX preemption timer dbg message
Fix compilation with BX_HAVE_XRANDR_H = 0: XRRQueryExtension is not available

* update actions

* add .conf.everything to testing

Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2022-07-27 01:26:55 +03:00
Satoshi Tanda
88f881c6d5
Fix that the INIT signal remains pending even after delivery of VM-exit/#VMEXIT(INIT) (#16)
* Clear pending INIT signal

When the INIT signal is translated into corresponding VM-exit/#VMEXIT,
the signal should no longer be marked as pending. Otherwise, the signal
would be (incorrectly) delivered again.

* Remove trailing space and fix an incorrect indent
2022-07-24 07:14:01 +03:00
Satoshi Tanda
0ae5e67894
Fix that the blocking by SMI bit maybe set when a VM-exit ends outside SMM (#15)
* Fix that the blocking by SMI bit is set

The blocking by SMI bit of the guest interruptibility state VMCS should
not be set unless the VM-exit ends in SMM. This only happens under the
dual-monitor treatment, which is not implemented in Bochs.

* Remove trailing whitespaces
2022-07-23 19:36:31 +03:00
Stanislav Shwartsman
a8ef631a39
define and mention newly disclosed CPUID bits (#7)
Co-authored-by: Stanislav Shwartsman <sshwarts@users.sourceforge.net>
2022-07-17 18:45:36 +03:00
ughoavgfhw
b8f38eb8d3 Fix two bugs around monitor/mwait
MONITOR relies on tickle_read_virtual to set the physical address, but it was
only doing so on TLB miss. So a MONITOR with a TLB hit would arm the most
recently accessed address instead of the requested one.

TLB invalidations disarmed the monitoring range, but didn't wake a CPU that
had already MWAIT-ed. Any instruction that invalidated TLB entries on other
CPUs could have caused an MWAIT-ing CPU to never wake.
2022-07-13 21:51:15 -05:00
Volker Ruppert
3e333a0d79 Removed APIC timer handles from save/restore list. They are set by the
constructor and should not be modified. Timer activation after restore is not
necessary.
2021-09-12 15:13:20 +00:00
Volker Ruppert
26914d0058 MWAIT timer fixes (to be completed).
- Fixed MWAIT timer activation.
- A timer handle should not appear in the save/restore list.
- TODO: Activate MWAIT timer after restore if necessary.
2021-09-10 16:54:54 +00:00
Volker Ruppert
52b0000db7 Applied two patches from Debian.
- Apply standard flags from environment everywhere (SF patch #546).
- Allow overriding ld and objcopy for building bios on non-x86 platforms.
2021-09-10 15:33:22 +00:00
Volker Ruppert
4c32ca7b16 Fixed some MSVC warnings in the cpu code (unsafe use of bool type). 2021-07-27 19:18:34 +00:00
Volker Ruppert
452201a231 Fixed two compiler warnings in the cpu code. 2021-07-27 15:36:11 +00:00
Stanislav Shwartsman
1455788fe4 remove cpudb.h from some Makefile dependencies. it should be only in cpu/init.cc and config.cc 2021-07-25 18:21:41 +00:00
Stanislav Shwartsman
021f3794fa remove cpudb.h from some Makefile dependencies. TODO: it should be only in cpu/init.cc and config.cc 2021-07-25 18:08:54 +00:00
Stanislav Shwartsman
2cb9bb4e44 remove cpudb.h from some Makefile dependencies. TODO: it should be only in cpu/init.cc and config.cc 2021-07-25 18:06:31 +00:00
Stanislav Shwartsman
7129b1d7c5 fixed number of arguments for BX_INFO 2021-07-25 18:02:36 +00:00
Stanislav Shwartsman
da21b16d7f remove cpudb.h from bochs.h 2021-07-25 18:01:28 +00:00
Stanislav Shwartsman
7b2bb50722 fixed VMX exit qualification info for INVEPT/INVVPID/INVPCID instructions 2021-07-23 10:13:48 +00:00
Stanislav Shwartsman
0cba8b66c9 more robust handling of SVM VMCB host ptr 2021-07-23 09:30:17 +00:00
Stanislav Shwartsman
daaab792b6 added SVM vmcbptr to save/restore image 2021-07-23 08:06:58 +00:00
Stanislav Shwartsman
01e785f479 minor tab2space 2021-07-03 19:00:41 +00:00
Stanislav Shwartsman
25ad0b804a VMX: fixed exit qualification info for VMREAD/VMWRITE instructions 2021-07-03 14:31:14 +00:00
Stanislav Shwartsman
097c8f13b9 minor coding style modifications 2021-05-25 06:27:49 +00:00
Stanislav Shwartsman
e4b2079109 fixed compilation in x86-64 off mode 2021-04-29 04:18:33 +00:00
Stanislav Shwartsman
d112ab9943 fixed compilation 2021-04-28 17:57:57 +00:00
Stanislav Shwartsman
f174ce2b6f SMM enter: never turn off EFER.SVME 2021-04-27 09:33:46 +00:00
Stanislav Shwartsman
2d2ec5e0aa hack to W/A NX paging fault under nested paging while virtualizing SMM under SVM 2021-04-27 08:22:45 +00:00
Stanislav Shwartsman
79d6a16e3b intercept SMI support in SVM 2021-04-27 08:22:04 +00:00
Stanislav Shwartsman
4e41530b8a SVM: Fixed EXITINFO error code after nested page fault (prevented Hyper-V from running) 2021-04-22 11:12:26 +00:00
Stanislav Shwartsman
8e58d7336f implement MSR PAR handling in AMD SVM 2021-03-21 15:33:18 +00:00
Stanislav Shwartsman
0736953e89 save GUEST PAT into VMCB for SVM 2021-03-19 06:03:04 +00:00
Stanislav Shwartsman
08a068a161 fixed SVM V_TPR handling SF bug #1428 AMD SVM Hyper-V fails 2021-03-11 21:19:45 +00:00
Volker Ruppert
ff93b11eb8 Removed SVN property "executable" from some files. 2021-02-21 09:25:33 +00:00
Stanislav Shwartsman
2ab50c7d66 solve code duplication between different cpudb models 2021-02-16 18:57:49 +00:00
Stanislav Shwartsman
b6e284b080 fix MSVC warnings 2021-02-11 15:05:06 +00:00
Stanislav Shwartsman
c87ce2d11a fixed some MSVC wannings in CPU code 2021-02-08 13:06:44 +00:00
Stanislav Shwartsman
1765a06d01 move debug.h from bochs.h and include it only where required 2021-01-31 15:22:58 +00:00
Stanislav Shwartsman
5874c8e29f fix compilation with SMP enabled 2021-01-31 14:03:28 +00:00
Stanislav Shwartsman
7153228d48 fixed compilation without bochs debugger 2021-01-30 20:31:03 +00:00