fixed VMX+EPT VirtualBox failures
This commit is contained in:
parent
c98decb552
commit
edfff5bf44
@ -1164,17 +1164,18 @@ bx_phy_address BX_CPU_C::translate_linear(bx_address laddr, unsigned user, unsig
|
|||||||
ppf = (bx_phy_address) lpf;
|
ppf = (bx_phy_address) lpf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate physical memory address and fill in TLB cache entry
|
||||||
|
paddress = A20ADDR(ppf | poffset);
|
||||||
|
|
||||||
#if BX_SUPPORT_VMX >= 2
|
#if BX_SUPPORT_VMX >= 2
|
||||||
if (BX_CPU_THIS_PTR in_vmx_guest) {
|
if (BX_CPU_THIS_PTR in_vmx_guest) {
|
||||||
if (SECONDARY_VMEXEC_CONTROL(VMX_VM_EXEC_CTRL3_EPT_ENABLE)) {
|
if (SECONDARY_VMEXEC_CONTROL(VMX_VM_EXEC_CTRL3_EPT_ENABLE)) {
|
||||||
ppf = translate_guest_physical(ppf, laddr, 1, 0, rw);
|
paddress = translate_guest_physical(paddress, laddr, 1, 0, rw);
|
||||||
|
ppf = PPFOf(paddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Calculate physical memory address and fill in TLB cache entry
|
|
||||||
paddress = A20ADDR(ppf | poffset);
|
|
||||||
|
|
||||||
// direct memory access is NOT allowed by default
|
// direct memory access is NOT allowed by default
|
||||||
tlbEntry->lpf = lpf | TLB_HostPtr;
|
tlbEntry->lpf = lpf | TLB_HostPtr;
|
||||||
tlbEntry->lpf_mask = lpf_mask;
|
tlbEntry->lpf_mask = lpf_mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user