https://bugs.winehq.org/show_bug.cgi?id=37355
--- Comment #16 from Anastasius Focht focht@gmx.net --- Hello,
--- quote --- Correct me if I am wrong, but the specific problem this issue is referring to is still not STAGED. While MmMapLockedPages and MmUnmapLockedPages are implemented, MmMapLockedPagesSpecifyCache still is not implemented. --- quote ---
it's the other way around:
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntoskrnl.exe/ntoskrnl...
--- snip --- 697 @ stub MmMapLockedPages 698 @ stdcall MmMapLockedPagesSpecifyCache(ptr long long ptr long long) 699 @ stub MmMapLockedPagesWithReservedMapping --- snip ---
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntoskrnl.exe/ntoskrnl...
--- snip --- 2188 /*********************************************************************** 2189 * MmMapLockedPagesSpecifyCache (NTOSKRNL.EXE.@) 2190 */ 2191 PVOID WINAPI MmMapLockedPagesSpecifyCache(PMDLX MemoryDescriptorList, KPROCESSOR_MODE AccessMode, MEMORY_CACHING_TYPE CacheType, 2192 PVOID BaseAddress, ULONG BugCheckOnFailure, MM_PAGE_PRIORITY Priority) 2193 { 2194 FIXME("(%p, %u, %u, %p, %u, %u): stub\n", MemoryDescriptorList, AccessMode, CacheType, BaseAddress, BugCheckOnFailure, Priority); 2195 2196 return NULL; 2197 } --- snip ---
The current 'MmMapLockedPagesSpecifyCache()' implementation is not useful at all. The proper way would be to provide a simple-minded implementation of it and use it for 'MmMapLockedPages()' like this:
--- snip --- PVOID WINAPI MmMapLockedPages(PMDL MemoryDescriptorList, KPROCESSOR_MODE AccessMode) { return MmMapLockedPagesSpecifyCache( Mdl, AccessMode, MmCached, NULL, TRUE, HighPagePriority); } --- snip ---
The reason why this ticket is marked 'staged' with that single patch is to have a dedicated ticket reference for this kind of API functionality.
Patchsets such as https://github.com/wine-staging/wine-staging/tree/master/patches/ntoskrnl-St... are rather harmful to integrate at once. You can't dissect properly on regressions if they cover API functionality that is not closely coupled.
Regards