summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/VMMR0/VMMR0.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Copyright year updates by scm.vboxsync2023-01-171-1/+1
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@98103 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Fixed a logging regression from r146583 that prevent logging while ↵vboxsync2022-11-161-10/+5
| | | | | | VMMRZCallRing3Disable was in effect. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@97561 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM,RuntimeR0: Flush the log buffer directly to the parent VMM if that's the ↵vboxsync2022-09-281-2/+2
| | | | | | only destination, and honor the unbuffered setting when that's the case. Setting VBOX_LOG_DEST='nofile vmm' & excluding 'buffered' from VBOX_LOG_FLAGS for the inner VBox instance will result in the logging to be intermixed w/o any buffering delays and no need to try correlate events between outer and inner vbox instances. [build fix] bugref:10092 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@96929 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM,RuntimeR0: Flush the log buffer directly to the parent VMM if that's the ↵vboxsync2022-09-281-11/+37
| | | | | | only destination, and honor the unbuffered setting when that's the case. Setting VBOX_LOG_DEST='nofile vmm' & excluding 'buffered' from VBOX_LOG_FLAGS for the inner VBox instance will result in the logging to be intermixed w/o any buffering delays and no need to try correlate events between outer and inner vbox instances. bugref:10092 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@96925 cfe28804-0f27-0410-a406-dd0f0b0b656f
* scm copyright and license note updatevboxsync2022-08-221-8/+18
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@96407 cfe28804-0f27-0410-a406-dd0f0b0b656f
* Runtime/log: Allow setting a custom output interface for the file ↵vboxsync2022-04-191-0/+1
| | | | | | destination (for encryption), bugref:9955 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@94624 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM: Moved the physical handler allocation off the hyper heap and into ↵vboxsync2022-02-141-0/+6
| | | | | | its own slab, changing the it to the 'hardened' avl tree code. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93716 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM,*: Split the physical access handler type registration into separate ↵vboxsync2022-02-081-18/+30
| | | | | | ring-0 and ring-3 steps, expanding the type to 64-bit. bugref:10094 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93650 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PDMQueue: Rewrote the queue code to not use the hyper heap and be a bit ↵vboxsync2022-02-051-0/+8
| | | | | | safer. Added a testcase (driverless). bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93609 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Changed PAGE_SIZE -> GUEST_PAGE_SIZE / HOST_PAGE_SIZE, PAGE_SHIFT -> ↵vboxsync2022-02-021-2/+2
| | | | | | GUEST_PAGE_SHIFT / HOST_PAGE_SHIFT, and PAGE_OFFSET_MASK -> GUEST_PAGE_OFFSET_MASK / HOST_PAGE_OFFSET_MASK. Also removed most usage of ASMMemIsZeroPage and ASMMemZeroPage since the host and guest page size doesn't need to be the same any more. Some work left to do in the page pool code. bugref:9898 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93554 cfe28804-0f27-0410-a406-dd0f0b0b656f
* scm --update-copyright-yearvboxsync2022-01-011-1/+1
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93115 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Some additional checks, bugref:3409vboxsync2021-12-271-1/+3
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@93088 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Nested VMX: bugref:10092 Purge VINF_PGM_CHANGE_MODE, no longer used.vboxsync2021-11-181-3/+0
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92493 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Two more VMMR0 calls that must not valid idCpu as a valid EMT. ↵vboxsync2021-11-131-1/+3
| | | | | | bugref:10093 bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92411 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Reworked most of the call-ring-3 stuff into setjmp-longjmp-on-assert ↵vboxsync2021-11-121-88/+39
| | | | | | and removed the stack switching/copying/resume code. bugref:10093 bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92408 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Removed the callring-3 API and some of the associated stuff. bugref:10093vboxsync2021-11-121-11/+52
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92392 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM,GMM: Made pgmR0PhysAllocateHandyPages & GMMR0AllocateHandyPages ↵vboxsync2021-11-121-3/+0
| | | | | | callable from ring-0 HM context, eliminating the need for the call-ring-3 fun. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92391 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM,GMM: Baked PGMR3PhysAllocateLargePage into ↵vboxsync2021-11-111-2/+2
| | | | | | PGMR0PhysAllocateLargePage eliminating VMMCALLRING3_PGM_ALLOCATE_LARGE_HANDY_PAGE; adjusted GMMR0AllocateLargePage to be ring-0 callable. Changed the large page allocation backoff logic a bit. Some more release stats. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92368 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/GMM: Removed all the legacy mode code (disabled everywhere since ↵vboxsync2021-11-061-6/+0
| | | | | | r146982). bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92248 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/GVMM,VMM: Make it possible for known worker thread to enter critical ↵vboxsync2021-11-031-6/+75
| | | | | | sections in ring-0. Added a couple of helpers for safely signalling event semaphores. bugref:10093 bugref:6695 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@92200 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/Logger: Make sure vmmR0LoggerFlushInner runs on the kernel stack. [build ↵vboxsync2021-10-181-3/+1
| | | | | | fix] bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91819 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/VMMR0EntryEx: Don't switch to custom stack for now - will make dealing ↵vboxsync2021-10-181-1/+2
| | | | | | with assertion fun till the stack is eliminated, but that's the only game in the town of macOS 12. [build fix] bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91811 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/Logger: Make sure vmmR0LoggerFlushInner runs on the kernel stack. ↵vboxsync2021-10-181-1/+8
| | | | | | bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91810 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/VMMR0EntryEx: Don't switch to custom stack for now - will make dealing ↵vboxsync2021-10-181-0/+4
| | | | | | with assertion fun till the stack is eliminated, but that's the only game in the town of macOS 12. bugref:10124 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91809 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/NEM-win: Quick and very dirty hack to make the code work on windows 11. ↵vboxsync2021-10-111-0/+6
| | | | | | This is _not_ something we want to be doing in the longish run... bugref:10118 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91676 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: bugref:10092 Moved the PAE PDPTEs out of PGM into CPUMCTX.vboxsync2021-09-161-1/+1
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91271 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM: Removed VMMCALLRING3_PGM_MAP_CHUNK and PGMR3PhysChunkMap as it's ↵vboxsync2021-09-151-3/+0
| | | | | | unused now after bugref:9627 became default everywhere. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91245 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGMPool: Call PGMR0PoolGrow directly from ring-0 instead of going via ↵vboxsync2021-09-151-4/+1
| | | | | | ring-3. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91243 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM/PGM,++: Kicked out VBOX_WITH_2X_4GB_ADDR_SPACE and the DynMap code used ↵vboxsync2021-08-311-39/+22
| | | | | | by it and raw-mode. Kept this around in case we wanted to reuse it for SMAP workarounds, but that's no longer needed. bugref:9517 bugref:9627 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91016 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM,GVMMR0: Removed SMAP obsolete sanity checks. bugref:9627vboxsync2021-08-311-157/+8
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91015 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Made VBOX_WITH_RAM_IN_KERNEL non-optional, removing all the tests for ↵vboxsync2021-08-311-42/+3
| | | | | | it. bugref:9627 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@91014 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Removed VMMCALLRING3_PGM_LOCK (now unused). bugref:6695vboxsync2021-08-301-3/+0
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90999 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM,PDM,PGM: Restrict the VMSetError and VMSetRuntimeError APIs to ring-3, ↵vboxsync2021-08-301-6/+0
| | | | | | these never worked properly in ring-0 or raw-mode. A PAEmode runtime error was the only place any of these were used, but given that the VMSetRuntimeError codepath starts with an assertion, it can't have been used/tested. The PAEmode runtime error shouldn't necessarily be triggered by PGM anyway, but IEM. Removed VMMCALLRING3_VM_SET_ERROR and VMMCALLRING3_VM_SET_RUNTIME_ERROR. bugref:10093 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90997 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Changed pgmLock to pass VINF_SUCCESS to PDMCritSectEnter and removed ↵vboxsync2021-08-291-3/+0
| | | | | | VMMCALLRING3_PDM_LOCK. bugref:6695 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90981 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Removed VMMCALLRING3_PDM_CRIT_SECT_ENTER, ↵vboxsync2021-08-291-3/+0
| | | | | | VMMCALLRING3_PDM_CRIT_SECT_RW_ENTER_EXCL and VMMCALLRING3_PDM_CRIT_SECT_RW_ENTER_SHARED. bugref:6695 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90980 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Ensure proper log flush order by going to ring-0 to wait for the ↵vboxsync2021-08-281-4/+2
| | | | | | flusher thread to complete. [fix] bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90976 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Ensure proper log flush order by going to ring-0 to wait for the ↵vboxsync2021-08-281-1/+73
| | | | | | flusher thread to complete. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90975 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Correctly update idxBuf so we flush the right buffer when we get to ↵vboxsync2021-08-271-1/+6
| | | | | | ring-3. Tweaked the EMT/flusher race mitigation hack in vmmR3LogReturnFlush and added a couple of counters for it. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90972 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Reduce the buffer size for the ring-0 release logger so we don't waste ↵vboxsync2021-08-271-1/+1
| | | | | | too much memory on something that's hardly ever used. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90971 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM,SUPDrv: Use 4 buffers for each EMT logger in ring-0, making it very ↵vboxsync2021-08-271-106/+180
| | | | | | likely that we can avoid having to wait for the flush thread. Bumped the min supdrv version, as we require the log.cpp changes from the previous commit. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90970 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Log flushing stats. bugref:10086vboxsync2021-08-271-0/+12
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90958 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Preparing for using more than one log buffer per ring-0 EMT logger. ↵vboxsync2021-08-271-83/+106
| | | | | | bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90956 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Don't need the per-logger flushing-disabled flag ↵vboxsync2021-08-271-2/+1
| | | | | | (VMMR0_LOGGER_FLAGS_FLUSHING_DISABLED). bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90953 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Organize the logger structures both named member and arrays for easier ↵vboxsync2021-08-271-84/+43
| | | | | | access by the log flusher and init/term code. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90948 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Use a worker thread for flushing ring-0 log buffers. bugref:10086vboxsync2021-08-271-198/+634
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90945 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: Initialize the ring-0 loggers as early as possible, so we can update ↵vboxsync2021-08-251-42/+54
| | | | | | their settings before doing vmmR0InitVM and similar where we'd like to have working log output. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90897 cfe28804-0f27-0410-a406-dd0f0b0b656f
* IPRT,SUPDrv,VMM,++: Bumped major support driver version. Added ↵vboxsync2021-08-251-7/+14
| | | | | | RTLogSetR0ProgramStart and make the VMM use it when configuring the ring-0 loggers. Removed pfnFlush from the parameter list of RTLogCreateEx[V]. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90862 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMMR0,SUPDrv: Need to override RTLogDefaultInstanceEx rather than ↵vboxsync2021-08-241-3/+3
| | | | | | RTLogGetDefaultInstanceEx for debug logging. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90859 cfe28804-0f27-0410-a406-dd0f0b0b656f
* IPRT,VMM,SUPDrv,++: Reworked the IPRT logger structure and how the VMM ↵vboxsync2021-08-241-98/+365
| | | | | | ring-0 uses it. bugref:10086 git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90829 cfe28804-0f27-0410-a406-dd0f0b0b656f
* VMM: VALID_PTR -> RT_VALID_PTR.vboxsync2021-08-231-3/+3
| | | | git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@90784 cfe28804-0f27-0410-a406-dd0f0b0b656f