Changeset 93351 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Jan 19, 2022 11:35:13 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149428
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/NEMInternal.h
r93207 r93351 53 53 * Windows: Code configuration. 54 54 */ 55 # ifndef VBOX_WITH_PGM_NEM_MODE56 # define NEM_WIN_USE_HYPERCALLS_FOR_PAGES57 #endif58 55 //# define NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS /**< Applies to ring-3 code only. Useful for testing VID API. */ 59 56 //# define NEM_WIN_USE_OUR_OWN_RUN_API /**< Applies to ring-3 code only. Useful for testing VID API. */ 60 //# define NEM_WIN_WITH_RING0_RUNLOOP /**< Enables the ring-0 runloop. */61 //# define NEM_WIN_USE_RING0_RUNLOOP_BY_DEFAULT /**< For quickly testing ring-3 API without messing with CFGM. */62 57 # if defined(NEM_WIN_USE_OUR_OWN_RUN_API) && !defined(NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS) 63 58 # error "NEM_WIN_USE_OUR_OWN_RUN_API requires NEM_WIN_USE_HYPERCALLS_FOR_REGISTERS" 64 # endif65 # if defined(NEM_WIN_USE_OUR_OWN_RUN_API) && !defined(NEM_WIN_USE_HYPERCALLS_FOR_PAGES)66 # error "NEM_WIN_USE_OUR_OWN_RUN_API requires NEM_WIN_USE_HYPERCALLS_FOR_PAGES"67 # endif68 # if defined(NEM_WIN_WITH_RING0_RUNLOOP) && !defined(NEM_WIN_USE_HYPERCALLS_FOR_PAGES)69 # error "NEM_WIN_WITH_RING0_RUNLOOP requires NEM_WIN_USE_HYPERCALLS_FOR_PAGES"70 # endif71 # if defined(VBOX_WITH_PGM_NEM_MODE) && defined(NEM_WIN_USE_HYPERCALLS_FOR_PAGES)72 # error "VBOX_WITH_PGM_NEM_MODE cannot be used together with NEM_WIN_USE_HYPERCALLS_FOR_PAGES"73 59 # endif 74 60 … … 263 249 /** Number of currently mapped pages. */ 264 250 uint32_t volatile cMappedPages; 265 # ifndef NEM_WIN_USE_HYPERCALLS_FOR_PAGES266 251 /** Max number of pages we dare map at once. */ 252 #ifdef VBOX_WITH_PGM_NEM_MODE 253 /** @todo consider removing this. */ 254 #endif 267 255 uint32_t cMaxMappedPages; 268 # endif269 256 STAMCOUNTER StatMapPage; 270 257 STAMCOUNTER StatUnmapPage; 271 # ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES 272 STAMCOUNTER StatRemapPage; 273 STAMCOUNTER StatRemapPageFailed; 274 # elif !defined(VBOX_WITH_PGM_NEM_MODE) 258 # if !defined(VBOX_WITH_PGM_NEM_MODE) 275 259 STAMCOUNTER StatUnmapAllPages; 276 260 # endif … … 281 265 STAMPROFILE StatProfUnmapGpaRange; 282 266 # endif 283 # ifndef NEM_WIN_USE_HYPERCALLS_FOR_PAGES284 267 STAMPROFILE StatProfMapGpaRangePage; 285 268 STAMPROFILE StatProfUnmapGpaRangePage; 286 # endif287 288 # ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES289 /** Info about the VidGetHvPartitionId I/O control interface. */290 NEMWINIOCTL IoCtlGetHvPartitionId;291 /** Info about the VidGetPartitionProperty I/O control interface. */292 NEMWINIOCTL IoCtlGetPartitionProperty;293 # endif294 # ifdef NEM_WIN_WITH_RING0_RUNLOOP295 /** Info about the VidStartVirtualProcessor I/O control interface. */296 NEMWINIOCTL IoCtlStartVirtualProcessor;297 /** Info about the VidStopVirtualProcessor I/O control interface. */298 NEMWINIOCTL IoCtlStopVirtualProcessor;299 /** Info about the VidStopVirtualProcessor I/O control interface. */300 NEMWINIOCTL IoCtlMessageSlotHandleAndGetNext;301 # endif302 269 303 270 /** Statistics updated by NEMR0UpdateStatistics. */ … … 406 373 /** Last copy of HV_X64_VP_EXECUTION_STATE::InterruptShadow. */ 407 374 bool fLastInterruptShadow : 1; 408 # ifdef NEM_WIN_WITH_RING0_RUNLOOP409 /** Pending VINF_NEM_FLUSH_TLB. */410 int32_t rcPending;411 # else412 375 uint32_t uPadding; 413 # endif414 376 /** The VID_MSHAGN_F_XXX flags. 415 377 * Either VID_MSHAGN_F_HANDLE_MESSAGE | VID_MSHAGN_F_GET_NEXT_MESSAGE or zero. */ … … 635 597 typedef struct NEMR0PERVCPU 636 598 { 637 # if defined(RT_OS_WINDOWS) && defined(NEM_WIN_USE_HYPERCALLS_FOR_PAGES)638 /** Hypercall input/ouput page. */639 NEMR0HYPERCALLDATA HypercallData;640 /** Delta to add to convert a ring-0 pointer to a ring-3 one. */641 uintptr_t offRing3ConversionDelta;642 # else643 599 uint32_t uDummy; 644 # endif645 600 } NEMR0PERVCPU; 646 601 … … 650 605 typedef struct NEMR0PERVM 651 606 { 652 # ifdef RT_OS_WINDOWS653 # ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES654 /** The partition ID. */655 uint64_t idHvPartition;656 /** I/O control context. */657 PSUPR0IOCTLCTX pIoCtlCtx;658 /** Info about the VidGetHvPartitionId I/O control interface. */659 NEMWINIOCTL IoCtlGetHvPartitionId;660 /** Info about the VidGetPartitionProperty I/O control interface. */661 NEMWINIOCTL IoCtlGetPartitionProperty;662 # endif663 # ifdef NEM_WIN_WITH_RING0_RUNLOOP664 /** Info about the VidStartVirtualProcessor I/O control interface. */665 NEMWINIOCTL IoCtlStartVirtualProcessor;666 /** Info about the VidStopVirtualProcessor I/O control interface. */667 NEMWINIOCTL IoCtlStopVirtualProcessor;668 /** Info about the VidStopVirtualProcessor I/O control interface. */669 NEMWINIOCTL IoCtlMessageSlotHandleAndGetNext;670 /** Whether we may use the ring-0 runloop or not. */671 bool fMayUseRing0Runloop;672 # endif673 674 # ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES675 /** Hypercall input/ouput page for non-EMT. */676 NEMR0HYPERCALLDATA HypercallData;677 /** Critical section protecting use of HypercallData. */678 RTCRITSECT HypercallDataCritSect;679 # endif680 681 # else682 607 uint32_t uDummy; 683 # endif684 608 } NEMR0PERVM; 685 609
Note:
See TracChangeset
for help on using the changeset viewer.