Skip to contentSkip to conversation

make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add

PATCH New Edge NFV 1 participant 1 message Apr 26, 2021

lore
Share & tools
lore

Edge NFV

author
#0 lore raw

PATCH 1/1 make vfio and DAX cache work together by skipping virtio fs cache section during vfio memory region add

---
 hw/vfio/common.c | 9 +++++++++
 1 file changed, 9 insertions(+)
hw/vfio/common.c +9 -0
index ae5654fcdb..83e15bf7a3 100644
@@ -668,6 +668,15 @@ static void vfio_listener_region_add(MemoryListener *listener,
                 int128_get64(int128_sub(section->size, int128_one())));
         return;
     }
+    
+    /* Do not add virtio fs cache section */                  
+    if (!strcmp(memory_region_name(section->mr), "virtio-fs-cache")) {
+        trace_vfio_listener_region_add_skip(
+                section->offset_within_address_space,
+                section->offset_within_address_space +
+                int128_get64(int128_sub(section->size, int128_one())));
+        return;
+    }  
 
     if (unlikely((section->offset_within_address_space &
                   ~qemu_real_host_page_mask) !=
Signature · 1 line
2.25.1