Changeset 41318 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- May 15, 2012 3:42:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r41314 r41318 1330 1330 Assert(pCtx); 1331 1331 1332 u32TrapMask = HWACCM_VMX_TRAP_MASK; 1333 #ifndef DEBUG 1334 if (pVM->hwaccm.s.fNestedPaging) 1335 u32TrapMask &= ~RT_BIT(X86_XCPT_PF); /* no longer need to intercept #PF. */ 1336 #endif 1332 /* Set up a mask for intercepting traps. */ 1333 /** @todo Do we really need to always intercept #DB? */ 1334 u32TrapMask = RT_BIT(X86_XCPT_DB) 1335 | RT_BIT(X86_XCPT_NM) 1336 #ifdef VBOX_ALWAYS_TRAP_PF 1337 | RT_BIT(X86_XCPT_PF) 1338 #endif 1339 #ifdef VBOX_STRICT 1340 | RT_BIT(X86_XCPT_BP) 1341 | RT_BIT(X86_XCPT_DB) 1342 | RT_BIT(X86_XCPT_DE) 1343 | RT_BIT(X86_XCPT_NM) 1344 | RT_BIT(X86_XCPT_PF) 1345 | RT_BIT(X86_XCPT_UD) 1346 | RT_BIT(X86_XCPT_NP) 1347 | RT_BIT(X86_XCPT_SS) 1348 | RT_BIT(X86_XCPT_GP) 1349 | RT_BIT(X86_XCPT_MF) 1350 #endif 1351 ; 1352 1353 /** @todo NP state won't change so maybe we should build the initial trap mask up front? */ 1354 /* Without nested paging, #PF must be intercepted to implement shadow paging. */ 1355 if (!pVM->hwaccm.s.fNestedPaging) 1356 u32TrapMask |= RT_BIT(X86_XCPT_PF); 1337 1357 1338 1358 /* Also catch floating point exceptions if we need to report them to the guest in a different way. */ … … 1347 1367 1348 1368 /* Intercept all exceptions in real mode as none of them can be injected directly (#GP otherwise). */ 1369 /** @todo Despite the claim to intercept everything, with NP we do not intercept #PF. Should we? */ 1349 1370 if ( CPUMIsGuestInRealModeEx(pCtx) 1350 1371 && pVM->hwaccm.s.vmx.pRealModeTSS) 1351 u32TrapMask |= HWACCM_VMX_TRAP_MASK_REALMODE; 1372 u32TrapMask |= RT_BIT(X86_XCPT_DE) 1373 | RT_BIT(X86_XCPT_DB) 1374 | RT_BIT(X86_XCPT_NMI) 1375 | RT_BIT(X86_XCPT_BP) 1376 | RT_BIT(X86_XCPT_OF) 1377 | RT_BIT(X86_XCPT_BR) 1378 | RT_BIT(X86_XCPT_UD) 1379 | RT_BIT(X86_XCPT_DF) 1380 | RT_BIT(X86_XCPT_CO_SEG_OVERRUN) 1381 | RT_BIT(X86_XCPT_TS) 1382 | RT_BIT(X86_XCPT_NP) 1383 | RT_BIT(X86_XCPT_SS) 1384 | RT_BIT(X86_XCPT_GP) 1385 | RT_BIT(X86_XCPT_MF) 1386 | RT_BIT(X86_XCPT_AC) 1387 | RT_BIT(X86_XCPT_MC) 1388 | RT_BIT(X86_XCPT_XF) 1389 ; 1352 1390 1353 1391 int rc = VMXWriteVMCS(VMX_VMCS_CTRL_EXCEPTION_BITMAP, u32TrapMask); … … 3054 3092 case X86_XCPT_PF: /* Page fault */ 3055 3093 { 3056 #ifdef DEBUG3094 #ifdef VBOX_ALWAYS_TRAP_PF 3057 3095 if (pVM->hwaccm.s.fNestedPaging) 3058 3096 { /* A genuine pagefault.
Note:
See TracChangeset
for help on using the changeset viewer.