Changeset 66040 in vbox
- Timestamp:
- Mar 10, 2017 4:18:12 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113906
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r66001 r66040 1028 1028 uint32_t fSvm : 1; 1029 1029 1030 /** Support for Intel VMX. */ 1031 uint32_t fVmx : 1; 1032 1030 1033 /** Alignment padding / reserved for future use. */ 1031 uint32_t fPadding : 26; 1032 uint32_t auPadding[3]; 1034 uint32_t fPadding : 25; 1035 1036 /** Hardware virtualization features. */ 1037 union 1038 { 1039 /** SVM features. */ 1040 struct 1041 { 1042 /** Features as reported by CPUID 0x8000000a.EDX. */ 1043 union 1044 { 1045 struct 1046 { 1047 uint32_t fNestedPaging : 1; 1048 uint32_t fLbrVirt : 1; 1049 uint32_t fSvmLock : 1; 1050 uint32_t fNextRipSave : 1; 1051 uint32_t fTscRateMsr : 1; 1052 uint32_t fVmcbClean : 1; 1053 uint32_t fFlusbByAsid : 1; 1054 uint32_t fDecodeAssist : 1; 1055 uint32_t u2Reserved0 : 2; 1056 uint32_t fPauseFilter : 1; 1057 uint32_t u1Reserved0 : 1; 1058 uint32_t fPauseFilterThreshold : 1; 1059 uint32_t fAvic : 1; 1060 uint32_t u18Reserved0 : 18; 1061 } n; 1062 uint32_t u; 1063 } feat; 1064 /** Maximum supported ASID. */ 1065 uint32_t uMaxAsid; 1066 } svm; 1067 1068 /** VMX features. */ 1069 struct 1070 { 1071 uint32_t uDummy1; 1072 uint32_t uDummy2; 1073 } vmx; 1074 } CPUM_UNION_NM(hwvirt); 1075 uint32_t auPadding[1]; 1033 1076 } CPUMFEATURES; 1034 1077 #ifndef VBOX_FOR_DTRACE_LIB … … 1269 1312 1270 1313 /** 1271 * Checks if the guest has the specified ctrl/instruction 1272 * intercept active. 1314 * Checks if the guest VMCB has the specified ctrl/instruction intercept active. 1273 1315 * 1274 1316 * @returns @c true if in intercept is set, @c false otherwise. … … 1279 1321 DECLINLINE(bool) CPUMIsGuestSvmCtrlInterceptSet(PCPUMCTX pCtx, uint64_t fIntercept) 1280 1322 { 1281 return RT_BOOL(pCtx->hwvirt.svm. u64InterceptCtrl & fIntercept);1323 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u64InterceptCtrl & fIntercept); 1282 1324 } 1283 1325 1284 1326 /** 1285 * Checks if the guest has the specified CR read intercept1327 * Checks if the guest VMCB has the specified CR read intercept 1286 1328 * active. 1287 1329 * … … 1292 1334 DECLINLINE(bool) CPUMIsGuestSvmReadCRxInterceptSet(PCPUMCTX pCtx, uint8_t uCr) 1293 1335 { 1294 return RT_BOOL(pCtx->hwvirt.svm. u16InterceptRdCRx & (1 << uCr));1336 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u16InterceptRdCRx & (1 << uCr)); 1295 1337 } 1296 1338 1297 1339 /** 1298 * Checks if the guest has the specified CR write intercept1340 * Checks if the guest VMCB has the specified CR write intercept 1299 1341 * active. 1300 1342 * … … 1305 1347 DECLINLINE(bool) CPUMIsGuestSvmWriteCRxInterceptSet(PCPUMCTX pCtx, uint8_t uCr) 1306 1348 { 1307 return RT_BOOL(pCtx->hwvirt.svm. u16InterceptWrCRx & (1 << uCr));1349 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u16InterceptWrCRx & (1 << uCr)); 1308 1350 } 1309 1351 1310 1352 /** 1311 * Checks if the guest has the specified DR read intercept1353 * Checks if the guest VMCB has the specified DR read intercept 1312 1354 * active. 1313 1355 * … … 1318 1360 DECLINLINE(bool) CPUMIsGuestSvmReadDRxInterceptSet(PCPUMCTX pCtx, uint8_t uDr) 1319 1361 { 1320 return RT_BOOL(pCtx->hwvirt.svm. u16InterceptRdDRx & (1 << uDr));1362 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u16InterceptRdDRx & (1 << uDr)); 1321 1363 } 1322 1364 1323 1365 /** 1324 * Checks if the guest has the specified DR write intercept1366 * Checks if the guest VMCB has the specified DR write intercept 1325 1367 * active. 1326 1368 * … … 1331 1373 DECLINLINE(bool) CPUMIsGuestSvmWriteDRxInterceptSet(PCPUMCTX pCtx, uint8_t uDr) 1332 1374 { 1333 return RT_BOOL(pCtx->hwvirt.svm. u16InterceptWrDRx & (1 << uDr));1375 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u16InterceptWrDRx & (1 << uDr)); 1334 1376 } 1335 1377 1336 1378 /** 1337 * Checks if the guest has the specified exception1379 * Checks if the guest VMCB has the specified exception 1338 1380 * intercept active. 1339 1381 * … … 1344 1386 DECLINLINE(bool) CPUMIsGuestSvmXcptInterceptSet(PCPUMCTX pCtx, X86XCPT enmXcpt) 1345 1387 { 1346 return RT_BOOL(pCtx->hwvirt.svm. u32InterceptXcpt & enmXcpt);1388 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u32InterceptXcpt & enmXcpt); 1347 1389 } 1348 1390 1349 1391 /** 1350 * Checks if the guest is currently in nested hardware-virtualized 1351 * guest mode. 1392 * Checks if we are executing inside the nested hardware-virtualized guest. 1352 1393 * 1353 1394 * @returns true if in nested-guest mode, false otherwise. … … 1357 1398 { 1358 1399 /* 1359 * With SVM, the VMRUN intercept is a pre-requisite to enteringguest-mode.1360 * See AMD spec. ,15.5 "VMRUN instruction" subsection "Canonicalization and Consistency Checks".1400 * With AMD-V, the VMRUN intercept is a pre-requisite to entering SVM guest-mode. 1401 * See AMD spec. 15.5 "VMRUN instruction" subsection "Canonicalization and Consistency Checks". 1361 1402 */ 1362 /** @todo Fix this -- silly recompiler is redefining this stuff... why? */ 1363 return RT_BOOL(pCtx->hwvirt.svm.u64InterceptCtrl & RT_BIT_64(32) /* SVM_CTRL_INTERCEPT_VMRUN*/); 1403 return RT_BOOL(pCtx->hwvirt.svm.VmcbCtrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_VMRUN); 1364 1404 /** @todo Intel VMX. */ 1365 1405 } -
trunk/include/VBox/vmm/cpum.mac
r66000 r66040 259 259 %endif 260 260 .hwvirt.svm.uMsrHSavePa resq 1 261 .hwvirt.svm.u64InterceptCtrl resq 1 262 .hwvirt.svm.u32InterceptXcpt resd 1 263 .hwvirt.svm.u16InterceptRdCRx resw 1 264 .hwvirt.svm.u16InterceptWrCRx resw 1 265 .hwvirt.svm.u16InterceptRdDRx resw 1 266 .hwvirt.svm.u16InterceptWrDRx resw 1 261 .hwvirt.svm.GCPhysVmcb resq 1 262 .hwvirt.svm.VmcbCtrl resb 256 263 .hwvirt.svm.HostState resb 184 267 264 .hwvirt.svm.fGif resb 1 268 .hwvirt.svm.abPadding resb 3269 .hwvirt.svm.GCPhysNstGstVmcb resq 1270 265 alignb 64 271 266 endstruc -
trunk/include/VBox/vmm/cpumctx.h
r66015 r66040 30 30 # include <iprt/x86.h> 31 31 # include <VBox/types.h> 32 # include <VBox/vmm/hm_svm.h> 32 33 #else 33 34 # pragma D depends_on library x86.d … … 72 73 X86DESCATTR Attr; 73 74 } CPUMSELREG; 74 #if def VBOX_FOR_DTRACE_LIB75 AssertCompileSize(CPUMSELREG, 24) 75 #ifndef VBOX_FOR_DTRACE_LIB 76 AssertCompileSize(CPUMSELREG, 24); 76 77 #endif 77 78 … … 169 170 } CPUM_STRUCT_NM(s); 170 171 } CPUMCTXGREG; 171 #if def VBOX_FOR_DTRACE_LIB172 #ifndef VBOX_FOR_DTRACE_LIB 172 173 AssertCompileSize(CPUMCTXGREG, 8); 173 174 AssertCompileMemberOffset(CPUMCTXGREG, CPUM_STRUCT_NM(s.) bLo, 0); … … 283 284 } CPUMCTXCORE; 284 285 #pragma pack() 286 287 288 /** 289 * SVM Host-state area (Nested Hw.virt - VirtualBox's layout). 290 */ 291 #pragma pack(1) 292 typedef struct SVMHOSTSTATE 293 { 294 uint64_t uEferMsr; 295 uint64_t uCr0; 296 uint64_t uCr4; 297 uint64_t uCr3; 298 uint64_t uRip; 299 uint64_t uRsp; 300 uint64_t uRax; 301 X86RFLAGS rflags; 302 CPUMSELREG es; 303 CPUMSELREG cs; 304 CPUMSELREG ss; 305 CPUMSELREG ds; 306 VBOXGDTR gdtr; 307 VBOXIDTR idtr; 308 uint8_t abPadding[4]; 309 } SVMHOSTSTATE; 310 #pragma pack() 311 /** Pointer to the SVMHOSTSTATE structure. */ 312 typedef SVMHOSTSTATE *PSVMHOSTSTATE; 313 /** Pointer to a const SVMHOSTSTATE structure. */ 314 typedef const SVMHOSTSTATE *PCSVMHOSTSTATE; 315 #ifndef VBOX_FOR_DTRACE_LIB 316 AssertCompileSizeAlignment(SVMHOSTSTATE, 8); 317 AssertCompileSize(SVMHOSTSTATE, 184); 318 #endif 285 319 286 320 … … 441 475 struct 442 476 { 443 /** 728 - MSR holding physical address of the Guest's 'host-state'. */ 444 uint64_t uMsrHSavePa; 445 446 /** @name Cache of the nested-guest VMCB controls. 447 * @{ */ 448 /** 736 - Control intercepts. */ 449 uint64_t u64InterceptCtrl; 450 /** 744 - Exception intercepts. */ 451 uint32_t u32InterceptXcpt; 452 /** 748 - CR0-CR15 read intercepts. */ 453 uint16_t u16InterceptRdCRx; 454 /** 750 - CR0-CR15 write intercepts. */ 455 uint16_t u16InterceptWrCRx; 456 /** 752 - DR0-DR15 read intercepts. */ 457 uint16_t u16InterceptRdDRx; 458 /** 754 - DR0-DR15 write intercepts. */ 459 uint16_t u16InterceptWrDRx; 460 /** @} */ 461 462 /** 756 - Global interrupt flag. */ 463 uint8_t fGif; 464 uint8_t abPadding[3]; 465 /** 760 - Nested-guest VMCB. */ 466 RTGCPHYS GCPhysNstGstVmcb; 477 /** 728 - MSR holding physical address of the Guest's Host-state. */ 478 uint64_t uMsrHSavePa; 479 /** 736 - Guest physical address of the nested-guest VMCB. */ 480 RTGCPHYS GCPhysVmcb; 481 /** 744 - Cache of the nested-guest VMCB control area. */ 482 SVMVMCBCTRL VmcbCtrl; 483 /** 1000 - Guest's host-state save area. */ 484 SVMHOSTSTATE HostState; 485 /** 1184 - Global interrupt flag. */ 486 uint8_t fGif; 487 /** 1185 - Padding. */ 488 uint8_t abPadding0[31]; 467 489 } svm; 468 490 #if 0 … … 527 549 AssertCompileMemberOffset(CPUMCTX, aoffXState, HC_ARCH_BITS == 64 ? 596 : 588); 528 550 AssertCompileMemberOffset(CPUMCTX, hwvirt, 728); 529 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.uMsrHSavePa, 728); 530 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u64InterceptCtrl, 736); 531 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u32InterceptXcpt, 744); 532 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u16InterceptRdCRx, 748); 533 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u16InterceptWrCRx, 750); 534 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u16InterceptRdDRx, 752); 535 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.u16InterceptWrDRx, 754); 536 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.fGif, 756); 551 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.uMsrHSavePa, 728); 552 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.GCPhysVmcb, 736); 553 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.VmcbCtrl, 744); 554 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.HostState, 1000); 555 AssertCompileMemberOffset(CPUMCTX, hwvirt.CPUM_UNION_NM(s.) svm.fGif, 1184); 537 556 538 557 AssertCompileMembersAtSameOffset(CPUMCTX, CPUM_UNION_STRUCT_NM(g,qw.) rax, CPUMCTX, CPUM_UNION_NM(g.) aGRegs); … … 719 738 typedef const CPUMCPUID *PCCPUMCPUID; 720 739 721 /**722 * SVM Host-state area (Nested Hw.virt - VirtualBox's layout).723 */724 typedef struct SVMHOSTSTATE725 {726 uint64_t uEferMsr;727 uint64_t uCr0;728 uint64_t uCr4;729 uint64_t uCr3;730 uint64_t uRip;731 uint64_t uRsp;732 uint64_t uRax;733 X86RFLAGS rflags;734 CPUMSELREG es;735 CPUMSELREG cs;736 CPUMSELREG ss;737 CPUMSELREG ds;738 VBOXGDTR gdtr;739 VBOXIDTR idtr;740 } SVMHOSTSTATE;741 /** Pointer to the SVMHOSTSTATE structure. */742 typedef SVMHOSTSTATE *PSVMHOSTSTATE;743 /** Pointer to a const SVMHOSTSTATE structure. */744 typedef const SVMHOSTSTATE *PCSVMHOSTSTATE;745 746 740 /** @} */ 747 741 -
trunk/include/VBox/vmm/hm.h
r66022 r66040 153 153 VMM_INT_DECL(void) HMVmxNstGstVmExit(PVMCPU pVCpu, uint16_t uBasicExitReason); 154 154 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmmcall(PVMCPU pVCpu, PCPUMCTX pCtx, bool *pfRipUpdated); 155 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmrun(PVMCPU pVCpu, PCPUMCTX pCtx , PSVMVMCB pVmcb, PSVMHOSTSTATE pHostState);155 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmrun(PVMCPU pVCpu, PCPUMCTX pCtx); 156 156 157 157 #ifndef IN_RC -
trunk/include/VBox/vmm/hm_svm.h
r66022 r66040 67 67 /** @} */ 68 68 69 69 /* 70 * Ugly! 71 * When compiling the recompiler, its own svm.h defines clash with 72 * the following defines. Avoid just the duplicates here as we still 73 * require other definitions and structures in this header. 74 */ 75 #ifndef IN_REM_R3 70 76 /** @name SVM Basic Exit Reasons. 71 77 * @{ 72 78 */ 73 79 /** Invalid guest state in VMCB. */ 74 # define SVM_EXIT_INVALID (uint64_t)(-1)80 # define SVM_EXIT_INVALID (uint64_t)(-1) 75 81 /** Read from CR0-CR15. */ 76 # define SVM_EXIT_READ_CR0 0x077 # define SVM_EXIT_READ_CR1 0x178 # define SVM_EXIT_READ_CR2 0x279 # define SVM_EXIT_READ_CR3 0x380 # define SVM_EXIT_READ_CR4 0x481 # define SVM_EXIT_READ_CR5 0x582 # define SVM_EXIT_READ_CR6 0x683 # define SVM_EXIT_READ_CR7 0x784 # define SVM_EXIT_READ_CR8 0x885 # define SVM_EXIT_READ_CR9 0x986 # define SVM_EXIT_READ_CR10 0xA87 # define SVM_EXIT_READ_CR11 0xB88 # define SVM_EXIT_READ_CR12 0xC89 # define SVM_EXIT_READ_CR13 0xD90 # define SVM_EXIT_READ_CR14 0xE91 # define SVM_EXIT_READ_CR15 0xF82 # define SVM_EXIT_READ_CR0 0x0 83 # define SVM_EXIT_READ_CR1 0x1 84 # define SVM_EXIT_READ_CR2 0x2 85 # define SVM_EXIT_READ_CR3 0x3 86 # define SVM_EXIT_READ_CR4 0x4 87 # define SVM_EXIT_READ_CR5 0x5 88 # define SVM_EXIT_READ_CR6 0x6 89 # define SVM_EXIT_READ_CR7 0x7 90 # define SVM_EXIT_READ_CR8 0x8 91 # define SVM_EXIT_READ_CR9 0x9 92 # define SVM_EXIT_READ_CR10 0xA 93 # define SVM_EXIT_READ_CR11 0xB 94 # define SVM_EXIT_READ_CR12 0xC 95 # define SVM_EXIT_READ_CR13 0xD 96 # define SVM_EXIT_READ_CR14 0xE 97 # define SVM_EXIT_READ_CR15 0xF 92 98 /** Writes to CR0-CR15. */ 93 # define SVM_EXIT_WRITE_CR0 0x1094 # define SVM_EXIT_WRITE_CR1 0x1195 # define SVM_EXIT_WRITE_CR2 0x1296 # define SVM_EXIT_WRITE_CR3 0x1397 # define SVM_EXIT_WRITE_CR4 0x1498 # define SVM_EXIT_WRITE_CR5 0x1599 # define SVM_EXIT_WRITE_CR6 0x16100 # define SVM_EXIT_WRITE_CR7 0x17101 # define SVM_EXIT_WRITE_CR8 0x18102 # define SVM_EXIT_WRITE_CR9 0x19103 # define SVM_EXIT_WRITE_CR10 0x1A104 # define SVM_EXIT_WRITE_CR11 0x1B105 # define SVM_EXIT_WRITE_CR12 0x1C106 # define SVM_EXIT_WRITE_CR13 0x1D107 # define SVM_EXIT_WRITE_CR14 0x1E108 # define SVM_EXIT_WRITE_CR15 0x1F99 # define SVM_EXIT_WRITE_CR0 0x10 100 # define SVM_EXIT_WRITE_CR1 0x11 101 # define SVM_EXIT_WRITE_CR2 0x12 102 # define SVM_EXIT_WRITE_CR3 0x13 103 # define SVM_EXIT_WRITE_CR4 0x14 104 # define SVM_EXIT_WRITE_CR5 0x15 105 # define SVM_EXIT_WRITE_CR6 0x16 106 # define SVM_EXIT_WRITE_CR7 0x17 107 # define SVM_EXIT_WRITE_CR8 0x18 108 # define SVM_EXIT_WRITE_CR9 0x19 109 # define SVM_EXIT_WRITE_CR10 0x1A 110 # define SVM_EXIT_WRITE_CR11 0x1B 111 # define SVM_EXIT_WRITE_CR12 0x1C 112 # define SVM_EXIT_WRITE_CR13 0x1D 113 # define SVM_EXIT_WRITE_CR14 0x1E 114 # define SVM_EXIT_WRITE_CR15 0x1F 109 115 /** Read from DR0-DR15. */ 110 # define SVM_EXIT_READ_DR0 0x20111 # define SVM_EXIT_READ_DR1 0x21112 # define SVM_EXIT_READ_DR2 0x22113 # define SVM_EXIT_READ_DR3 0x23114 # define SVM_EXIT_READ_DR4 0x24115 # define SVM_EXIT_READ_DR5 0x25116 # define SVM_EXIT_READ_DR6 0x26117 # define SVM_EXIT_READ_DR7 0x27118 # define SVM_EXIT_READ_DR8 0x28119 # define SVM_EXIT_READ_DR9 0x29120 # define SVM_EXIT_READ_DR10 0x2A121 # define SVM_EXIT_READ_DR11 0x2B122 # define SVM_EXIT_READ_DR12 0x2C123 # define SVM_EXIT_READ_DR13 0x2D124 # define SVM_EXIT_READ_DR14 0x2E125 # define SVM_EXIT_READ_DR15 0x2F116 # define SVM_EXIT_READ_DR0 0x20 117 # define SVM_EXIT_READ_DR1 0x21 118 # define SVM_EXIT_READ_DR2 0x22 119 # define SVM_EXIT_READ_DR3 0x23 120 # define SVM_EXIT_READ_DR4 0x24 121 # define SVM_EXIT_READ_DR5 0x25 122 # define SVM_EXIT_READ_DR6 0x26 123 # define SVM_EXIT_READ_DR7 0x27 124 # define SVM_EXIT_READ_DR8 0x28 125 # define SVM_EXIT_READ_DR9 0x29 126 # define SVM_EXIT_READ_DR10 0x2A 127 # define SVM_EXIT_READ_DR11 0x2B 128 # define SVM_EXIT_READ_DR12 0x2C 129 # define SVM_EXIT_READ_DR13 0x2D 130 # define SVM_EXIT_READ_DR14 0x2E 131 # define SVM_EXIT_READ_DR15 0x2F 126 132 /** Writes to DR0-DR15. */ 127 # define SVM_EXIT_WRITE_DR0 0x30128 # define SVM_EXIT_WRITE_DR1 0x31129 # define SVM_EXIT_WRITE_DR2 0x32130 # define SVM_EXIT_WRITE_DR3 0x33131 # define SVM_EXIT_WRITE_DR4 0x34132 # define SVM_EXIT_WRITE_DR5 0x35133 # define SVM_EXIT_WRITE_DR6 0x36134 # define SVM_EXIT_WRITE_DR7 0x37135 # define SVM_EXIT_WRITE_DR8 0x38136 # define SVM_EXIT_WRITE_DR9 0x39137 # define SVM_EXIT_WRITE_DR10 0x3A138 # define SVM_EXIT_WRITE_DR11 0x3B139 # define SVM_EXIT_WRITE_DR12 0x3C140 # define SVM_EXIT_WRITE_DR13 0x3D141 # define SVM_EXIT_WRITE_DR14 0x3E142 # define SVM_EXIT_WRITE_DR15 0x3F133 # define SVM_EXIT_WRITE_DR0 0x30 134 # define SVM_EXIT_WRITE_DR1 0x31 135 # define SVM_EXIT_WRITE_DR2 0x32 136 # define SVM_EXIT_WRITE_DR3 0x33 137 # define SVM_EXIT_WRITE_DR4 0x34 138 # define SVM_EXIT_WRITE_DR5 0x35 139 # define SVM_EXIT_WRITE_DR6 0x36 140 # define SVM_EXIT_WRITE_DR7 0x37 141 # define SVM_EXIT_WRITE_DR8 0x38 142 # define SVM_EXIT_WRITE_DR9 0x39 143 # define SVM_EXIT_WRITE_DR10 0x3A 144 # define SVM_EXIT_WRITE_DR11 0x3B 145 # define SVM_EXIT_WRITE_DR12 0x3C 146 # define SVM_EXIT_WRITE_DR13 0x3D 147 # define SVM_EXIT_WRITE_DR14 0x3E 148 # define SVM_EXIT_WRITE_DR15 0x3F 143 149 /* Exception 0-31. */ 144 # define SVM_EXIT_EXCEPTION_0 0x40145 # define SVM_EXIT_EXCEPTION_1 0x41146 # define SVM_EXIT_EXCEPTION_2 0x42147 # define SVM_EXIT_EXCEPTION_3 0x43148 # define SVM_EXIT_EXCEPTION_4 0x44149 # define SVM_EXIT_EXCEPTION_5 0x45150 # define SVM_EXIT_EXCEPTION_6 0x46151 # define SVM_EXIT_EXCEPTION_7 0x47152 # define SVM_EXIT_EXCEPTION_8 0x48153 # define SVM_EXIT_EXCEPTION_9 0x49154 # define SVM_EXIT_EXCEPTION_A 0x4A155 # define SVM_EXIT_EXCEPTION_B 0x4B156 # define SVM_EXIT_EXCEPTION_C 0x4C157 # define SVM_EXIT_EXCEPTION_D 0x4D158 # define SVM_EXIT_EXCEPTION_E 0x4E159 # define SVM_EXIT_EXCEPTION_F 0x4F160 # define SVM_EXIT_EXCEPTION_10 0x50161 # define SVM_EXIT_EXCEPTION_11 0x51162 # define SVM_EXIT_EXCEPTION_12 0x52163 # define SVM_EXIT_EXCEPTION_13 0x53164 # define SVM_EXIT_EXCEPTION_14 0x54165 # define SVM_EXIT_EXCEPTION_15 0x55166 # define SVM_EXIT_EXCEPTION_16 0x56167 # define SVM_EXIT_EXCEPTION_17 0x57168 # define SVM_EXIT_EXCEPTION_18 0x58169 # define SVM_EXIT_EXCEPTION_19 0x59170 # define SVM_EXIT_EXCEPTION_1A 0x5A171 # define SVM_EXIT_EXCEPTION_1B 0x5B172 # define SVM_EXIT_EXCEPTION_1C 0x5C173 # define SVM_EXIT_EXCEPTION_1D 0x5D174 # define SVM_EXIT_EXCEPTION_1E 0x5E175 # define SVM_EXIT_EXCEPTION_1F 0x5F150 # define SVM_EXIT_EXCEPTION_0 0x40 151 # define SVM_EXIT_EXCEPTION_1 0x41 152 # define SVM_EXIT_EXCEPTION_2 0x42 153 # define SVM_EXIT_EXCEPTION_3 0x43 154 # define SVM_EXIT_EXCEPTION_4 0x44 155 # define SVM_EXIT_EXCEPTION_5 0x45 156 # define SVM_EXIT_EXCEPTION_6 0x46 157 # define SVM_EXIT_EXCEPTION_7 0x47 158 # define SVM_EXIT_EXCEPTION_8 0x48 159 # define SVM_EXIT_EXCEPTION_9 0x49 160 # define SVM_EXIT_EXCEPTION_A 0x4A 161 # define SVM_EXIT_EXCEPTION_B 0x4B 162 # define SVM_EXIT_EXCEPTION_C 0x4C 163 # define SVM_EXIT_EXCEPTION_D 0x4D 164 # define SVM_EXIT_EXCEPTION_E 0x4E 165 # define SVM_EXIT_EXCEPTION_F 0x4F 166 # define SVM_EXIT_EXCEPTION_10 0x50 167 # define SVM_EXIT_EXCEPTION_11 0x51 168 # define SVM_EXIT_EXCEPTION_12 0x52 169 # define SVM_EXIT_EXCEPTION_13 0x53 170 # define SVM_EXIT_EXCEPTION_14 0x54 171 # define SVM_EXIT_EXCEPTION_15 0x55 172 # define SVM_EXIT_EXCEPTION_16 0x56 173 # define SVM_EXIT_EXCEPTION_17 0x57 174 # define SVM_EXIT_EXCEPTION_18 0x58 175 # define SVM_EXIT_EXCEPTION_19 0x59 176 # define SVM_EXIT_EXCEPTION_1A 0x5A 177 # define SVM_EXIT_EXCEPTION_1B 0x5B 178 # define SVM_EXIT_EXCEPTION_1C 0x5C 179 # define SVM_EXIT_EXCEPTION_1D 0x5D 180 # define SVM_EXIT_EXCEPTION_1E 0x5E 181 # define SVM_EXIT_EXCEPTION_1F 0x5F 176 182 /** Physical maskable interrupt. */ 177 # define SVM_EXIT_INTR 0x60183 # define SVM_EXIT_INTR 0x60 178 184 /** Non-maskable interrupt. */ 179 # define SVM_EXIT_NMI 0x61185 # define SVM_EXIT_NMI 0x61 180 186 /** System Management interrupt. */ 181 # define SVM_EXIT_SMI 0x62187 # define SVM_EXIT_SMI 0x62 182 188 /** Physical INIT signal. */ 183 # define SVM_EXIT_INIT 0x63189 # define SVM_EXIT_INIT 0x63 184 190 /** Virtual interrupt. */ 185 # define SVM_EXIT_VINTR 0x64191 # define SVM_EXIT_VINTR 0x64 186 192 /** Write to CR0 that changed any bits other than CR0.TS or CR0.MP. */ 187 # define SVM_EXIT_CR0_SEL_WRITE 0x65193 # define SVM_EXIT_CR0_SEL_WRITE 0x65 188 194 /** IDTR read. */ 189 # define SVM_EXIT_IDTR_READ 0x66195 # define SVM_EXIT_IDTR_READ 0x66 190 196 /** GDTR read. */ 191 # define SVM_EXIT_GDTR_READ 0x67197 # define SVM_EXIT_GDTR_READ 0x67 192 198 /** LDTR read. */ 193 # define SVM_EXIT_LDTR_READ 0x68199 # define SVM_EXIT_LDTR_READ 0x68 194 200 /** TR read. */ 195 # define SVM_EXIT_TR_READ 0x69201 # define SVM_EXIT_TR_READ 0x69 196 202 /** IDTR write. */ 197 # define SVM_EXIT_IDTR_WRITE 0x6A203 # define SVM_EXIT_IDTR_WRITE 0x6A 198 204 /** GDTR write. */ 199 # define SVM_EXIT_GDTR_WRITE 0x6B205 # define SVM_EXIT_GDTR_WRITE 0x6B 200 206 /** LDTR write. */ 201 # define SVM_EXIT_LDTR_WRITE 0x6C207 # define SVM_EXIT_LDTR_WRITE 0x6C 202 208 /** TR write. */ 203 # define SVM_EXIT_TR_WRITE 0x6D209 # define SVM_EXIT_TR_WRITE 0x6D 204 210 /** RDTSC instruction. */ 205 # define SVM_EXIT_RDTSC 0x6E211 # define SVM_EXIT_RDTSC 0x6E 206 212 /** RDPMC instruction. */ 207 # define SVM_EXIT_RDPMC 0x6F213 # define SVM_EXIT_RDPMC 0x6F 208 214 /** PUSHF instruction. */ 209 # define SVM_EXIT_PUSHF 0x70215 # define SVM_EXIT_PUSHF 0x70 210 216 /** POPF instruction. */ 211 # define SVM_EXIT_POPF 0x71217 # define SVM_EXIT_POPF 0x71 212 218 /** CPUID instruction. */ 213 # define SVM_EXIT_CPUID 0x72219 # define SVM_EXIT_CPUID 0x72 214 220 /** RSM instruction. */ 215 # define SVM_EXIT_RSM 0x73221 # define SVM_EXIT_RSM 0x73 216 222 /** IRET instruction. */ 217 # define SVM_EXIT_IRET 0x74223 # define SVM_EXIT_IRET 0x74 218 224 /** software interrupt (INTn instructions). */ 219 # define SVM_EXIT_SWINT 0x75225 # define SVM_EXIT_SWINT 0x75 220 226 /** INVD instruction. */ 221 # define SVM_EXIT_INVD 0x76227 # define SVM_EXIT_INVD 0x76 222 228 /** PAUSE instruction. */ 223 # define SVM_EXIT_PAUSE 0x77229 # define SVM_EXIT_PAUSE 0x77 224 230 /** HLT instruction. */ 225 # define SVM_EXIT_HLT 0x78231 # define SVM_EXIT_HLT 0x78 226 232 /** INVLPG instructions. */ 227 # define SVM_EXIT_INVLPG 0x79233 # define SVM_EXIT_INVLPG 0x79 228 234 /** INVLPGA instruction. */ 229 # define SVM_EXIT_INVLPGA 0x7A235 # define SVM_EXIT_INVLPGA 0x7A 230 236 /** IN or OUT accessing protected port (the EXITINFO1 field provides more information). */ 231 # define SVM_EXIT_IOIO 0x7B237 # define SVM_EXIT_IOIO 0x7B 232 238 /** RDMSR or WRMSR access to protected MSR. */ 233 # define SVM_EXIT_MSR 0x7C239 # define SVM_EXIT_MSR 0x7C 234 240 /** task switch. */ 235 # define SVM_EXIT_TASK_SWITCH 0x7D241 # define SVM_EXIT_TASK_SWITCH 0x7D 236 242 /** FP legacy handling enabled, and processor is frozen in an x87/mmx instruction waiting for an interrupt. */ 237 # define SVM_EXIT_FERR_FREEZE 0x7E243 # define SVM_EXIT_FERR_FREEZE 0x7E 238 244 /** Shutdown. */ 239 # define SVM_EXIT_SHUTDOWN 0x7F245 # define SVM_EXIT_SHUTDOWN 0x7F 240 246 /** VMRUN instruction. */ 241 # define SVM_EXIT_VMRUN 0x80247 # define SVM_EXIT_VMRUN 0x80 242 248 /** VMMCALL instruction. */ 243 # define SVM_EXIT_VMMCALL 0x81249 # define SVM_EXIT_VMMCALL 0x81 244 250 /** VMLOAD instruction. */ 245 # define SVM_EXIT_VMLOAD 0x82251 # define SVM_EXIT_VMLOAD 0x82 246 252 /** VMSAVE instruction. */ 247 # define SVM_EXIT_VMSAVE 0x83253 # define SVM_EXIT_VMSAVE 0x83 248 254 /** STGI instruction. */ 249 # define SVM_EXIT_STGI 0x84255 # define SVM_EXIT_STGI 0x84 250 256 /** CLGI instruction. */ 251 # define SVM_EXIT_CLGI 0x85257 # define SVM_EXIT_CLGI 0x85 252 258 /** SKINIT instruction. */ 253 # define SVM_EXIT_SKINIT 0x86259 # define SVM_EXIT_SKINIT 0x86 254 260 /** RDTSCP instruction. */ 255 # define SVM_EXIT_RDTSCP 0x87261 # define SVM_EXIT_RDTSCP 0x87 256 262 /** ICEBP instruction. */ 257 # define SVM_EXIT_ICEBP 0x88263 # define SVM_EXIT_ICEBP 0x88 258 264 /** WBINVD instruction. */ 259 # define SVM_EXIT_WBINVD 0x89265 # define SVM_EXIT_WBINVD 0x89 260 266 /** MONITOR instruction. */ 261 # define SVM_EXIT_MONITOR 0x8A267 # define SVM_EXIT_MONITOR 0x8A 262 268 /** MWAIT instruction. */ 263 # define SVM_EXIT_MWAIT 0x8B269 # define SVM_EXIT_MWAIT 0x8B 264 270 /** MWAIT instruction, when armed. */ 265 # define SVM_EXIT_MWAIT_ARMED 0x8C271 # define SVM_EXIT_MWAIT_ARMED 0x8C 266 272 /** XSETBV instruction. */ 267 # define SVM_EXIT_XSETBV 0x8D273 # define SVM_EXIT_XSETBV 0x8D 268 274 /** Nested paging: host-level page fault occurred (EXITINFO1 contains fault errorcode; EXITINFO2 contains the guest physical address causing the fault). */ 269 # define SVM_EXIT_NPF 0x400275 # define SVM_EXIT_NPF 0x400 270 276 /** AVIC: Virtual IPI delivery not completed. */ 271 # define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401277 # define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 272 278 /** AVIC: Attempted access by guest to a vAPIC register not handled by AVIC 273 279 * hardware. */ 274 #define SVM_EXIT_AVIC_NOACCEL 0x402 275 280 # define SVM_EXIT_AVIC_NOACCEL 0x402 276 281 /** The maximum possible exit value. */ 277 #define SVM_EXIT_MAX (SVM_EXIT_AVIC_NOACCEL) 278 /** @} */ 282 # define SVM_EXIT_MAX (SVM_EXIT_AVIC_NOACCEL) 283 /** @} */ 284 #endif /* !IN_REM_R3*/ 279 285 280 286 … … 283 289 */ 284 290 /** Set to 1 if the task switch was caused by an IRET; else cleared to 0. */ 285 # define SVM_EXIT2_TASK_SWITCH_IRET RT_BIT_64(36)291 # define SVM_EXIT2_TASK_SWITCH_IRET RT_BIT_64(36) 286 292 /** Set to 1 if the task switch was caused by a far jump; else cleared to 0. */ 287 # define SVM_EXIT2_TASK_SWITCH_JMP RT_BIT_64(38)293 # define SVM_EXIT2_TASK_SWITCH_JMP RT_BIT_64(38) 288 294 /** Set to 1 if the task switch has an error code; else cleared to 0. */ 289 # define SVM_EXIT2_TASK_SWITCH_HAS_ERROR_CODE RT_BIT_64(44)295 # define SVM_EXIT2_TASK_SWITCH_HAS_ERROR_CODE RT_BIT_64(44) 290 296 /** The value of EFLAGS.RF that would be saved in the outgoing TSS if the task switch were not intercepted. */ 291 # define SVM_EXIT2_TASK_SWITCH_EFLAGS_RF RT_BIT_64(48)297 # define SVM_EXIT2_TASK_SWITCH_EFLAGS_RF RT_BIT_64(48) 292 298 /** @} */ 293 299 … … 296 302 */ 297 303 /** The access was a read MSR. */ 298 # define SVM_EXIT1_MSR_READ 0x0304 # define SVM_EXIT1_MSR_READ 0x0 299 305 /** The access was a write MSR. */ 300 # define SVM_EXIT1_MSR_WRITE 0x1306 # define SVM_EXIT1_MSR_WRITE 0x1 301 307 /** @} */ 302 308 -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r66015 r66040 179 179 * 180 180 * @returns Strict VBox status code (i.e. informational status codes too). 181 *182 181 * @param pVCpu The cross context virtual CPU structure. 183 182 * @param pCtx Pointer to the guest-CPU context. 184 * @param pVmcb The VMCB of the nested-guest. 185 * @param pHostState The host-state save area in the guest. 186 */ 187 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmrun(PVMCPU pVCpu, PCPUMCTX pCtx, PSVMVMCB pVmcb, PSVMHOSTSTATE pHostState) 188 { 189 Assert(pHostState); 190 Assert(pVmcb); 191 192 /* 193 * Save host state. 194 */ 195 pHostState->es = pCtx->es; 196 pHostState->cs = pCtx->cs; 197 pHostState->ss = pCtx->ss; 198 pHostState->ds = pCtx->ds; 199 pHostState->gdtr = pCtx->gdtr; 200 pHostState->idtr = pCtx->idtr; 201 pHostState->uEferMsr = pCtx->msrEFER; 202 pHostState->uCr0 = pCtx->cr0; 203 pHostState->uCr3 = pCtx->cr3; 204 pHostState->uCr4 = pCtx->cr4; 205 pHostState->rflags = pCtx->rflags; 206 pHostState->uRip = pCtx->rip; 207 pHostState->uRsp = pCtx->rsp; 208 pHostState->uRax = pCtx->rax; 209 210 /* 211 * Load controls from VMCB. 212 */ 213 pCtx->hwvirt.svm.u16InterceptRdCRx = pVmcb->ctrl.u16InterceptRdCRx; 214 pCtx->hwvirt.svm.u16InterceptWrCRx = pVmcb->ctrl.u16InterceptWrCRx; 215 pCtx->hwvirt.svm.u16InterceptRdDRx = pVmcb->ctrl.u16InterceptRdDRx; 216 pCtx->hwvirt.svm.u16InterceptWrDRx = pVmcb->ctrl.u16InterceptWrDRx; 217 pCtx->hwvirt.svm.u64InterceptCtrl = pVmcb->ctrl.u64InterceptCtrl; 218 pCtx->hwvirt.svm.u32InterceptXcpt = pVmcb->ctrl.u32InterceptXcpt; 219 if (!(pVmcb->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_VMRUN)) 220 { 221 Log(("HMSvmVmRun: VMRUN instruction not intercepted -> #VMEXIT\n")); 222 return HMSvmNstGstVmExit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 223 } 224 if (!pVmcb->ctrl.TLBCtrl.n.u32ASID) 225 { 226 Log(("HMSvmVmRun: Guest ASID is invalid -> #VMEXIT\n")); 227 return HMSvmNstGstVmExit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 228 } 229 230 231 /** @todo the rest. */ 232 233 return VERR_NOT_IMPLEMENTED; 183 * @param GCPhysVmcb Guest physical address of the VMCB to run. 184 */ 185 VMM_INT_DECL(VBOXSTRICTRC) HMSvmVmrun(PVMCPU pVCpu, PCPUMCTX pCtx, RTGCPHYS GCPhysVmcb) 186 { 187 Assert(pVCpu); 188 Assert(pCtx); 189 190 /* 191 * Cache the physical address of the VMCB for #VMEXIT exceptions. 192 */ 193 pCtx->hwvirt.svm.GCPhysVmcb = GCPhysVmcb; 194 195 SVMVMCB Vmcb; 196 PVM pVM = pVCpu->CTX_SUFF(pVM); 197 int rc = PGMPhysSimpleReadGCPhys(pVM, &Vmcb, GCPhysVmcb, X86_PAGE_4K_SIZE); 198 if (RT_SUCCESS(rc)) 199 { 200 /* 201 * Save host state. 202 */ 203 PSVMHOSTSTATE pHostState = &pCtx->hwvirt.svm.HostState; 204 pHostState->es = pCtx->es; 205 pHostState->cs = pCtx->cs; 206 pHostState->ss = pCtx->ss; 207 pHostState->ds = pCtx->ds; 208 pHostState->gdtr = pCtx->gdtr; 209 pHostState->idtr = pCtx->idtr; 210 pHostState->uEferMsr = pCtx->msrEFER; 211 pHostState->uCr0 = pCtx->cr0; 212 pHostState->uCr3 = pCtx->cr3; 213 pHostState->uCr4 = pCtx->cr4; 214 pHostState->rflags = pCtx->rflags; 215 pHostState->uRip = pCtx->rip; 216 pHostState->uRsp = pCtx->rsp; 217 pHostState->uRax = pCtx->rax; 218 219 /* 220 * Cache the VMCB controls. 221 */ 222 pCtx->hwvirt.svm.VmcbCtrl = Vmcb.ctrl; 223 224 /* 225 * Validate the VMCB controls. 226 */ 227 if (!CPUMIsGuestSvmCtrlInterceptSet(pCtx, SVM_CTRL_INTERCEPT_VMRUN)) 228 { 229 Log(("HMSvmVmRun: VMRUN instruction not intercepted -> #VMEXIT\n")); 230 return HMSvmNstGstVmExit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 231 } 232 if ( pCtx->hwvirt.svm.VmcbCtrl.NestedPaging.n.u1NestedPaging 233 && !pVM->cpum.ro.GuestFeatures.svm.feat.n.fNestedPaging) 234 { 235 Log(("HMSvmVmRun: Nested paging not supported -> #VMEXIT\n")); 236 return HMSvmNstGstVmExit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 237 } 238 if (!pCtx->hwvirt.svm.VmcbCtrl.TLBCtrl.n.u32ASID) 239 { 240 Log(("HMSvmVmRun: Guest ASID is invalid -> #VMEXIT\n")); 241 return HMSvmNstGstVmExit(pVCpu, pCtx, SVM_EXIT_INVALID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 242 } 243 244 /** @todo the rest. */ 245 246 return VERR_NOT_IMPLEMENTED; 247 } 248 249 return rc; 234 250 } 235 251 -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r66015 r66040 5900 5900 #endif 5901 5901 5902 void *pvVmcb; 5903 PGMPAGEMAPLOCK PgLockVmcb; 5904 VBOXSTRICTRC rcStrict = iemMemPageMap(pVCpu, GCPhysVmcb, IEM_ACCESS_DATA_RW, &pvVmcb, &PgLockVmcb); 5905 if (rcStrict == VINF_SUCCESS) 5906 { 5907 pCtx->hwvirt.svm.GCPhysNstGstVmcb = GCPhysVmcb; 5908 5909 RTGCPHYS GCPhysHostState = pCtx->hwvirt.svm.uMsrHSavePa; 5910 /** @todo SVM does not validate the host-state area beyond checking the 5911 * alignment and range of the physical address. Nothing to prevent users 5912 * from using MMIO or other weird stuff in which case anything might 5913 * happen. */ 5914 void *pvHostState; 5915 PGMPAGEMAPLOCK PgLockHostState; 5916 rcStrict = iemMemPageMap(pVCpu, GCPhysHostState, IEM_ACCESS_DATA_RW, &pvHostState, &PgLockHostState); 5917 if (rcStrict == VINF_SUCCESS) 5918 { 5919 PSVMHOSTSTATE pHostState = (PSVMHOSTSTATE)pvHostState; 5920 PSVMVMCB pVmcb = (PSVMVMCB)pvVmcb; 5921 rcStrict = HMSvmVmrun(pVCpu, pCtx, pVmcb, pHostState); 5922 5923 iemMemPageUnmap(pVCpu, GCPhysHostState, IEM_ACCESS_DATA_RW, pvHostState, &PgLockHostState); 5924 } 5925 iemMemPageUnmap(pVCpu, GCPhysVmcb, IEM_ACCESS_DATA_RW, pvVmcb, &PgLockVmcb); 5926 } 5902 rcStrict = HMSvmVmrun(pVCpu, pCtx, ); 5927 5903 RT_NOREF(cbInstr); 5928 5904 return rcStrict; -
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r65905 r66040 1680 1680 pFeatures->fXop = RT_BOOL(pExtLeaf->uEcx & X86_CPUID_AMD_FEATURE_ECX_XOP); 1681 1681 pFeatures->fSvm = RT_BOOL(pExtLeaf->uEcx & X86_CPUID_AMD_FEATURE_ECX_SVM); 1682 if (pFeatures->fSvm) 1683 { 1684 PCCPUMCPUIDLEAF pSvmLeaf = cpumR3CpuIdFindLeaf(paLeaves, cLeaves, 0x8000000a); 1685 AssertLogRelReturn(pSvmLeaf, VERR_CPUM_IPE_1); 1686 pFeatures->svm.feat.u = pSvmLeaf->uEdx; 1687 pFeatures->svm.uMaxAsid = pSvmLeaf->uEbx; 1688 } 1682 1689 } 1683 1690 … … 3363 3370 pSvmFeatureLeaf->uEbx = 0x8000; /** @todo figure out virtual NASID. */ 3364 3371 pSvmFeatureLeaf->uEcx = 0; 3365 pSvmFeatureLeaf->uEdx = 0; /** @todo Support SVM features */3372 pSvmFeatureLeaf->uEdx = 0; /** @todo Support SVM features */ 3366 3373 } 3367 3374 else -
trunk/src/VBox/VMM/include/CPUMInternal.mac
r66000 r66040 231 231 .Guest.abPadding resb 12 232 232 %endif 233 .Guest.hwvirt.svm.uMsrHSavePa resq 1 234 .Guest.hwvirt.svm.u64InterceptCtrl resq 1 235 .Guest.hwvirt.svm.u32InterceptXcpt resd 1 236 .Guest.hwvirt.svm.u16InterceptRdCRx resw 1 237 .Guest.hwvirt.svm.u16InterceptWrCRx resw 1 238 .Guest.hwvirt.svm.u16InterceptRdDRx resw 1 239 .Guest.hwvirt.svm.u16InterceptWrDRx resw 1 240 .Guest.hwvirt.svm.fGif resb 1 241 .Guest.hwvirt.svm.abPadding resb 3 242 .Guest.hwvirt.svm.GCPhysNstGstVmcb resq 1 233 .Guest.hwvirt.svm.uMsrHSavePa resq 1 234 .Guest.hwvirt.svm.GCPhysVmcb resq 1 235 .Guest.hwvirt.svm.VmcbCtrl resb 256 236 .Guest.hwvirt.svm.HostState resb 184 237 .Guest.hwvirt.svm.fGif resb 1 243 238 alignb 64 244 239 … … 504 499 .Hyper.abPadding resb 12 505 500 %endif 506 .Hyper.hwvirt.svm.uMsrHSavePa resq 1 507 .Hyper.hwvirt.svm.u64InterceptCtrl resq 1 508 .Hyper.hwvirt.svm.u32InterceptXcpt resd 1 509 .Hyper.hwvirt.svm.u16InterceptRdCRx resw 1 510 .Hyper.hwvirt.svm.u16InterceptWrCRx resw 1 511 .Hyper.hwvirt.svm.u16InterceptRdDRx resw 1 512 .Hyper.hwvirt.svm.u16InterceptWrDRx resw 1 513 .Hyper.hwvirt.svm.fGif resb 1 514 .Hyper.hwvirt.svm.abPadding resb 3 515 .Hyper.hwvirt.svm.GCPhysNstGstVmcb resq 1 501 .Hyper.hwvirt.svm.uMsrHSavePa resq 1 502 .Hyper.hwvirt.svm.GCPhysVmcb resq 1 503 .Hyper.hwvirt.svm.VmcbCtrl resb 256 504 .Hyper.hwvirt.svm.HostState resb 184 505 .Hyper.hwvirt.svm.fGif resb 1 516 506 alignb 64 517 507 -
trunk/src/VBox/VMM/testcase/tstVMStruct.h
r65904 r66040 133 133 GEN_CHECK_OFF(CPUMCTX, hwvirt); 134 134 GEN_CHECK_OFF(CPUMCTX, hwvirt.svm.uMsrHSavePa); 135 GEN_CHECK_OFF(CPUMCTX, hwvirt.svm.GCPhysVmcb); 136 GEN_CHECK_OFF(CPUMCTX, hwvirt.svm.VmcbCtrl); 137 GEN_CHECK_OFF(CPUMCTX, hwvirt.svm.HostState); 135 138 GEN_CHECK_OFF(CPUMCTX, hwvirt.svm.fGif); 136 139 /** @todo add rest of hwvirt fields when code is more
Note:
See TracChangeset
for help on using the changeset viewer.