Changeset 54007 in vbox for trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
- Timestamp:
- Jan 28, 2015 11:10:53 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r53801 r54007 832 832 AssertMsgReturn(pReq->header.size == sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER); 833 833 834 /* Enable this automatically for guests using the old 835 request to report their capabilities. */ 836 /** @todo change this when we next bump the interface version */ 837 pReq->caps |= VMMDEV_GUEST_SUPPORTS_GRAPHICS; 838 if (pThis->guestCaps != pReq->caps) 834 /* Enable VMMDEV_GUEST_SUPPORTS_GRAPHICS automatically for guests using the old 835 * request to report their capabilities. 836 */ 837 const uint32_t fu32Caps = pReq->caps | VMMDEV_GUEST_SUPPORTS_GRAPHICS; 838 839 if (pThis->guestCaps != fu32Caps) 839 840 { 840 841 /* make a copy of supplied information */ 841 pThis->guestCaps = pReq->caps; 842 843 LogRel(("Guest Additions capability report: (0x%x) seamless: %s, hostWindowMapping: %s, graphics: %s\n", 844 pReq->caps, 845 pReq->caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 846 pReq->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no", 847 pReq->caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no")); 842 pThis->guestCaps = fu32Caps; 843 844 LogRel(("Guest Additions capability report (legacy): (0x%x) seamless: %s, hostWindowMapping: %s, graphics: yes\n", 845 fu32Caps, 846 fu32Caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 847 fu32Caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no")); 848 848 849 849 if (pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities) 850 pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pReq->caps);850 pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, fu32Caps); 851 851 } 852 852 return VINF_SUCCESS; … … 866 866 AssertMsgReturn(pReq->header.size == sizeof(*pReq), ("%u\n", pReq->header.size), VERR_INVALID_PARAMETER); 867 867 868 uint32_t const fOldCaps = pThis->guestCaps; NOREF(fOldCaps);869 pThis->guestCaps |= pReq->u32OrMask;870 pThis->guestCaps &= ~pReq->u32NotMask;868 uint32_t fu32Caps = pThis->guestCaps; 869 fu32Caps |= pReq->u32OrMask; 870 fu32Caps &= ~pReq->u32NotMask; 871 871 872 872 LogRel(("Guest Additions capability report: (%#x -> %#x) seamless: %s, hostWindowMapping: %s, graphics: %s\n", 873 fOldCaps, pThis->guestCaps, 874 pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 875 pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no", 876 pThis->guestCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no")); 873 pThis->guestCaps, fu32Caps, 874 fu32Caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no", 875 fu32Caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no", 876 fu32Caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no")); 877 878 pThis->guestCaps = fu32Caps; 877 879 878 880 if (pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities) 879 pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pThis->guestCaps);881 pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, fu32Caps); 880 882 881 883 return VINF_SUCCESS; … … 3671 3673 memset (&pThis->guestInfo, 0, sizeof (pThis->guestInfo)); 3672 3674 RT_ZERO(pThis->guestInfo2); 3675 const bool fCapsChanged = pThis->guestCaps != 0; /* Report transition to 0. */ 3676 pThis->guestCaps = 0; 3673 3677 3674 3678 /* Clear facilities. No need to tell Main as it will get a … … 3719 3723 pThis->fNewGuestFilterMask = 0; 3720 3724 3721 /* This is the default, as Windows and OS/2 guests take this for granted. (Actually, neither does...) */3722 /** @todo change this when we next bump the interface version */3723 const bool fCapsChanged = pThis->guestCaps != VMMDEV_GUEST_SUPPORTS_GRAPHICS;3724 if (fCapsChanged)3725 Log(("vmmdevReset: fCapsChanged=%#x -> %#x\n", pThis->guestCaps, VMMDEV_GUEST_SUPPORTS_GRAPHICS));3726 pThis->guestCaps = VMMDEV_GUEST_SUPPORTS_GRAPHICS; /** @todo r=bird: why? I cannot see this being done at construction?*/3727 3728 3725 /* 3729 3726 * Call the update functions as required. … … 3731 3728 if (fVersionChanged && pThis->pDrv && pThis->pDrv->pfnUpdateGuestInfo) 3732 3729 pThis->pDrv->pfnUpdateGuestInfo(pThis->pDrv, &pThis->guestInfo); 3733 if (fCapsChanged 3730 if (fCapsChanged && pThis->pDrv && pThis->pDrv->pfnUpdateGuestCapabilities) 3734 3731 pThis->pDrv->pfnUpdateGuestCapabilities(pThis->pDrv, pThis->guestCaps); 3735 3732
Note:
See TracChangeset
for help on using the changeset viewer.