VirtualBox

vbox的更動 3586 路徑 trunk/src/VBox/Devices/VMMDev


忽略:
時間撮記:
2007-7-12 下午02:38:12 (17 年 以前)
作者:
vboxsync
訊息:

Added request for generic guest capability reporting

位置:
trunk/src/VBox/Devices/VMMDev
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r3565 r3586  
    499499                    requestHeader->rc = VERR_VERSION_MISMATCH;
    500500                }
     501            }
     502            break;
     503        }
     504
     505        /* Report guest capabilities */
     506        case VMMDevReq_ReportGuestCapabilities:
     507        {
     508            if (requestHeader->size != sizeof(VMMDevReqGuestCapabilities))
     509            {
     510                AssertMsgFailed(("VMMDev guest caps structure has invalid size!\n"));
     511                requestHeader->rc = VERR_INVALID_PARAMETER;
     512            }
     513            else
     514            {
     515                VMMDevReqGuestCapabilities *guestCaps = (VMMDevReqGuestCapabilities*)requestHeader;
     516
     517                if (pData->guestCaps != guestCaps->caps)
     518                {
     519                    /* make a copy of supplied information */
     520                    pData->guestCaps = guestCaps->caps;
     521
     522                    pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, guestCaps->caps);
     523                }
     524                requestHeader->rc = VINF_SUCCESS;
    501525            }
    502526            break;
     
    15891613
    15901614
    1591 #define VMMDEV_SSM_VERSION 3
     1615#define VMMDEV_SSM_VERSION  4
    15921616
    15931617/**
     
    16181642    SSMR3PutU32(pSSMHandle, pData->u32VideoAccelEnabled);
    16191643
     1644    SSMR3PutU32(pSSMHandle, pData->guestCaps);
     1645
    16201646#ifdef VBOX_HGCM
    16211647    vmmdevHGCMSaveState (pData, pSSMHandle);
     
    16551681    SSMR3GetU32(pSSMHandle, &pData->u32VideoAccelEnabled);
    16561682
     1683    SSMR3GetU32(pSSMHandle, &pData->guestCaps);
     1684
    16571685#ifdef VBOX_HGCM
    16581686    vmmdevHGCMLoadState (pData, pSSMHandle);
     
    16791707        pData->pDrv->pfnUpdateGuestVersion(pData->pDrv, &pData->guestInfo);
    16801708    }
     1709    pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
    16811710
    16821711    return VINF_SUCCESS;
     
    19121941    pData->fu32AdditionsOk = false;
    19131942    memset (&pData->guestInfo, 0, sizeof (pData->guestInfo));
     1943    pData->guestCaps = 0;
    19141944
    19151945    memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest));
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r3379 r3586  
    9696    VBoxGuestInfo guestInfo;
    9797
     98    /** Information reported by guest via VMMDevReportGuestCapabilities
     99     */
     100    uint32_t      guestCaps;
     101
    98102    /** "Additions are Ok" indicator, set to true after processing VMMDevReportGuestInfo,
    99103     * if additions version is compatible. This flag is here to avoid repeated comparing
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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