VirtualBox

儲存庫 vbox 的更動 12404


忽略:
時間撮記:
2008-9-11 下午02:58:38 (16 年 以前)
作者:
vboxsync
訊息:

Cut off calculated addresses when not in 64 bits mode. (fixes OS/2 guests #3115)

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/SELMAll.cpp

    r10171 r12404  
    127127        }
    128128    }
    129     return (RTGCPTR)(pHiddenSel->u64Base + (RTGCUINTPTR)Addr);
     129    /* AMD64 manual: compatibility mode ignores the high 32 bits when calculating an effective address. */
     130    Assert(pHiddenSel->u64Base <= 0xffffffff);
     131    return ((pHiddenSel->u64Base + (RTGCUINTPTR)Addr) & 0xffffffff);
    130132}
    131133
     
    208210        }
    209211        else
    210             pvFlat = (RTGCPTR)(pHiddenSel->u64Base + (RTGCUINTPTR)Addr);
     212        {
     213            /* AMD64 manual: compatibility mode ignores the high 32 bits when calculating an effective address. */
     214            Assert(pHiddenSel->u64Base <= 0xffffffff);
     215            pvFlat = (RTGCPTR)((pHiddenSel->u64Base + (RTGCUINTPTR)Addr) & 0xffffffff);
     216        }
    211217
    212218        /*
     
    489495        u32Limit      = pHiddenSel->u32Limit;
    490496        pvFlat        = (RTGCPTR)(pHiddenSel->u64Base + (RTGCUINTPTR)Addr);
     497
     498        if (   !CPUMIsGuestInLongMode(pVM)
     499            || !pHiddenSel->Attr.n.u1Long)
     500        {
     501            /* AMD64 manual: compatibility mode ignores the high 32 bits when calculating an effective address. */
     502            pvFlat &= 0xffffffff;
     503        }
    491504    }
    492505    else
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette