Skip to contentSkip to conversation

Bump tmem pool version to 1 to fix restore issue when tmem enabled

PATCH Zhenzhong Duan 2 participants 2 messages Sep 19, 2012

lore
Share & tools
lore
#0 lore raw

Restore fail when tmem enabled both in hypervisor and guest. This is due to spec version mismatch when restore a pool.

---

xen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 renamed from xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 +2 -1
diff -r d1c3375c3f11 xen/common/tmem.c
@@ -2397,7 +2397,8 @@
              break;
          rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) |
               (pool->shared ? TMEM_POOL_SHARED : 0) |
-              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT);
+              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) |
+              (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT);
         break;
     case TMEMC_SAVE_GET_POOL_NPAGES:
          if ( pool == NULL )
#1 lore raw
Quoted 10 lines

From: Zhenzhong Duan
Sent: Tuesday, September 18, 2012 9:07 PM
To: [email protected]
Cc: Konrad Wilk; Dan Magenheimer; Feng Jin; [email protected]
Subject: Bump tmem pool version to 1 to fix restore issue when tmem enabled

Restore fail when tmem enabled both in hypervisor and guest. This is due to spec version mismatch when restore a pool.

Thanks zduan!

I think this fix makes tmem fully functional again on xen-unstable.

Quoted 15 lines

---
diff -r d1c3375c3f11 xen/common/tmem.c

xen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 renamed from xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 +2 -1
@@ -2397,7 +2397,8 @@
              break;
          rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) |
               (pool->shared ? TMEM_POOL_SHARED : 0) |
-              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT);
+              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) |
+              (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT);
         break;
     case TMEMC_SAVE_GET_POOL_NPAGES:
          if ( pool == NULL )