Changeset 49522 in vbox
- Timestamp:
- Nov 18, 2013 9:47:07 AM (11 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r49019 r49522 289 289 DECLINLINE(bool) CPUMIsGuestInPAEModeEx(PCPUMCTX pCtx) 290 290 { 291 #ifdef VBOX_WITH_OLD_VTX_CODE292 return ( (pCtx->cr4 & X86_CR4_PAE)293 && CPUMIsGuestInPagedProtectedModeEx(pCtx)294 && !CPUMIsGuestInLongModeEx(pCtx));295 #else296 291 return ( (pCtx->cr4 & X86_CR4_PAE) 297 292 && CPUMIsGuestPagingEnabledEx(pCtx) 298 293 && !(pCtx->msrEFER & MSR_K6_EFER_LME)); 299 #endif300 294 } 301 295 -
trunk/include/VBox/vmm/hm_vmx.h
r49283 r49522 378 378 * @{ 379 379 */ 380 #ifndef VBOX_WITH_OLD_VTX_CODE381 380 # define VMX_VMCS_GUEST_ES_BASE_CACHE_IDX 0 382 381 # define VMX_VMCS_GUEST_CS_BASE_CACHE_IDX 1 … … 397 396 # define VMX_VMCS_GUEST_CR3_CACHE_IDX 15 398 397 # define VMX_VMCS_MAX_NESTED_PAGING_CACHE_IDX (VMX_VMCS_GUEST_CR3_CACHE_IDX + 1) 399 #else /* VBOX_WITH_OLD_VTX_CODE */400 # define VMX_VMCS_GUEST_RIP_CACHE_IDX 0401 # define VMX_VMCS_GUEST_RSP_CACHE_IDX 1402 # define VMX_VMCS_GUEST_RFLAGS_CACHE_IDX 2403 # define VMX_VMCS32_GUEST_INTERRUPTIBILITY_STATE_CACHE_IDX 3404 # define VMX_VMCS_CTRL_CR0_READ_SHADOW_CACHE_IDX 4405 # define VMX_VMCS_GUEST_CR0_CACHE_IDX 5406 # define VMX_VMCS_CTRL_CR4_READ_SHADOW_CACHE_IDX 6407 # define VMX_VMCS_GUEST_CR4_CACHE_IDX 7408 # define VMX_VMCS_GUEST_DR7_CACHE_IDX 8409 # define VMX_VMCS32_GUEST_SYSENTER_CS_CACHE_IDX 9410 # define VMX_VMCS_GUEST_SYSENTER_EIP_CACHE_IDX 10411 # define VMX_VMCS_GUEST_SYSENTER_ESP_CACHE_IDX 11412 # define VMX_VMCS32_GUEST_GDTR_LIMIT_CACHE_IDX 12413 # define VMX_VMCS_GUEST_GDTR_BASE_CACHE_IDX 13414 # define VMX_VMCS32_GUEST_IDTR_LIMIT_CACHE_IDX 14415 # define VMX_VMCS_GUEST_IDTR_BASE_CACHE_IDX 15416 # define VMX_VMCS16_GUEST_FIELD_CS_CACHE_IDX 16417 # define VMX_VMCS32_GUEST_CS_LIMIT_CACHE_IDX 17418 # define VMX_VMCS_GUEST_CS_BASE_CACHE_IDX 18419 # define VMX_VMCS32_GUEST_CS_ACCESS_RIGHTS_CACHE_IDX 19420 # define VMX_VMCS16_GUEST_FIELD_DS_CACHE_IDX 20421 # define VMX_VMCS32_GUEST_DS_LIMIT_CACHE_IDX 21422 # define VMX_VMCS_GUEST_DS_BASE_CACHE_IDX 22423 # define VMX_VMCS32_GUEST_DS_ACCESS_RIGHTS_CACHE_IDX 23424 # define VMX_VMCS16_GUEST_FIELD_ES_CACHE_IDX 24425 # define VMX_VMCS32_GUEST_ES_LIMIT_CACHE_IDX 25426 # define VMX_VMCS_GUEST_ES_BASE_CACHE_IDX 26427 # define VMX_VMCS32_GUEST_ES_ACCESS_RIGHTS_CACHE_IDX 27428 # define VMX_VMCS16_GUEST_FIELD_FS_CACHE_IDX 28429 # define VMX_VMCS32_GUEST_FS_LIMIT_CACHE_IDX 29430 # define VMX_VMCS_GUEST_FS_BASE_CACHE_IDX 30431 # define VMX_VMCS32_GUEST_FS_ACCESS_RIGHTS_CACHE_IDX 31432 # define VMX_VMCS16_GUEST_FIELD_GS_CACHE_IDX 32433 # define VMX_VMCS32_GUEST_GS_LIMIT_CACHE_IDX 33434 # define VMX_VMCS_GUEST_GS_BASE_CACHE_IDX 34435 # define VMX_VMCS32_GUEST_GS_ACCESS_RIGHTS_CACHE_IDX 35436 # define VMX_VMCS16_GUEST_FIELD_SS_CACHE_IDX 36437 # define VMX_VMCS32_GUEST_SS_LIMIT_CACHE_IDX 37438 # define VMX_VMCS_GUEST_SS_BASE_CACHE_IDX 38439 # define VMX_VMCS32_GUEST_SS_ACCESS_RIGHTS_CACHE_IDX 39440 # define VMX_VMCS16_GUEST_FIELD_TR_CACHE_IDX 40441 # define VMX_VMCS32_GUEST_TR_LIMIT_CACHE_IDX 41442 # define VMX_VMCS_GUEST_TR_BASE_CACHE_IDX 42443 # define VMX_VMCS32_GUEST_TR_ACCESS_RIGHTS_CACHE_IDX 43444 # define VMX_VMCS16_GUEST_FIELD_LDTR_CACHE_IDX 44445 # define VMX_VMCS32_GUEST_LDTR_LIMIT_CACHE_IDX 45446 # define VMX_VMCS_GUEST_LDTR_BASE_CACHE_IDX 46447 # define VMX_VMCS32_GUEST_LDTR_ACCESS_RIGHTS_CACHE_IDX 47448 # define VMX_VMCS32_RO_EXIT_REASON_CACHE_IDX 48449 # define VMX_VMCS32_RO_VM_INSTR_ERROR_CACHE_IDX 49450 # define VMX_VMCS32_RO_EXIT_INSTR_LENGTH_CACHE_IDX 50451 # define VMX_VMCS32_RO_EXIT_INTERRUPTION_ERROR_CODE_CACHE_IDX 51452 # define VMX_VMCS32_RO_EXIT_INSTR_INFO_CACHE_IDX 52453 # define VMX_VMCS32_RO_EXIT_INTERRUPTION_INFO_CACHE_IDX 53454 # define VMX_VMCS_RO_EXIT_QUALIFICATION_CACHE_IDX 54455 # define VMX_VMCS32_RO_IDT_INFO_CACHE_IDX 55456 # define VMX_VMCS32_RO_IDT_ERROR_CODE_CACHE_IDX 56457 # define VMX_VMCS_MAX_CACHE_IDX (VMX_VMCS32_RO_IDT_ERROR_CODE_CACHE_IDX + 1)458 # define VMX_VMCS_GUEST_CR3_CACHE_IDX 57459 # define VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_FULL_CACHE_IDX 58460 # define VMX_VMCS_MAX_NESTED_PAGING_CACHE_IDX (VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_FULL_CACHE_IDX + 1)461 #endif /* VBOX_WITH_OLD_VTX_CODE */462 398 /** @} */ 463 399 … … 1492 1428 #define VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_IS_VALID(a) RT_BOOL((a) & VMX_EXIT_INTERRUPTION_INFO_ERROR_CODE_VALID) 1493 1429 #define VMX_EXIT_INTERRUPTION_INFO_NMI_UNBLOCK(a) ((a) & RT_BIT(12)) 1494 #ifdef VBOX_WITH_OLD_VTX_CODE1495 # define VMX_EXIT_INTERRUPTION_INFO_VALID_SHIFT 311496 #endif1497 1430 #define VMX_EXIT_INTERRUPTION_INFO_VALID RT_BIT(31) 1498 1431 #define VMX_EXIT_INTERRUPTION_INFO_IS_VALID(a) RT_BOOL((a) & RT_BIT(31)) … … 2178 2111 #endif 2179 2112 2180 #ifdef VBOX_WITH_OLD_VTX_CODE 2181 # if ARCH_BITS == 64 2182 # define VMXWriteVmcs VMXWriteVmcs64 2183 # else 2184 # define VMXWriteVmcs VMXWriteVmcs32 2185 # endif 2186 #else /* !VBOX_WITH_OLD_VTX_CODE */ 2187 # ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 2188 # define VMXWriteVmcsHstN(idxField, uVal) HMVMX_IS_64BIT_HOST_MODE() ? \ 2113 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 2114 # define VMXWriteVmcsHstN(idxField, uVal) HMVMX_IS_64BIT_HOST_MODE() ? \ 2189 2115 VMXWriteVmcs64(idxField, uVal) \ 2190 2116 : VMXWriteVmcs32(idxField, uVal) 2191 # 2117 # define VMXWriteVmcsGstN(idxField, u64Val) (pVCpu->CTX_SUFF(pVM)->hm.s.fAllow64BitGuests) ? \ 2192 2118 VMXWriteVmcs64(idxField, u64Val) \ 2193 2119 : VMXWriteVmcs32(idxField, u64Val) 2194 # 2195 # 2196 # 2120 #elif ARCH_BITS == 32 2121 # define VMXWriteVmcsHstN VMXWriteVmcs32 2122 # define VMXWriteVmcsGstN(idxField, u64Val) VMXWriteVmcs64Ex(pVCpu, idxField, u64Val) 2197 2123 # else /* ARCH_BITS == 64 */ 2198 # 2199 # 2124 # define VMXWriteVmcsHstN VMXWriteVmcs64 2125 # define VMXWriteVmcsGstN VMXWriteVmcs64 2200 2126 # endif 2201 #endif /* !VBOX_WITH_OLD_VTX_CODE */2202 2127 2203 2128 … … 2345 2270 #endif 2346 2271 2347 #ifdef VBOX_WITH_OLD_VTX_CODE2348 # if ARCH_BITS == 642349 # define VMXReadVmcsField VMXReadVmcs642350 # else2351 # define VMXReadVmcsField VMXReadVmcs322352 # endif2353 #endif2354 2355 2272 /** 2356 2273 * Gets the last instruction error value from the current VMCS
Note:
See TracChangeset
for help on using the changeset viewer.