Changeset 27967 in vbox for trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
- Timestamp:
- Apr 2, 2010 8:05:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r27118 r27967 5 5 6 6 /* 7 * Copyright (C) 2007-20 09Sun Microsystems, Inc.7 * Copyright (C) 2007-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 284 284 * Inflate the balloon by one chunk represented by an R0 memory object. 285 285 * 286 * The caller owns the balloon mutex. 287 * 286 288 * @returns IPRT status code. 287 289 * @param pMemObj Pointer to the R0 memory object. … … 310 312 rc = VbglGRPerform(&pReq->header); 311 313 if (RT_FAILURE(rc)) 312 LogRel(("vboxGuestBalloonInflate: VbglGRPerform failed. rc=% d\n", rc));314 LogRel(("vboxGuestBalloonInflate: VbglGRPerform failed. rc=%Rrc\n", rc)); 313 315 return rc; 314 316 } … … 317 319 /** 318 320 * Deflate the balloon by one chunk - info the host and free the memory object. 321 * 322 * The caller owns the balloon mutex. 319 323 * 320 324 * @returns IPRT status code. … … 341 345 if (RT_FAILURE(rc)) 342 346 { 343 LogRel(("vboxGuestBalloonDeflate: VbglGRPerform failed. rc=% d\n", rc));347 LogRel(("vboxGuestBalloonDeflate: VbglGRPerform failed. rc=%Rrc\n", rc)); 344 348 return rc; 345 349 } … … 363 367 /** 364 368 * Inflate/deflate the memory balloon and notify the host. 369 * 370 * This is a worker used by VBoxGuestCommonIOCtl_CheckMemoryBalloon - it takes 371 * the mutex. 365 372 * 366 373 * @returns VBox status code. … … 368 375 * @param pSession The session. 369 376 * @param cBalloonChunks The new size of the balloon in chunks of 1MB. 370 */ 371 static int vboxGuestSetBalloonSizeKernel(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, uint32_t cBalloonChunks) 377 * @param pfHandleInR3 Where to return the handle-in-ring3 indicator 378 * (VINF_SUCCESS if set). 379 */ 380 static int vboxGuestSetBalloonSizeKernel(PVBOXGUESTDEVEXT pDevExt, uint32_t cBalloonChunks, uint32_t *pfHandleInR3) 372 381 { 373 382 int rc = VINF_SUCCESS; … … 414 423 if (rc == VERR_NOT_SUPPORTED) 415 424 { 416 /* not supported -- fall back to the R3-allocated memory */ 425 /* not supported -- fall back to the R3-allocated memory. */ 426 rc = VINF_SUCCESS; 417 427 pDevExt->MemBalloon.fUseKernelAPI = false; 418 428 Assert(pDevExt->MemBalloon.cChunks == 0); 419 429 Log(("VBoxGuestSetBalloonSizeKernel: PhysNC allocs not supported, falling back to R3 allocs.\n")); 420 430 } 421 /* else if (rc == VERR_NO_MEMORY): cannot allocate more memory => don't try further, just stop here */ 422 /* else: XXX what else can fail? VERR_MEMOBJ_INIT_FAILED for instance. just stop. */ 431 /* else if (rc == VERR_NO_MEMORY || rc == VERR_NO_PHYS_MEMORY): 432 * cannot allocate more memory => don't try further, just stop here */ 433 /* else: XXX what else can fail? VERR_MEMOBJ_INIT_FAILED for instance. just stop. */ 423 434 break; 424 435 } … … 453 464 } 454 465 455 if (!pDevExt->MemBalloon.fUseKernelAPI) 456 { 457 /* R3 to allocate memory, then do ioctl(VBOXGUEST_IOCTL_CHANGE_BALLOON) 458 * and R0 to lock it down and tell the host. */ 459 rc = VERR_NO_PHYS_MEMORY; 460 } 466 /* 467 * Set the handle-in-ring3 indicator. When set Ring-3 will have to work 468 * the balloon changes via the other API. 469 */ 470 *pfHandleInR3 = pDevExt->MemBalloon.fUseKernelAPI ? false : true; 461 471 462 472 return rc; … … 466 476 /** 467 477 * Inflate/deflate the balloon by one chunk. 478 * 479 * Worker for VBoxGuestCommonIOCtl_ChangeMemoryBalloon - it takes the mutex. 468 480 * 469 481 * @returns VBox status code. … … 542 554 } 543 555 556 /* 557 * Try inflate / defalte the balloon as requested. 558 */ 544 559 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon); 545 560 if (RT_FAILURE(rc)) … … 580 595 * Cleanup the memory balloon of a session. 581 596 * 597 * Will request the balloon mutex, so it must be valid and the caller must not 598 * own it already. 599 * 582 600 * @param pDevExt The device extension. 583 * @param pDevExt The session. Can be NULL if no owner check required.601 * @param pDevExt The session. Can be NULL at unload. 584 602 */ 585 603 static void vboxGuestCloseMemBalloon(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession) 586 604 { 587 if ( pSession != (PVBOXGUESTSESSION)NULL 588 && ASMAtomicReadPtr((void * volatile *)&pDevExt->MemBalloon.pOwner) != pSession) 589 return; 590 591 if (pDevExt->MemBalloon.paMemObj) 592 { 593 VMMDevChangeMemBalloon *pReq; 594 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon); 595 if (RT_SUCCESS(rc)) 596 { 597 uint32_t i; 598 for (i = pDevExt->MemBalloon.cChunks; i-- > 0;) 605 RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 606 if ( pDevExt->MemBalloon.pOwner == pSession 607 || pSession == NULL /*unload*/) 608 { 609 if (pDevExt->MemBalloon.paMemObj) 610 { 611 VMMDevChangeMemBalloon *pReq; 612 int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon); 613 if (RT_SUCCESS(rc)) 599 614 { 600 rc = vboxGuestBalloonDeflate(&pDevExt->MemBalloon.paMemObj[i], pReq);601 if (RT_FAILURE(rc))615 uint32_t i; 616 for (i = pDevExt->MemBalloon.cChunks; i-- > 0;) 602 617 { 603 Log(("vboxGuestSetBalloonSize(deflate): failed, rc=%Rrc!\n", rc)); 604 break; 618 rc = vboxGuestBalloonDeflate(&pDevExt->MemBalloon.paMemObj[i], pReq); 619 if (RT_FAILURE(rc)) 620 { 621 LogRel(("vboxGuestCloseMemBalloon: Deflate failed with rc=%Rrc. Will leak %u chunks.\n", 622 rc, pDevExt->MemBalloon.cChunks)); 623 break; 624 } 625 pDevExt->MemBalloon.paMemObj[i] = NIL_RTR0MEMOBJ; 626 pDevExt->MemBalloon.cChunks--; 605 627 } 606 pDevExt->MemBalloon.paMemObj[i] = NIL_RTR0MEMOBJ; 607 pDevExt->MemBalloon.cChunks--; 628 VbglGRFree(&pReq->header); 608 629 } 609 VbglGRFree(&pReq->header); 610 } 611 RTMemFree(pDevExt->MemBalloon.paMemObj); 612 pDevExt->MemBalloon.paMemObj = NULL; 613 } 614 615 ASMAtomicWritePtr((void * volatile *)&pDevExt->MemBalloon.pOwner, NULL); 616 } 617 618 619 /** 620 * Init the variables for memory ballooning. 621 * 622 * @param pDevExt The device extension 623 */ 624 static void vboxGuestInitMemBalloon(PVBOXGUESTDEVEXT pDevExt) 625 { 626 pDevExt->MemBalloon.cChunks = 0; 627 pDevExt->MemBalloon.cMaxChunks = 0; 628 pDevExt->MemBalloon.fUseKernelAPI = true; 629 pDevExt->MemBalloon.paMemObj = NULL; 630 ASMAtomicWritePtr((void * volatile *)&pDevExt->MemBalloon.pOwner, NULL); 630 else 631 LogRel(("vboxGuestCloseMemBalloon: Failed to allocate VMMDev request buffer (rc=%Rrc). Will leak %u chunks.\n", 632 rc, pDevExt->MemBalloon.cChunks)); 633 RTMemFree(pDevExt->MemBalloon.paMemObj); 634 pDevExt->MemBalloon.paMemObj = NULL; 635 } 636 637 pDevExt->MemBalloon.pOwner = NULL; 638 } 639 RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx); 631 640 } 632 641 … … 672 681 pDevExt->fFixedEvents = fFixedEvents; 673 682 pDevExt->hGuestMappings = NIL_RTR0MEMOBJ; 683 pDevExt->EventSpinlock = NIL_RTSPINLOCK; 674 684 pDevExt->pIrqAckEvents = NULL; 675 685 pDevExt->PhysIrqAckEvents = NIL_RTCCPHYS; … … 683 693 pDevExt->FreeList.pTail = NULL; 684 694 pDevExt->f32PendingEvents = 0; 695 pDevExt->u32MousePosChangedSeq = 0; 696 pDevExt->SessionSpinlock = NIL_RTSPINLOCK; 685 697 pDevExt->u32ClipboardClientId = 0; 686 pDevExt->u32MousePosChangedSeq = 0; 698 pDevExt->MemBalloon.hMtx = NIL_RTSEMFASTMUTEX; 699 pDevExt->MemBalloon.cChunks = 0; 700 pDevExt->MemBalloon.cMaxChunks = 0; 701 pDevExt->MemBalloon.fUseKernelAPI = true; 702 pDevExt->MemBalloon.paMemObj = NULL; 703 pDevExt->MemBalloon.pOwner = NULL; 687 704 688 705 /* … … 707 724 708 725 /* 709 * Create the wait and se esion spinlocks.726 * Create the wait and session spinlocks as well as the ballooning mutex. 710 727 */ 711 728 rc = RTSpinlockCreate(&pDevExt->EventSpinlock); … … 714 731 if (RT_FAILURE(rc)) 715 732 { 716 LogRel(("VBoxGuestInitDevExt: failed to spinlock, rc=%d!\n", rc));733 LogRel(("VBoxGuestInitDevExt: failed to create spinlock, rc=%Rrc!\n", rc)); 717 734 if (pDevExt->EventSpinlock != NIL_RTSPINLOCK) 718 735 RTSpinlockDestroy(pDevExt->EventSpinlock); 736 return rc; 737 } 738 739 rc = RTSemFastMutexCreate(&pDevExt->MemBalloon.hMtx); 740 if (RT_FAILURE(rc)) 741 { 742 LogRel(("VBoxGuestInitDevExt: failed to create mutex, rc=%Rrc!\n", rc)); 743 RTSpinlockDestroy(pDevExt->SessionSpinlock); 744 RTSpinlockDestroy(pDevExt->EventSpinlock); 719 745 return rc; 720 746 } … … 748 774 { 749 775 vboxGuestInitFixateGuestMappings(pDevExt); 750 vboxGuestInitMemBalloon(pDevExt);751 776 Log(("VBoxGuestInitDevExt: returns success\n")); 752 777 return VINF_SUCCESS; 753 778 } 754 else 755 779 780 LogRel(("VBoxGuestInitDevExt: VBoxGuestSetGuestCapabilities failed, rc=%Rrc\n", rc)); 756 781 } 757 782 else … … 771 796 LogRel(("VBoxGuestInitDevExt: VbglInit failed, rc=%Rrc\n", rc)); 772 797 798 rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2); 773 799 rc2 = RTSpinlockDestroy(pDevExt->EventSpinlock); AssertRC(rc2); 774 800 rc2 = RTSpinlockDestroy(pDevExt->SessionSpinlock); AssertRC(rc2); … … 816 842 817 843 /* 818 * Unfix the guest mappings, filter all events and clear 819 * all capabilities. 844 * Clean up the bits that involves the host first. 820 845 */ 821 846 vboxGuestTermUnfixGuestMappings(pDevExt); 822 VBoxGuestSetGuestCapabilities(0, UINT32_MAX); 823 vboxGuestSetFilterMask(pDevExt, 0); 847 VBoxGuestSetGuestCapabilities(0, UINT32_MAX); /* clears all capabilities */ 848 vboxGuestSetFilterMask(pDevExt, 0); /* filter all events */ 824 849 vboxGuestCloseMemBalloon(pDevExt, (PVBOXGUESTSESSION)NULL); 825 850 826 851 /* 827 * Cleanup resources.852 * Cleanup all the other resources. 828 853 */ 829 854 rc2 = RTSpinlockDestroy(pDevExt->EventSpinlock); AssertRC(rc2); 830 855 rc2 = RTSpinlockDestroy(pDevExt->SessionSpinlock); AssertRC(rc2); 856 rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2); 831 857 832 858 VBoxGuestDeleteWaitList(&pDevExt->WaitList); … … 1090 1116 if (RT_FAILURE(rc)) 1091 1117 { 1092 Log(("VBoxGuestSetGuestCapabilities: failed to allocate %u (%#x) bytes to cache the request. rc=% d!!\n",1118 Log(("VBoxGuestSetGuestCapabilities: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 1093 1119 sizeof(*pReq), sizeof(*pReq), rc)); 1094 1120 return rc; … … 1383 1409 if (RT_FAILURE(rc)) 1384 1410 { 1385 Log(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc %d!!\n",1411 Log(("VBoxGuestCommonIOCtl: VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n", 1386 1412 cbData, cbReq, enmType, rc)); 1387 1413 return rc; … … 1399 1425 if (RT_FAILURE(rc)) 1400 1426 { 1401 Log(("VBoxGuestCommonIOCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=% d!!\n",1427 Log(("VBoxGuestCommonIOCtl: VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 1402 1428 cbReq, cbReq, rc)); 1403 1429 return rc; … … 1438 1464 if (RT_FAILURE(rc)) 1439 1465 { 1440 Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: failed to allocate %u (%#x) bytes to cache the request. rc=% d!!\n",1466 Log(("VBoxGuestCommonIOCtl: CTL_FILTER_MASK: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 1441 1467 sizeof(*pReq), sizeof(*pReq), rc)); 1442 1468 return rc; … … 1835 1861 * Handle VBOXGUEST_IOCTL_CHECK_BALLOON from R3. 1836 1862 * 1837 * Ask the host for the size of the balloon and try to set it accordingly. If1838 * this fails, return with VERR_NO_PHYS_MEMORY and userland has to provide the1839 * memory.1863 * Ask the host for the size of the balloon and try to set it accordingly. If 1864 * this approach fails because it's not supported, return with fHandleInR3 set 1865 * and let the user land supply memory we can lock via the other ioctl. 1840 1866 * 1841 1867 * @returns VBox status code. … … 1847 1873 * be NULL. 1848 1874 */ 1849 static int VBoxGuestCommonIOCtl_ QueryMemoryBalloon(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession,1875 static int VBoxGuestCommonIOCtl_CheckMemoryBalloon(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, 1850 1876 VBoxGuestCheckBalloonInfo *pInfo, size_t *pcbDataReturned) 1851 1877 { 1852 1878 VMMDevGetMemBalloonChangeRequest *pReq; 1853 PVBOXGUESTSESSION pOwner;1854 1879 int rc; 1855 1880 1856 Log(("VBoxGuestCommonIOCtl: QUERYMEMORYBALLOON\n")); 1857 /* the first user trying to query/change the balloon is the owner */ 1858 if ( !ASMAtomicCmpXchgExPtr((void * volatile *)&pDevExt->MemBalloon.pOwner, (const void*) pSession, 1859 (PVBOXGUESTSESSION)NULL, (void**)&pOwner) 1860 && pOwner != pSession) 1861 return VERR_PERMISSION_DENIED; 1862 1863 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest); 1864 if (RT_FAILURE(rc)) 1865 return rc; 1866 1867 /* This is a response to that event. Setting this bit means that we request the value 1868 * from the host and change the guest memory balloon according to this value. */ 1869 pReq->eventAck = VMMDEV_EVENT_BALLOON_CHANGE_REQUEST; 1870 rc = VbglGRPerform(&pReq->header); 1871 if (RT_FAILURE(rc)) 1872 { 1873 LogRel(("VBoxGuestCommonIOCtl: QUERYMEMORYBALLOON: VbglGRPerform failed. rc=%d\n", rc)); 1874 VbglGRFree(&pReq->header); 1875 return rc; 1876 } 1877 1878 Assert(pDevExt->MemBalloon.cMaxChunks == pReq->cPhysMemChunks || pDevExt->MemBalloon.cMaxChunks == 0); 1879 pDevExt->MemBalloon.cMaxChunks = pReq->cPhysMemChunks; 1880 1881 rc = vboxGuestSetBalloonSizeKernel(pDevExt, pSession, pReq->cBalloonChunks); 1882 /* Ignore out of memory failures */ 1883 if (rc == VERR_NO_MEMORY) 1884 rc = VINF_SUCCESS; 1885 1886 /* Return values */ 1887 pInfo->cBalloonChunks = pReq->cBalloonChunks; 1888 pInfo->fHandleInR3 = false; 1889 if (rc == VERR_NO_PHYS_MEMORY) 1890 { 1891 pInfo->fHandleInR3 = true; 1892 rc = VINF_SUCCESS; 1893 } 1894 1895 VbglGRFree(&pReq->header); 1896 1897 if (pcbDataReturned) 1898 *pcbDataReturned = sizeof(VBoxGuestCheckBalloonInfo); 1899 1900 Log(("VBoxGuestCommonIOCtl: QUERYMEMORYBALLOON returns %d\n", rc)); 1881 Log(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON\n")); 1882 rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 1883 AssertRCReturn(rc, rc); 1884 1885 /* 1886 * The first user trying to query/change the balloon becomes the 1887 * owner and owns it until the session is closed (vboxGuestCloseMemBalloon). 1888 */ 1889 if ( pDevExt->MemBalloon.pOwner != pSession 1890 && pDevExt->MemBalloon.pOwner == NULL) 1891 pDevExt->MemBalloon.pOwner = pSession; 1892 1893 if (pDevExt->MemBalloon.pOwner == pSession) 1894 { 1895 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest); 1896 if (RT_SUCCESS(rc)) 1897 { 1898 /* 1899 * This is a response to that event. Setting this bit means that 1900 * we request the value from the host and change the guest memory 1901 * balloon according to this value. 1902 */ 1903 pReq->eventAck = VMMDEV_EVENT_BALLOON_CHANGE_REQUEST; 1904 rc = VbglGRPerform(&pReq->header); 1905 if (RT_SUCCESS(rc)) 1906 { 1907 Assert(pDevExt->MemBalloon.cMaxChunks == pReq->cPhysMemChunks || pDevExt->MemBalloon.cMaxChunks == 0); 1908 pDevExt->MemBalloon.cMaxChunks = pReq->cPhysMemChunks; 1909 1910 pInfo->cBalloonChunks = pReq->cBalloonChunks; 1911 pInfo->fHandleInR3 = false; 1912 1913 rc = vboxGuestSetBalloonSizeKernel(pDevExt, pReq->cBalloonChunks, &pInfo->fHandleInR3); 1914 /* Ignore various out of memory failures. */ 1915 if ( rc == VERR_NO_MEMORY 1916 || rc == VERR_NO_PHYS_MEMORY 1917 || rc == VERR_NO_CONT_MEMORY) 1918 rc = VINF_SUCCESS; 1919 1920 if (pcbDataReturned) 1921 *pcbDataReturned = sizeof(VBoxGuestCheckBalloonInfo); 1922 } 1923 else 1924 LogRel(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc)); 1925 VbglGRFree(&pReq->header); 1926 } 1927 } 1928 else 1929 rc = VERR_PERMISSION_DENIED; 1930 1931 RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx); 1932 Log(("VBoxGuestCommonIOCtl: CHECK_MEMORY_BALLOON returns %Rrc\n", rc)); 1901 1933 return rc; 1902 1934 } … … 1917 1949 VBoxGuestChangeBalloonInfo *pInfo, size_t *pcbDataReturned) 1918 1950 { 1919 int rc; 1920 PVBOXGUESTSESSION pOwner; 1921 1922 if (pDevExt->MemBalloon.fUseKernelAPI) 1923 return VERR_PERMISSION_DENIED; 1924 1925 /* the first user trying to query/change the balloon is the owner */ 1926 if ( !ASMAtomicCmpXchgExPtr((void * volatile *)&pDevExt->MemBalloon.pOwner, (const void*) pSession, 1927 (PVBOXGUESTSESSION)NULL, (void**)&pOwner) 1928 && pOwner != pSession) 1929 return VERR_PERMISSION_DENIED; 1930 1931 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, pInfo->fInflate); 1932 if (pcbDataReturned) 1933 *pcbDataReturned = 0; 1951 int rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 1952 AssertRCReturn(rc, rc); 1953 1954 if (!pDevExt->MemBalloon.fUseKernelAPI) 1955 { 1956 /* 1957 * The first user trying to query/change the balloon becomes the 1958 * owner and owns it until the session is closed (vboxGuestCloseMemBalloon). 1959 */ 1960 if ( pDevExt->MemBalloon.pOwner != pSession 1961 && pDevExt->MemBalloon.pOwner == NULL) 1962 pDevExt->MemBalloon.pOwner = pSession; 1963 1964 if (pDevExt->MemBalloon.pOwner == pSession) 1965 { 1966 rc = vboxGuestSetBalloonSizeFromUser(pDevExt, pSession, pInfo->u64ChunkAddr, pInfo->fInflate); 1967 if (pcbDataReturned) 1968 *pcbDataReturned = 0; 1969 } 1970 else 1971 rc = VERR_PERMISSION_DENIED; 1972 } 1973 else 1974 rc = VERR_PERMISSION_DENIED; 1975 1976 RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx); 1934 1977 return rc; 1935 1978 } … … 2118 2161 case VBOXGUEST_IOCTL_CHECK_BALLOON: 2119 2162 CHECKRET_MIN_SIZE("CHECK_MEMORY_BALLOON", sizeof(VBoxGuestCheckBalloonInfo)); 2120 rc = VBoxGuestCommonIOCtl_ QueryMemoryBalloon(pDevExt, pSession, (VBoxGuestCheckBalloonInfo *)pvData, pcbDataReturned);2163 rc = VBoxGuestCommonIOCtl_CheckMemoryBalloon(pDevExt, pSession, (VBoxGuestCheckBalloonInfo *)pvData, pcbDataReturned); 2121 2164 break; 2122 2165 … … 2238 2281 } 2239 2282 else /* something is serious wrong... */ 2240 Log(("VBoxGuestCommonISR: acknowledge events failed rc=% d(events=%#x)!!\n",2283 Log(("VBoxGuestCommonISR: acknowledge events failed rc=%Rrc (events=%#x)!!\n", 2241 2284 pReq->header.rc, pReq->events)); 2242 2285 }
Note:
See TracChangeset
for help on using the changeset viewer.