VirtualBox

忽略:
時間撮記:
2017-2-23 下午04:34:51 (8 年 以前)
作者:
vboxsync
訊息:

DevPciIch9.cpp: when updating the mappings, refer to the (in the raw/pass-through case cached) config space content. Calling the config space read/write callbacks could confuse the device emulation, if the device-specific write callback does something non-trivial (which could delay the config space from being visible until the write transaction is finished).

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r65847 r65867  
    23512351static void devpciR3UpdateMappings(PPDMPCIDEV pPciDev, bool fP2PBridge)
    23522352{
    2353     /** @todo r=klaus analyze if it's safe to rely on cached config space data, as that's cheaper to read in the raw pci device and pass-through cases. */
    2354     uint16_t const u16Cmd = ich9pciGetWord(pPciDev, VBOX_PCI_COMMAND);
     2353    /* safe, only needs to go to the config space array */
     2354    uint16_t const u16Cmd = PDMPciDevGetWord(pPciDev, VBOX_PCI_COMMAND);
    23552355    for (unsigned iRegion = 0; iRegion < VBOX_PCI_NUM_REGIONS; iRegion++)
    23562356    {
     
    23742374                if (u16Cmd & VBOX_PCI_COMMAND_IO)
    23752375                {
    2376                     uint32_t uIoBase = ich9pciGetDWord(pPciDev, offCfgReg);
     2376                    /* safe, only needs to go to the config space array */
     2377                    uint32_t uIoBase = PDMPciDevGetDWord(pPciDev, offCfgReg);
    23772378                    uIoBase &= ~(uint32_t)(cbRegion - 1);
    23782379
     
    23952396            else if (u16Cmd & VBOX_PCI_COMMAND_MEMORY)
    23962397            {
    2397                 uint64_t uMemBase = ich9pciGetDWord(pPciDev, offCfgReg);
     2398                /* safe, only needs to go to the config space array */
     2399                uint64_t uMemBase = PDMPciDevGetDWord(pPciDev, offCfgReg);
    23982400                if (f64Bit)
    23992401                {
    24002402                    Assert(iRegion < VBOX_PCI_ROM_SLOT);
    2401                     uMemBase |= (uint64_t)ich9pciGetDWord(pPciDev, offCfgReg + 4) << 32;
     2403                    /* safe, only needs to go to the config space array */
     2404                    uMemBase |= (uint64_t)PDMPciDevGetDWord(pPciDev, offCfgReg + 4) << 32;
    24022405                }
    24032406                if (   iRegion != PCI_ROM_SLOT
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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