Changeset 77037 in vbox for trunk/include
- Timestamp:
- Jan 29, 2019 6:46:05 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLibSharedFoldersInline.h
r76720 r77037 497 497 498 498 499 /** Request structure for vboxSfOs2HostReqRename. */ 499 /** Request structure for VbglR0SfHostReqRenameWithSrcContig and 500 * VbglR0SfHostReqRenameWithSrcBuf. */ 500 501 typedef struct VBOXSFRENAMEWITHSRCBUFREQ 501 502 { … … 507 508 } VBOXSFRENAMEWITHSRCBUFREQ; 508 509 510 509 511 /** 510 512 * SHFL_FN_REMOVE request. 511 513 */ 512 DECLINLINE(int) VbglR0SfHostReqRenameWithSrc Buf(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq,513 PSHFLSTRING pSrcStr, uint32_t fFlags)514 DECLINLINE(int) VbglR0SfHostReqRenameWithSrcContig(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq, 515 PSHFLSTRING pSrcStr, RTGCPHYS64 PhysSrcStr, uint32_t fFlags) 514 516 { 515 517 uint32_t const cbReq = RT_UOFFSETOF(VBOXSFRENAMEWITHSRCBUFREQ, StrDstPath.String) … … 528 530 - sizeof(VBGLIOCIDCHGCMFASTCALL); 529 531 pReq->PgLst.flags = VBOX_HGCM_F_PARM_DIRECTION_TO_HOST; 530 pReq->PgLst.aPages[0] = VbglR0PhysHeapGetPhysAddr(pSrcStr); 531 pReq->PgLst.offFirstPage = (uint16_t)(pReq->PgLst.aPages[0] & PAGE_OFFSET_MASK); 532 pReq->PgLst.aPages[0] &= ~(RTGCPHYS)PAGE_OFFSET_MASK; 532 pReq->PgLst.offFirstPage = ((uint16_t)PhysSrcStr) & (uint16_t)(PAGE_OFFSET_MASK); 533 pReq->PgLst.aPages[0] = PhysSrcStr & ~(RTGCPHYS64)PAGE_OFFSET_MASK; 533 534 pReq->PgLst.cPages = 1; 534 535 } … … 562 563 vrc = pReq->Call.header.result; 563 564 return vrc; 565 } 566 567 568 /** 569 * SHFL_FN_REMOVE request. 570 */ 571 DECLINLINE(int) VbglR0SfHostReqRenameWithSrcBuf(SHFLROOT idRoot, VBOXSFRENAMEWITHSRCBUFREQ *pReq, 572 PSHFLSTRING pSrcStr, uint32_t fFlags) 573 { 574 return VbglR0SfHostReqRenameWithSrcContig(idRoot, pReq, pSrcStr, VbglR0PhysHeapGetPhysAddr(pSrcStr), fFlags); 564 575 } 565 576 … … 946 957 } 947 958 948 /** Request structure for vboxSfOs2HostReqListDir. */ 959 /** Request structure for VbglR0SfHostReqListDirContig2x() and 960 * VbglR0SfHostReqListDir(). */ 949 961 typedef struct VBOXSFLISTDIRREQ 950 962 { … … 958 970 /** 959 971 * SHFL_FN_LIST request with separate string buffer and buffers for entries, 960 * both allocated on the physical heap. 961 */ 962 DECLINLINE(int) VbglR0SfHostReqListDir(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir, 963 PSHFLSTRING pFilter, uint32_t fFlags, PSHFLDIRINFO pBuffer, uint32_t cbBuffer) 972 * both physically contiguous allocations. 973 */ 974 DECLINLINE(int) VbglR0SfHostReqListDirContig2x(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir, 975 PSHFLSTRING pFilter, RTGCPHYS64 PhysFilter, uint32_t fFlags, 976 PSHFLDIRINFO pBuffer, RTGCPHYS64 PhysBuffer, uint32_t cbBuffer) 964 977 { 965 978 VBGLIOCIDCHGCMFASTCALL_INIT(&pReq->Hdr, VbglR0PhysHeapGetPhysAddr(pReq), &pReq->Call, g_SfClient.idClient, … … 987 1000 { 988 1001 pReq->Parms.pStrFilter.u.PageList.size = SHFLSTRING_HEADER_SIZE + pFilter->u16Size; 989 RTGCPHYS32 const GCPhys = VbglR0PhysHeapGetPhysAddr(pFilter); 990 uint32_t const offFirstPage = GCPhys & PAGE_OFFSET_MASK; 1002 uint32_t const offFirstPage = (uint32_t)PhysFilter & PAGE_OFFSET_MASK; 991 1003 pReq->StrPgLst.offFirstPage = (uint16_t)offFirstPage; 992 pReq->StrPgLst.aPages[0] = GCPhys- offFirstPage;1004 pReq->StrPgLst.aPages[0] = PhysFilter - offFirstPage; 993 1005 } 994 1006 else … … 1004 1016 pReq->BufPgLst.flags = VBOX_HGCM_F_PARM_DIRECTION_FROM_HOST; 1005 1017 pReq->BufPgLst.cPages = 1; 1006 RTGCPHYS32 const GCPhys = VbglR0PhysHeapGetPhysAddr(pBuffer); 1007 uint32_t const offFirstPage = GCPhys & PAGE_OFFSET_MASK; 1018 uint32_t const offFirstPage = (uint32_t)PhysBuffer & PAGE_OFFSET_MASK; 1008 1019 pReq->BufPgLst.offFirstPage = (uint16_t)offFirstPage; 1009 pReq->BufPgLst.aPages[0] = GCPhys- offFirstPage;1020 pReq->BufPgLst.aPages[0] = PhysBuffer - offFirstPage; 1010 1021 } 1011 1022 else … … 1032 1043 } 1033 1044 1045 /** 1046 * SHFL_FN_LIST request with separate string buffer and buffers for entries, 1047 * both allocated on the physical heap. 1048 */ 1049 DECLINLINE(int) VbglR0SfHostReqListDir(SHFLROOT idRoot, VBOXSFLISTDIRREQ *pReq, uint64_t hHostDir, 1050 PSHFLSTRING pFilter, uint32_t fFlags, PSHFLDIRINFO pBuffer, uint32_t cbBuffer) 1051 { 1052 return VbglR0SfHostReqListDirContig2x(idRoot, 1053 pReq, 1054 hHostDir, 1055 pFilter, 1056 pFilter ? VbglR0PhysHeapGetPhysAddr(pFilter) : NIL_RTGCPHYS64, 1057 fFlags, 1058 pBuffer, 1059 VbglR0PhysHeapGetPhysAddr(pBuffer), 1060 cbBuffer); 1061 } 1062 1034 1063 /** @} */ 1035 1064
Note:
See TracChangeset
for help on using the changeset viewer.