Changeset 12692 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Sep 24, 2008 2:54:14 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 36998
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r12681 r12692 655 655 switch(pVM->hwaccm.s.enmShadowMode) 656 656 { 657 case PGMMODE_REAL: 658 case PGMMODE_PROTECTED: /* Protected mode, no paging. */ 659 AssertFailed(); 660 return VERR_PGM_UNSUPPORTED_SHADOW_PAGING_MODE; 661 657 662 case PGMMODE_32_BIT: /* 32-bit paging. */ 658 663 break; … … 673 678 #endif 674 679 675 case PGMMODE_REAL: /* Real mode -> emulated using v86 mode */676 case PGMMODE_PROTECTED: /* Protected mode, no paging -> emulated using identity mapping. */677 680 default: /* shut up gcc */ 678 681 AssertFailed(); -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r12687 r12692 788 788 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_LIMIT, sizeof(VBOXTSS)); 789 789 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_BASE, GCPhys /* phys = virt in this mode */); 790 791 val = X86_DESC_P | X86_SEL_TYPE_SYS_386_TSS_BUSY;792 790 } 793 791 else … … 795 793 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_LIMIT, pCtx->trHid.u32Limit); 796 794 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_BASE, pCtx->trHid.u64Base); 797 798 val = pCtx->trHid.Attr.u; 799 800 /* The TSS selector must be busy. */ 801 if ((val & 0xF) == X86_SEL_TYPE_SYS_286_TSS_AVAIL) 802 val = (val & ~0xF) | X86_SEL_TYPE_SYS_286_TSS_BUSY; 803 else 804 /* Default even if no TR selector has been set (otherwise vmlaunch will fail!) */ 805 val = (val & ~0xF) | X86_SEL_TYPE_SYS_386_TSS_BUSY; 806 } 795 } 796 val = pCtx->trHid.Attr.u; 797 798 /* The TSS selector must be busy. */ 799 if ((val & 0xF) == X86_SEL_TYPE_SYS_286_TSS_AVAIL) 800 val = (val & ~0xF) | X86_SEL_TYPE_SYS_286_TSS_BUSY; 801 else 802 /* Default even if no TR selector has been set (otherwise vmlaunch will fail!) */ 803 val = (val & ~0xF) | X86_SEL_TYPE_SYS_386_TSS_BUSY; 807 804 808 805 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_TR_ACCESS_RIGHTS, val); … … 899 896 switch(pVM->hwaccm.s.enmShadowMode) 900 897 { 898 case PGMMODE_REAL: /* Real mode -> emulated using v86 mode */ 899 case PGMMODE_PROTECTED: /* Protected mode, no paging -> emulated using identity mapping. */ 901 900 case PGMMODE_32_BIT: /* 32-bit paging. */ 902 901 break; … … 916 915 return VERR_PGM_UNSUPPORTED_SHADOW_PAGING_MODE; 917 916 #endif 918 case PGMMODE_REAL: /* Real mode -> emulated using v86 mode */ 919 case PGMMODE_PROTECTED: /* Protected mode, no paging -> emulated using identity mapping. */ 920 default: /* shut up gcc */ 917 default: /* shut up gcc */ 921 918 AssertFailed(); 922 919 return VERR_PGM_UNSUPPORTED_SHADOW_PAGING_MODE; 923 920 } 924 /* Real mode emulation using v86 mode with CR4.VME (interrupt redirection using the int bitmap in the TSS and VIF support) */921 /* Real mode emulation using v86 mode with CR4.VME (interrupt redirection using the int bitmap in the TSS) */ 925 922 if (!(pCtx->cr0 & X86_CR0_PROTECTION_ENABLE)) 926 923 val |= X86_CR4_VME; … … 928 925 rc |= VMXWriteVMCS(VMX_VMCS_GUEST_CR4, val); 929 926 Log2(("Guest CR4 %08x\n", val)); 930 /* AllCR4 flags owned by the host; if the guests attempts to change them, then927 /* CR4 flags owned by the host; if the guests attempts to change them, then 931 928 * the VM will exit. 932 929 */ 933 pVM->hwaccm.s.vmx.cr4_mask = ~0; 934 935 rc |= VMXWriteVMCS(VMX_VMCS_CTRL_CR4_MASK, pVM->hwaccm.s.vmx.cr4_mask); 930 val = X86_CR4_PAE 931 | X86_CR4_PGE 932 | X86_CR4_PSE 933 | X86_CR4_VMXE; 934 pVM->hwaccm.s.vmx.cr4_mask = val; 935 936 rc |= VMXWriteVMCS(VMX_VMCS_CTRL_CR4_MASK, val); 936 937 Log2(("Guest CR4-mask %08x\n", val)); 937 938 AssertRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.