Changeset 83029 in vbox
- Timestamp:
- Feb 10, 2020 9:18:24 AM (5 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r82968 r83029 1792 1792 1793 1793 ;; 1794 ; Prepares for and executes VMRUN (32 bitsguests)1794 ; Prepares for and executes VMRUN (32-bit register context guests) 1795 1795 ; 1796 1796 ; @returns VBox status code … … 1802 1802 ; 1803 1803 ALIGNCODE(16) 1804 BEGINPROC SVMR0VMRun 1804 BEGINPROC SVMR0VMRun32 1805 1805 %ifdef RT_ARCH_AMD64 ; fake a cdecl stack frame 1806 1806 %ifdef ASM_CALL64_GCC … … 1936 1936 %endif 1937 1937 ret 1938 ENDPROC SVMR0VMRun 1938 ENDPROC SVMR0VMRun32 1939 1939 1940 1940 1941 1941 %ifdef RT_ARCH_AMD64 1942 1942 ;; 1943 ; Prepares for and executes VMRUN (64 bits guests)1943 ; Prepares for and executes VMRUN (64-bit register context) 1944 1944 ; 1945 1945 ; @returns VBox status code … … 1951 1951 ; 1952 1952 ALIGNCODE(16) 1953 BEGINPROC SVMR0VMRun 641953 BEGINPROC SVMR0VMRun 1954 1954 ; Fake a cdecl stack frame 1955 1955 %ifdef ASM_CALL64_GCC … … 2114 2114 add rsp, 6 * xCB 2115 2115 ret 2116 ENDPROC SVMR0VMRun 642116 ENDPROC SVMR0VMRun 2117 2117 %endif ; RT_ARCH_AMD64 2118 2118 -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r83025 r83029 2180 2180 * Selects the appropriate function to run guest code. 2181 2181 * 2182 * @returns VBox status code.2183 2182 * @param pVCpu The cross context virtual CPU structure. 2184 2183 * 2185 2184 * @remarks No-long-jump zone!!! 2186 2185 */ 2187 static int hmR0SvmSelectVMRunHandler(PVMCPUCC pVCpu) 2188 { 2189 if (CPUMIsGuestInLongMode(pVCpu)) 2190 { 2191 #ifndef VBOX_WITH_64_BITS_GUESTS 2192 return VERR_PGM_UNSUPPORTED_SHADOW_PAGING_MODE; 2193 #else 2186 DECLINLINE(void) hmR0SvmSelectVMRunHandler(PVMCPUCC pVCpu) 2187 { 2188 if (pVCpu->CTX_SUFF(pVM)->hm.s.fAllow64BitGuests) 2189 { 2194 2190 # if HC_ARCH_BITS != 64 || ARCH_BITS != 64 2195 2191 # error "Only 64-bit hosts are supported!" 2196 2192 # endif 2197 Assert(pVCpu->CTX_SUFF(pVM)->hm.s.fAllow64BitGuests); /* Guaranteed by hmR3InitFinalizeR0(). */ 2198 /* Guest in long mode, use 64-bit handler (host is 64-bit). */ 2199 pVCpu->hm.s.svm.pfnVMRun = SVMR0VMRun64; 2200 #endif 2193 /* Guest may enter long mode, always use 64-bit handler. */ 2194 pVCpu->hm.s.svm.pfnVMRun = SVMR0VMRun; 2201 2195 } 2202 2196 else 2203 2197 { 2204 /* Guest is not in long mode, use the 32-bit handler. */ 2205 pVCpu->hm.s.svm.pfnVMRun = SVMR0VMRun; 2206 } 2207 return VINF_SUCCESS; 2198 /* Guest is 32-bit only, use the 32-bit handler. */ 2199 pVCpu->hm.s.svm.pfnVMRun = SVMR0VMRun32; 2200 } 2208 2201 } 2209 2202 … … 2363 2356 } 2364 2357 2365 rc = hmR0SvmSelectVMRunHandler(pVCpu); 2366 AssertRCReturn(rc, rc); 2358 hmR0SvmSelectVMRunHandler(pVCpu); 2367 2359 2368 2360 /* Clear any bits that may be set but exported unconditionally or unused/reserved bits. */ -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.h
r82968 r83029 54 54 55 55 /** 56 * Prepares for and executes VMRUN (32-bit guests). 56 * Prepares for and executes VMRUN (32-bit register context). 57 * 58 * @returns VBox status code. 59 * @param pVMCBHostPhys Physical address of host VMCB. 60 * @param pVMCBPhys Physical address of the VMCB. 61 * @param pCtx Pointer to the guest CPU context. 62 * @param pVM The cross context VM structure. (Not used.) 63 * @param pVCpu The cross context virtual CPU structure. (Not used.) 64 */ 65 DECLASM(int) SVMR0VMRun32(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVMCC pVM, PVMCPUCC pVCpu); 66 67 68 /** 69 * Prepares for and executes VMRUN (64-bit register context). 57 70 * 58 71 * @returns VBox status code. … … 64 77 */ 65 78 DECLASM(int) SVMR0VMRun(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVMCC pVM, PVMCPUCC pVCpu); 66 67 68 /**69 * Prepares for and executes VMRUN (64-bit guests).70 *71 * @returns VBox status code.72 * @param pVMCBHostPhys Physical address of host VMCB.73 * @param pVMCBPhys Physical address of the VMCB.74 * @param pCtx Pointer to the guest CPU context.75 * @param pVM The cross context VM structure. (Not used.)76 * @param pVCpu The cross context virtual CPU structure. (Not used.)77 */78 DECLASM(int) SVMR0VMRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVMCC pVM, PVMCPUCC pVCpu);79 79 80 80 /**
Note:
See TracChangeset
for help on using the changeset viewer.

