Changeset 47660 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Aug 12, 2013 12:37:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r47652 r47660 317 317 318 318 319 /** @MAYBE_LOAD_DRx 320 * Macro for updating DRx values in raw-mode and ring-0 contexts. 321 */ 322 #ifdef IN_RING0 323 # if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) 324 # ifndef VBOX_WITH_HYBRID_32BIT_KERNEL 325 # define MAYBE_LOAD_DRx(a_pVCpu, a_fnLoad, a_uValue) \ 326 do { \ 327 if (!CPUMIsGuestInLongModeEx(&(a_pVCpu)->cpum.s.Guest)) \ 328 a_fnLoad(a_uValue); \ 329 else \ 330 (a_pVCpu)->cpum.s.fUseFlags |= CPUM_SYNC_DEBUG_REGS_HYPER; \ 331 } while (0) 332 # else 333 # define MAYBE_LOAD_DRx(a_pVCpu, a_fnLoad, a_uValue) \ 334 do { \ 335 /** @todo we're not loading the correct guest value here! */ \ 336 a_fnLoad(a_uValue); \ 337 } while (0) 338 # endif 339 # else 340 # define MAYBE_LOAD_DRx(a_pVCpu, a_fnLoad, a_uValue) \ 341 do { \ 342 a_fnLoad(a_uValue); \ 343 } while (0) 344 # endif 345 346 #elif defined(IN_RC) 347 # define MAYBE_LOAD_DRx(a_pVCpu, a_fnLoad, a_uValue) \ 348 do { \ 349 if ((a_pVCpu)->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER) \ 350 { a_fnLoad(a_uValue); } \ 351 } while (0) 352 353 #else 354 # define MAYBE_LOAD_DRx(a_pVCpu, a_fnLoad, a_uValue) do { } while (0) 355 #endif 356 319 357 VMMDECL(void) CPUMSetHyperDR0(PVMCPU pVCpu, RTGCUINTREG uDr0) 320 358 { 321 359 pVCpu->cpum.s.Hyper.dr[0] = uDr0; 322 /** @todo in GC we must load it! */360 MAYBE_LOAD_DRx(pVCpu, ASMSetDR0, uDr0); 323 361 } 324 362 … … 327 365 { 328 366 pVCpu->cpum.s.Hyper.dr[1] = uDr1; 329 /** @todo in GC we must load it! */367 MAYBE_LOAD_DRx(pVCpu, ASMSetDR1, uDr1); 330 368 } 331 369 … … 334 372 { 335 373 pVCpu->cpum.s.Hyper.dr[2] = uDr2; 336 /** @todo in GC we must load it! */374 MAYBE_LOAD_DRx(pVCpu, ASMSetDR2, uDr2); 337 375 } 338 376 … … 341 379 { 342 380 pVCpu->cpum.s.Hyper.dr[3] = uDr3; 343 /** @todo in GC we must load it! */381 MAYBE_LOAD_DRx(pVCpu, ASMSetDR3, uDr3); 344 382 } 345 383 … … 348 386 { 349 387 pVCpu->cpum.s.Hyper.dr[6] = uDr6; 350 /** @todo in GC we must load it! */351 388 } 352 389 … … 355 392 { 356 393 pVCpu->cpum.s.Hyper.dr[7] = uDr7; 357 /** @todo in GC we must load it! */ 394 #ifdef IN_RC 395 MAYBE_LOAD_DRx(pVCpu, ASMSetDR7, uDr7); 396 #endif 358 397 } 359 398 … … 2118 2157 { 2119 2158 pVCpu->cpum.s.Guest.dr[0] = uDr0; 2120 return CPUMRecalcHyperDRx(pVCpu );2159 return CPUMRecalcHyperDRx(pVCpu, 0); 2121 2160 } 2122 2161 … … 2125 2164 { 2126 2165 pVCpu->cpum.s.Guest.dr[1] = uDr1; 2127 return CPUMRecalcHyperDRx(pVCpu );2166 return CPUMRecalcHyperDRx(pVCpu, 1); 2128 2167 } 2129 2168 … … 2132 2171 { 2133 2172 pVCpu->cpum.s.Guest.dr[2] = uDr2; 2134 return CPUMRecalcHyperDRx(pVCpu );2173 return CPUMRecalcHyperDRx(pVCpu, 2); 2135 2174 } 2136 2175 … … 2139 2178 { 2140 2179 pVCpu->cpum.s.Guest.dr[3] = uDr3; 2141 return CPUMRecalcHyperDRx(pVCpu );2180 return CPUMRecalcHyperDRx(pVCpu, 3); 2142 2181 } 2143 2182 … … 2146 2185 { 2147 2186 pVCpu->cpum.s.Guest.dr[6] = uDr6; 2148 return CPUMRecalcHyperDRx(pVCpu);2187 return VINF_SUCCESS; /* No need to recalc. */ 2149 2188 } 2150 2189 … … 2153 2192 { 2154 2193 pVCpu->cpum.s.Guest.dr[7] = uDr7; 2155 return CPUMRecalcHyperDRx(pVCpu );2194 return CPUMRecalcHyperDRx(pVCpu, 7); 2156 2195 } 2157 2196 … … 2164 2203 iReg += 2; 2165 2204 pVCpu->cpum.s.Guest.dr[iReg] = Value; 2166 return CPUMRecalcHyperDRx(pVCpu); 2167 } 2168 2169 2170 /** 2171 * Recalculates the hypervisor DRx register values based on 2172 * current guest registers and DBGF breakpoints. 2173 * 2174 * This is called whenever a guest DRx register is modified and when DBGF 2175 * sets a hardware breakpoint. In guest context this function will reload 2176 * any (hyper) DRx registers which comes out with a different value. 2205 return CPUMRecalcHyperDRx(pVCpu, iReg); 2206 } 2207 2208 2209 /** 2210 * Recalculates the hypervisor DRx register values based on current guest 2211 * registers and DBGF breakpoints, updating changed registers depending on the 2212 * context. 2213 * 2214 * This is called whenever a guest DRx register is modified (any context) and 2215 * when DBGF sets a hardware breakpoint (ring-3 only, rendezvous). 2216 * 2217 * In raw-mode context this function will reload any (hyper) DRx registers which 2218 * comes out with a different value. It may also have to save the host debug 2219 * registers if that haven't been done already. In this context though, we'll 2220 * be intercepting and emulating all DRx accesses, so the hypervisor DRx values 2221 * are only important when breakpoints are actually enabled. 2222 * 2223 * In ring-0 (HM) context DR0-3 will be relocated by us, while DR7 will be 2224 * reloaded by the HM code if it changes. Further more, we will only use the 2225 * combined register set when the VBox debugger is actually using hardware BPs, 2226 * when it isn't we'll keep the guest DR0-3 + (maybe) DR6 loaded (DR6 doesn't 2227 * concern us here). 2228 * 2229 * In ring-3 we won't be loading anything, so well calculate hypervisor values 2230 * all the time. 2177 2231 * 2178 2232 * @returns VINF_SUCCESS. 2179 2233 * @param pVCpu Pointer to the VMCPU. 2180 */ 2181 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPU pVCpu) 2234 * @param iGstReg The guest debug register number that was modified. 2235 * UINT8_MAX if not guest register. 2236 */ 2237 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPU pVCpu, uint8_t iGstReg) 2182 2238 { 2183 2239 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 2186 2242 * Compare the DR7s first. 2187 2243 * 2188 * We only care about the enabled flags. The GE and LE flags are always 2189 * set and we don't care if the guest doesn't set them. GD is virtualized 2190 * when we dispatch #DB, we never enable it. 2244 * We only care about the enabled flags. GD is virtualized when we 2245 * dispatch the #DB, we never enable it. The DBGF DR7 value is will 2246 * always have the LE and GE bits set, so no need to check and disable 2247 * stuff if they're cleared like we have to for the guest DR7. 2191 2248 */ 2249 RTGCUINTREG uGstDr7 = CPUMGetGuestDR7(pVCpu); 2250 if (!(uGstDr7 & (X86_DR7_LE | X86_DR7_GE))) 2251 uGstDr7 = 0; 2252 else if (!(uGstDr7 & X86_DR7_LE)) 2253 uGstDr7 &= ~X86_DR7_LE_ALL; 2254 else if (!(uGstDr7 & X86_DR7_GE)) 2255 uGstDr7 &= ~X86_DR7_GE_ALL; 2256 2192 2257 const RTGCUINTREG uDbgfDr7 = DBGFBpGetDR7(pVM); 2193 #ifdef CPUM_VIRTUALIZE_DRX 2194 const RTGCUINTREG uGstDr7 = CPUMGetGuestDR7(pVCpu); 2195 #else 2196 const RTGCUINTREG uGstDr7 = 0; 2197 #endif 2198 if ((uGstDr7 | uDbgfDr7) & X86_DR7_ENABLED_MASK) 2258 if ((HMIsEnabled(pVCpu->CTX_SUFF(pVM)) ? uDbgfDr7 : (uGstDr7 | uDbgfDr7)) & X86_DR7_ENABLED_MASK) 2199 2259 { 2260 Assert(!CPUMIsGuestDebugStateActive(pVCpu)); 2261 2200 2262 /* 2201 * Ok, something is enabled. Recalc each of the breakpoints. 2202 * Straight forward code, not optimized/minimized in any way. 2263 * Ok, something is enabled. Recalc each of the breakpoints, taking 2264 * the VM debugger ones of the guest ones. In raw-mode context we will 2265 * not allow breakpoints with values inside the hypervisor area. 2203 2266 */ 2204 2267 RTGCUINTREG uNewDr7 = X86_DR7_GE | X86_DR7_LE | X86_DR7_RA1_MASK; … … 2213 2276 else if (uGstDr7 & (X86_DR7_L0 | X86_DR7_G0)) 2214 2277 { 2215 uNewDr7 |= uGstDr7 & (X86_DR7_L0 | X86_DR7_G0 | X86_DR7_RW0_MASK | X86_DR7_LEN0_MASK);2216 2278 uNewDr0 = CPUMGetGuestDR0(pVCpu); 2279 #ifdef IN_RC 2280 if (MMHyperIsInsideArea(pVM, uNewDr0)) 2281 uNewDr0 = 0; 2282 else 2283 #endif 2284 uNewDr7 |= uGstDr7 & (X86_DR7_L0 | X86_DR7_G0 | X86_DR7_RW0_MASK | X86_DR7_LEN0_MASK); 2217 2285 } 2218 2286 else 2219 uNewDr0 = pVCpu->cpum.s.Hyper.dr[0];2287 uNewDr0 = 0; 2220 2288 2221 2289 /* bp 1 */ … … 2228 2296 else if (uGstDr7 & (X86_DR7_L1 | X86_DR7_G1)) 2229 2297 { 2230 uNewDr7 |= uGstDr7 & (X86_DR7_L1 | X86_DR7_G1 | X86_DR7_RW1_MASK | X86_DR7_LEN1_MASK);2231 2298 uNewDr1 = CPUMGetGuestDR1(pVCpu); 2299 #ifdef IN_RC 2300 if (MMHyperIsInsideArea(pVM, uNewDr1)) 2301 uNewDr1 = 0; 2302 else 2303 #endif 2304 uNewDr7 |= uGstDr7 & (X86_DR7_L1 | X86_DR7_G1 | X86_DR7_RW1_MASK | X86_DR7_LEN1_MASK); 2232 2305 } 2233 2306 else 2234 uNewDr1 = pVCpu->cpum.s.Hyper.dr[1];2307 uNewDr1 = 0; 2235 2308 2236 2309 /* bp 2 */ … … 2243 2316 else if (uGstDr7 & (X86_DR7_L2 | X86_DR7_G2)) 2244 2317 { 2245 uNewDr7 |= uGstDr7 & (X86_DR7_L2 | X86_DR7_G2 | X86_DR7_RW2_MASK | X86_DR7_LEN2_MASK);2246 2318 uNewDr2 = CPUMGetGuestDR2(pVCpu); 2319 #ifdef IN_RC 2320 if (MMHyperIsInsideArea(pVM, uNewDr2)) 2321 uNewDr2 = 0; 2322 else 2323 #endif 2324 uNewDr7 |= uGstDr7 & (X86_DR7_L2 | X86_DR7_G2 | X86_DR7_RW2_MASK | X86_DR7_LEN2_MASK); 2247 2325 } 2248 2326 else 2249 uNewDr2 = pVCpu->cpum.s.Hyper.dr[2];2327 uNewDr2 = 0; 2250 2328 2251 2329 /* bp 3 */ … … 2258 2336 else if (uGstDr7 & (X86_DR7_L3 | X86_DR7_G3)) 2259 2337 { 2260 uNewDr7 |= uGstDr7 & (X86_DR7_L3 | X86_DR7_G3 | X86_DR7_RW3_MASK | X86_DR7_LEN3_MASK);2261 2338 uNewDr3 = CPUMGetGuestDR3(pVCpu); 2339 #ifdef IN_RC 2340 if (MMHyperIsInsideArea(pVM, uNewDr3)) 2341 uNewDr3 = 0; 2342 else 2343 #endif 2344 uNewDr7 |= uGstDr7 & (X86_DR7_L3 | X86_DR7_G3 | X86_DR7_RW3_MASK | X86_DR7_LEN3_MASK); 2262 2345 } 2263 2346 else 2264 uNewDr3 = pVCpu->cpum.s.Hyper.dr[3];2347 uNewDr3 = 0; 2265 2348 2266 2349 /* … … 2268 2351 */ 2269 2352 #ifdef IN_RC 2270 if (!(pVCpu->cpum.s.fUseFlags & CPUM_USE_DEBUG_REGS)) 2271 { 2272 /** @todo save host DBx registers. */ 2273 } 2353 /* Make sure to save host registers first. */ 2354 if (!(pVCpu->cpum.s.fUseFlags & (CPUM_USE_DEBUG_REGS_HOST | CPUM_USE_DEBUG_REGS_HYPER))) 2355 { 2356 Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HOST)); 2357 pVCpu->cpum.s.Host.dr6 = ASMGetDR6(); 2358 pVCpu->cpum.s.Host.dr7 = ASMGetDR7(); 2359 pVCpu->cpum.s.fUseFlags |= CPUM_USE_DEBUG_REGS_HYPER; 2360 ASMSetDR6(X86_DR6_INIT_VAL); 2361 } 2362 if (!(pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HOST)) 2363 { 2364 pVCpu->cpum.s.Host.dr0 = ASMGetDR0(); 2365 pVCpu->cpum.s.Host.dr1 = ASMGetDR1(); 2366 pVCpu->cpum.s.Host.dr2 = ASMGetDR2(); 2367 pVCpu->cpum.s.Host.dr3 = ASMGetDR3(); 2368 pVCpu->cpum.s.fUseFlags |= CPUM_USED_DEBUG_REGS_HOST | CPUM_USE_DEBUG_REGS_HYPER | CPUM_USED_DEBUG_REGS_HYPER; 2369 2370 /* We haven't loaded any hyper DRxes yet, so we'll have to load them all now. */ 2371 pVCpu->cpum.s.Hyper.dr[0] = uNewDr0; 2372 ASMSetDR0(uNewDr0); 2373 pVCpu->cpum.s.Hyper.dr[1] = uNewDr1; 2374 ASMSetDR1(uNewDr1); 2375 pVCpu->cpum.s.Hyper.dr[2] = uNewDr2; 2376 ASMSetDR2(uNewDr2); 2377 pVCpu->cpum.s.Hyper.dr[3] = uNewDr3; 2378 ASMSetDR3(uNewDr3); 2379 pVCpu->cpum.s.Hyper.dr[7] = uNewDr7; 2380 ASMSetDR7(uNewDr7); 2381 } 2382 else 2274 2383 #endif 2275 /** @todo Should this not be setting CPUM_USE_DEBUG_REGS_HYPER?2276 * (CPUM_VIRTUALIZE_DRX is never defined). */2277 pVCpu->cpum.s.fUseFlags |= CPUM_USE_DEBUG_REGS;2278 if (uNewDr3 != pVCpu->cpum.s.Hyper.dr[3])2279 CPUMSetHyperDR3(pVCpu, uNewDr3);2280 if (uNewDr2 != pVCpu->cpum.s.Hyper.dr[2])2281 CPUMSetHyperDR2(pVCpu, uNewDr2);2282 if (uNewDr1 != pVCpu->cpum.s.Hyper.dr[1])2283 CPUMSetHyperDR1(pVCpu, uNewDr1);2284 if (uNewDr0 != pVCpu->cpum.s.Hyper.dr[0])2285 CPUMSetHyperDR0(pVCpu, uNewDr0);2286 if (uNewDr7 != pVCpu->cpum.s.Hyper.dr[7])2287 CPUMSetHyperDR7(pVCpu, uNewDr7);2384 { 2385 pVCpu->cpum.s.fUseFlags |= CPUM_USE_DEBUG_REGS_HYPER; 2386 if (uNewDr3 != pVCpu->cpum.s.Hyper.dr[3]) 2387 CPUMSetHyperDR3(pVCpu, uNewDr3); 2388 if (uNewDr2 != pVCpu->cpum.s.Hyper.dr[2]) 2389 CPUMSetHyperDR2(pVCpu, uNewDr2); 2390 if (uNewDr1 != pVCpu->cpum.s.Hyper.dr[1]) 2391 CPUMSetHyperDR1(pVCpu, uNewDr1); 2392 if (uNewDr0 != pVCpu->cpum.s.Hyper.dr[0]) 2393 CPUMSetHyperDR0(pVCpu, uNewDr0); 2394 if (uNewDr7 != pVCpu->cpum.s.Hyper.dr[7]) 2395 CPUMSetHyperDR7(pVCpu, uNewDr7); 2396 } 2288 2397 } 2398 #ifdef IN_RING0 2399 else if (CPUMIsGuestDebugStateActive(pVCpu)) 2400 { 2401 /* 2402 * Reload the register that was modified. Normally this won't happen 2403 * as we won't intercept DRx writes when not having the hyper debug 2404 * state loaded, but in case we do for some reason we'll simply deal 2405 * with it. 2406 */ 2407 switch (iGstReg) 2408 { 2409 case 0: ASMSetDR0(CPUMGetGuestDR0(pVCpu)); break; 2410 case 1: ASMSetDR1(CPUMGetGuestDR1(pVCpu)); break; 2411 case 2: ASMSetDR2(CPUMGetGuestDR2(pVCpu)); break; 2412 case 3: ASMSetDR3(CPUMGetGuestDR3(pVCpu)); break; 2413 default: 2414 AssertReturn(iGstReg != UINT8_MAX, VERR_INTERNAL_ERROR_3); 2415 } 2416 } 2417 #endif 2289 2418 else 2290 2419 { 2291 #ifdef IN_RC 2292 if (pVCpu->cpum.s.fUseFlags & CPUM_USE_DEBUG_REGS) 2293 { 2294 /** @todo restore host DBx registers. */ 2295 } 2420 /* 2421 * No active debug state any more. In raw-mode this means we have to 2422 * make sure DR7 has everything disabled now, if we armed it already. 2423 * 2424 * In the ring-0 this only happens when we decided to lazy load the 2425 * debug state because it wasn't active, and that didn't change with 2426 * the latest changes, so nothing to do here. 2427 */ 2428 #if defined(IN_RC) 2429 if (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER) 2430 { 2431 ASMSetDR7(X86_DR7_INIT_VAL); 2432 if (pVCpu->cpum.s.Hyper.dr[0]) 2433 ASMSetDR0(0); 2434 if (pVCpu->cpum.s.Hyper.dr[1]) 2435 ASMSetDR1(0); 2436 if (pVCpu->cpum.s.Hyper.dr[2]) 2437 ASMSetDR2(0); 2438 if (pVCpu->cpum.s.Hyper.dr[3]) 2439 ASMSetDR3(0); 2440 pVCpu->cpum.s.fUseFlags &= ~CPUM_USED_DEBUG_REGS_HYPER; 2441 } 2442 2443 #else defined(IN_RING0) 2444 Assert(!CPUMIsHyperDebugStateActive(pVCpu)); /* (can only change while in ring-3) */ 2296 2445 #endif 2297 pVCpu->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS; 2446 pVCpu->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS_HYPER; 2447 2448 /* Clear all the registers. */ 2449 pVCpu->cpum.s.Hyper.dr[7] = X86_DR7_RA1_MASK; 2450 pVCpu->cpum.s.Hyper.dr[3] = 0; 2451 pVCpu->cpum.s.Hyper.dr[2] = 0; 2452 pVCpu->cpum.s.Hyper.dr[1] = 0; 2453 pVCpu->cpum.s.Hyper.dr[0] = 0; 2454 2298 2455 } 2299 2456 Log2(("CPUMRecalcHyperDRx: fUseFlags=%#x %RGr %RGr %RGr %RGr %RGr %RGr\n", 2300 2457 pVCpu->cpum.s.fUseFlags, pVCpu->cpum.s.Hyper.dr[0], pVCpu->cpum.s.Hyper.dr[1], 2301 pVCpu->cpum.s.Hyper.dr[2], pVCpu->cpum.s.Hyper.dr[3], pVCpu->cpum.s.Hyper.dr[6],2302 pVCpu->cpum.s.Hyper.dr[7]));2458 pVCpu->cpum.s.Hyper.dr[2], pVCpu->cpum.s.Hyper.dr[3], pVCpu->cpum.s.Hyper.dr[6], 2459 pVCpu->cpum.s.Hyper.dr[7])); 2303 2460 2304 2461 return VINF_SUCCESS; … … 2721 2878 VMMDECL(bool) CPUMIsHostUsingSysEnter(PVM pVM) 2722 2879 { 2723 return (pVM->cpum.s.fHostUseFlags & CPUM_USE_SYSENTER) != 0;2880 return RT_BOOL(pVM->cpum.s.fHostUseFlags & CPUM_USE_SYSENTER); 2724 2881 } 2725 2882 … … 2733 2890 VMMDECL(bool) CPUMIsHostUsingSysCall(PVM pVM) 2734 2891 { 2735 return (pVM->cpum.s.fHostUseFlags & CPUM_USE_SYSCALL) != 0;2892 return RT_BOOL(pVM->cpum.s.fHostUseFlags & CPUM_USE_SYSCALL); 2736 2893 } 2737 2894 … … 2759 2916 VMMDECL(bool) CPUMIsGuestFPUStateActive(PVMCPU pVCpu) 2760 2917 { 2761 return (pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU) != 0;2918 return RT_BOOL(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU); 2762 2919 } 2763 2920 … … 2766 2923 * Deactivate the FPU/XMM state of the guest OS. 2767 2924 * @param pVCpu Pointer to the VMCPU. 2925 * 2926 * @todo r=bird: Why is this needed? Looks like a workaround for mishandled 2927 * FPU state management. 2768 2928 */ 2769 2929 VMMDECL(void) CPUMDeactivateGuestFPUState(PVMCPU pVCpu) 2770 2930 { 2931 Assert(!(pVCpu->cpum.s.fUseFlags & CPUM_USED_FPU)); 2771 2932 pVCpu->cpum.s.fUseFlags &= ~CPUM_USED_FPU; 2772 2933 } … … 2781 2942 VMMDECL(bool) CPUMIsGuestDebugStateActive(PVMCPU pVCpu) 2782 2943 { 2783 return (pVCpu->cpum.s.fUseFlags & CPUM_USE_DEBUG_REGS) != 0;2944 return RT_BOOL(pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_GUEST); 2784 2945 } 2785 2946 … … 2792 2953 VMMDECL(bool) CPUMIsHyperDebugStateActive(PVMCPU pVCpu) 2793 2954 { 2794 return (pVCpu->cpum.s.fUseFlags & CPUM_USE_DEBUG_REGS_HYPER) != 0;2955 return RT_BOOL(pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER); 2795 2956 } 2796 2957 … … 2801 2962 * @returns boolean 2802 2963 * @param pVM Pointer to the VM. 2964 * @todo This API doesn't make sense any more. 2803 2965 */ 2804 2966 VMMDECL(void) CPUMDeactivateGuestDebugState(PVMCPU pVCpu) 2805 2967 { 2806 pVCpu->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS; 2807 } 2808 2809 2810 /** 2811 * Mark the hypervisor's debug state as inactive. 2812 * 2813 * @returns boolean 2814 * @param pVM Pointer to the VM. 2815 */ 2816 VMMDECL(void) CPUMDeactivateHyperDebugState(PVMCPU pVCpu) 2817 { 2818 pVCpu->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS_HYPER; 2968 Assert(!(pVCpu->cpum.s.fUseFlags & (CPUM_USED_DEBUG_REGS_GUEST | CPUM_USED_DEBUG_REGS_HYPER | CPUM_USED_DEBUG_REGS_HOST))); 2819 2969 } 2820 2970
Note:
See TracChangeset
for help on using the changeset viewer.