Changeset 87385 in vbox
- Timestamp:
- Jan 22, 2021 11:03:58 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r86464 r87385 53 53 #define VMX_RESTORE_HOST_IDTR RT_BIT(6) 54 54 #define VMX_RESTORE_HOST_GDT_READ_ONLY RT_BIT(7) 55 #define VMX_RESTORE_HOST_REQUIRED RT_BIT(8) 56 #define VMX_RESTORE_HOST_GDT_NEED_WRITABLE RT_BIT(9) 55 #define VMX_RESTORE_HOST_GDT_NEED_WRITABLE RT_BIT(8) 56 /** 57 * This _must_ be the top most bit, so that we can easily that that it and 58 * something else is set w/o having to do two checks like this: 59 * @code 60 * if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) 61 * && (pVCpu->hm.s.vmx.fRestoreHostFlags & ~VMX_RESTORE_HOST_REQUIRED)) 62 * @endcode 63 * Instead we can then do: 64 * @code 65 * if (pVCpu->hm.s.vmx.fRestoreHostFlags > VMX_RESTORE_HOST_REQUIRED) 66 * @endcode 67 */ 68 #define VMX_RESTORE_HOST_REQUIRED RT_BIT(9) 57 69 /** @} */ 58 70 -
trunk/include/VBox/vmm/hm_vmx.mac
r82968 r87385 152 152 %define VMX_VMCS_HOST_RIP 06C16h 153 153 154 %define VMX_RESTORE_HOST_SEL_DS 1h;RT_BIT(0)155 %define VMX_RESTORE_HOST_SEL_ES 2h;RT_BIT(1)156 %define VMX_RESTORE_HOST_SEL_FS 4h;RT_BIT(2)157 %define VMX_RESTORE_HOST_SEL_GS 8h;RT_BIT(3)158 %define VMX_RESTORE_HOST_SEL_TR 10h ;RT_BIT(4)159 %define VMX_RESTORE_HOST_GDTR 20h ;RT_BIT(5)160 %define VMX_RESTORE_HOST_IDTR 40h ;RT_BIT(6)161 %define VMX_RESTORE_HOST_GDT_READ_ONLY 80h ;RT_BIT(7)162 %define VMX_RESTORE_HOST_ REQUIRED100h ;RT_BIT(8)163 %define VMX_RESTORE_HOST_ GDT_NEED_WRITABLE 200h ;RT_BIT(9)154 %define VMX_RESTORE_HOST_SEL_DS 0001h ;RT_BIT(0) 155 %define VMX_RESTORE_HOST_SEL_ES 0002h ;RT_BIT(1) 156 %define VMX_RESTORE_HOST_SEL_FS 0004h ;RT_BIT(2) 157 %define VMX_RESTORE_HOST_SEL_GS 0008h ;RT_BIT(3) 158 %define VMX_RESTORE_HOST_SEL_TR 0010h ;RT_BIT(4) 159 %define VMX_RESTORE_HOST_GDTR 0020h ;RT_BIT(5) 160 %define VMX_RESTORE_HOST_IDTR 0040h ;RT_BIT(6) 161 %define VMX_RESTORE_HOST_GDT_READ_ONLY 0080h ;RT_BIT(7) 162 %define VMX_RESTORE_HOST_GDT_NEED_WRITABLE 0100h ;RT_BIT(8) 163 %define VMX_RESTORE_HOST_REQUIRED 0200h ;RT_BIT(9) - must be the highest bit! 164 164 165 165 ;; C version hm_vmx.h. -
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r87372 r87385 320 320 ; @param pRestoreHost x86: [ebp + 0ch] msc: rdx gcc: rsi Pointer to the RestoreHost struct. 321 321 ; 322 ALIGNCODE( 16)322 ALIGNCODE(64) 323 323 BEGINPROC VMXRestoreHostState 324 324 %ifndef ASM_CALL64_GCC -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r87345 r87385 4549 4549 * asserting. Was observed booting Solaris 10u10 32-bit guest. 4550 4550 */ 4551 if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) 4552 && (pVCpu->hm.s.vmx.fRestoreHostFlags & ~VMX_RESTORE_HOST_REQUIRED)) 4551 if (pVCpu->hm.s.vmx.fRestoreHostFlags > VMX_RESTORE_HOST_REQUIRED) 4553 4552 { 4554 4553 Log4Func(("Restoring Host State: fRestoreHostFlags=%#RX32 HostCpuId=%u\n", pVCpu->hm.s.vmx.fRestoreHostFlags, … … 8218 8217 8219 8218 /* Restore host-state bits that VT-x only restores partially. */ 8220 if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) 8221 && (pVCpu->hm.s.vmx.fRestoreHostFlags & ~VMX_RESTORE_HOST_REQUIRED)) 8219 if (pVCpu->hm.s.vmx.fRestoreHostFlags > VMX_RESTORE_HOST_REQUIRED) 8222 8220 { 8223 8221 Log4Func(("Restoring Host State: fRestoreHostFlags=%#RX32 HostCpuId=%u\n", pVCpu->hm.s.vmx.fRestoreHostFlags, idCpu)); … … 8509 8507 8510 8508 /* Restore host-state bits that VT-x only restores partially. */ 8511 if ( (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED) 8512 && (pVCpu->hm.s.vmx.fRestoreHostFlags & ~VMX_RESTORE_HOST_REQUIRED)) 8509 if (pVCpu->hm.s.vmx.fRestoreHostFlags > VMX_RESTORE_HOST_REQUIRED) 8513 8510 VMXRestoreHostState(pVCpu->hm.s.vmx.fRestoreHostFlags, &pVCpu->hm.s.vmx.RestoreHost); 8514 8511 pVCpu->hm.s.vmx.fRestoreHostFlags = 0;
Note:
See TracChangeset
for help on using the changeset viewer.