[Spice-devel] [PATCH qxl-wddm-dod v4 03/10] Use MmMapIoSpaceEx instead of MmMapIoSpace

Sameeh Jubran sameeh at daynix.com
Sun Sep 11 13:05:22 UTC 2016


Based on a patch by Sandy Stutsman <sstutsma at redhat.com>

Signed-off-by: Sameeh Jubran <sameeh at daynix.com>
---
 qxldod/QxlDod.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index d07c7b4..93fd8c6 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -2009,17 +2009,17 @@ MapFrameBuffer(
         return STATUS_INVALID_PARAMETER;
     }
 
-    *VirtualAddress = MmMapIoSpace(PhysicalAddress,
+    *VirtualAddress = MmMapIoSpaceEx(PhysicalAddress,
                                    Length,
-                                   MmWriteCombined);
+                                   PAGE_WRITECOMBINE | PAGE_READWRITE);
     if (*VirtualAddress == NULL)
     {
         // The underlying call to MmMapIoSpace failed. This may be because, MmWriteCombined
         // isn't supported, so try again with MmNonCached
 
-        *VirtualAddress = MmMapIoSpace(PhysicalAddress,
+        *VirtualAddress = MmMapIoSpaceEx(PhysicalAddress,
                                        Length,
-                                       MmNonCached);
+                                     (ULONG) (PAGE_NOCACHE | PAGE_READWRITE));
         if (*VirtualAddress == NULL)
         {
             DbgPrint(TRACE_LEVEL_ERROR, ("MmMapIoSpace returned a NULL buffer when trying to allocate %lu bytes", Length));
-- 
2.7.4



More information about the Spice-devel mailing list