Changeset 5695 in vbox
- Timestamp:
- Nov 11, 2007 5:57:57 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r5683 r5695 92 92 HWACCM.cpp \ 93 93 VMMAll/CPUMAllRegs.cpp \ 94 VMMAll/CPUMAllA.asm \95 94 VMMAll/DBGFAll.cpp \ 96 95 VMMAll/IOMAll.cpp \ -
trunk/src/VBox/VMM/VMMAll/CPUMAllA.asm
r5389 r5695 6 6 ; 7 7 ; Copyright (C) 2006-2007 innotek GmbH 8 ; 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as 10 10 ; available from http://www.virtualbox.org. This file is free software; … … 26 26 %include "VBox/cpum.mac" 27 27 28 %ifdef IN_RING3 29 %error "The jump table doesn't link on leopard." 30 %endif 28 31 29 32 ; -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r5389 r5695 442 442 443 443 /** 444 * Set the guest CR0. 445 * 446 * When called in GC, the hyper CR0 may be updated if that is 447 * required. The caller only has to take special action if AM, 448 * WP, PG or PE changes. 449 * 444 * Set the guest CR0. 445 * 446 * When called in GC, the hyper CR0 may be updated if that is 447 * required. The caller only has to take special action if AM, 448 * WP, PG or PE changes. 449 * 450 450 * @returns VINF_SUCCESS (consider it void). 451 451 * @param pVM Pointer to the shared VM structure. … … 456 456 #ifdef IN_GC 457 457 /* 458 * Check if we need to change hypervisor CR0 because 458 * Check if we need to change hypervisor CR0 because 459 459 * of math stuff. 460 460 */ … … 464 464 if (!(pVM->cpum.s.fUseFlags & CPUM_USED_FPU)) 465 465 { 466 /* 467 * We haven't saved the host FPU state yet, so TS and MT are both set 466 /* 467 * We haven't saved the host FPU state yet, so TS and MT are both set 468 468 * and EM should be reflecting the guest EM (it always does this). 469 469 */ … … 490 490 { 491 491 /* 492 * Already saved the state, so we're just mirroring 492 * Already saved the state, so we're just mirroring 493 493 * the guest flags. 494 494 */ 495 495 uint32_t HyperCR0 = ASMGetCR0(); 496 AssertMsg( (HyperCR0 & (X86_CR0_TS | X86_CR0_EM | X86_CR0_MP)) 497 == (pVM->cpum.s.Guest.cr0 & (X86_CR0_TS | X86_CR0_EM | X86_CR0_MP)), 496 AssertMsg( (HyperCR0 & (X86_CR0_TS | X86_CR0_EM | X86_CR0_MP)) 497 == (pVM->cpum.s.Guest.cr0 & (X86_CR0_TS | X86_CR0_EM | X86_CR0_MP)), 498 498 ("%#x %#x\n", HyperCR0, pVM->cpum.s.Guest.cr0)); 499 499 HyperCR0 &= ~(X86_CR0_TS | X86_CR0_EM | X86_CR0_MP); … … 503 503 } 504 504 } 505 #endif 506 507 /* 508 * Check for changes causing TLB flushes (for REM). 509 * The caller is responsible for calling PGM when appropriate. 505 #endif 506 507 /* 508 * Check for changes causing TLB flushes (for REM). 509 * The caller is responsible for calling PGM when appropriate. 510 510 */ 511 511 if ( (cr0 & (X86_CR0_PG | X86_CR0_WP | X86_CR0_PE)) … … 1500 1500 } 1501 1501 1502 1503 #ifndef IN_RING3 1502 1504 /** 1503 1505 * Lazily sync in the FPU/XMM state … … 1511 1513 } 1512 1514 1515 1513 1516 /** 1514 1517 * Restore host FPU/XMM state … … 1522 1525 return CPUMRestoreHostFPUStateAsm(&pVM->cpum.s); 1523 1526 } 1527 #endif /* !IN_RING3 */ 1528 1524 1529 1525 1530 /** … … 1534 1539 } 1535 1540 1541 1536 1542 /** 1537 1543 * Deactivate the FPU/XMM state of the guest OS … … 1542 1548 pVM->cpum.s.fUseFlags &= ~CPUM_USED_FPU; 1543 1549 } 1550 1544 1551 1545 1552 /** … … 1554 1561 } 1555 1562 1563 1556 1564 /** 1557 1565 * Checks if the hidden selector registers are valid … … 1563 1571 pVM->cpum.s.fValidHiddenSelRegs = fValid; 1564 1572 } 1573 1565 1574 1566 1575 /**
Note:
See TracChangeset
for help on using the changeset viewer.