Skip to contentSkip to conversation

suspend/resume not working on tip due to 59abb06

Qemu-devel Stefan Berger 2 participants 4 messages Jan 27, 2012 – Jan 28, 2012

lore
Share & tools
lore
#0 lore raw

After bisecting the following commit seems to be the culprit for the suspend/resume problems that I am seeing with the current tip (73093354418602a2ff5e43cb91a21b17fbf047d8).

commit 59abb06198ee9471e29c970f294eae80c0b39be1

Author: Blue Swirl <[email protected]>
Date:   Sun Jan 22 11:00:44 2012 +0000

Once I revert this patch on the tip everything works fine again...

Stefan

#1 lore raw
Quoted 11 lines · Stefan Berger

After bisecting the following commit seems to be the culprit for the suspend/resume problems that I am seeing with the current tip (73093354418602a2ff5e43cb91a21b17fbf047d8).

commit 59abb06198ee9471e29c970f294eae80c0b39be1

Author: Blue Swirl <[email protected]>
Date:   Sun Jan 22 11:00:44 2012 +0000

Once I revert this patch on the tip everything works fine again...

Stefan

And this patch here gets it to work:

exec-obsolete.h +1 -1
index 03cf35e..a673386 100644
@@ -101,7 +101,7 @@ static inline void cpu_physical_memory_mask_dirty_range(ram_
     end = start + length;
     mask = ~dirty_flags;
     p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS);
-    for (addr = start; addr <= end; addr += TARGET_PAGE_SIZE) {
+    for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) {
         *p++ &= mask;
     }
 }
#2 lore raw
Quoted 23 lines · Stefan Berger
Quoted 5 lines · Stefan Berger

After bisecting the following commit seems to be the culprit for the suspend/resume problems that I am seeing with the current tip (73093354418602a2ff5e43cb91a21b17fbf047d8).

Quoted 9 lines

commit 59abb06198ee9471e29c970f294eae80c0b39be1
Author: Blue Swirl <[email protected]>
Date:   Sun Jan 22 11:00:44 2012 +0000

Once I revert this patch on the tip everything works fine again...

  Stefan

And this patch here gets it to work:

exec-obsolete.h +0 -0
index 03cf35e..a673386 100644
@@ -101,7 +101,7 @@ static inline void

cpu_physical_memory_mask_dirty_range(ram_

Quoted 8 lines

    end = start + length;
    mask = ~dirty_flags;
    p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS);
-    for (addr = start; addr <= end; addr += TARGET_PAGE_SIZE) {
+    for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) { *p++ &= mask;
    }
 }

Nice. Please add a description (something like "Fix suspend/resume broken by off-by-one error in 7309...") and Signed-off-by: line.

#3 lore raw
Quoted 27 lines · Blue Swirl
Quoted 26 lines · Stefan Berger
Quoted 5 lines · Stefan Berger

After bisecting the following commit seems to be the culprit for the suspend/resume problems that I am seeing with the current tip (73093354418602a2ff5e43cb91a21b17fbf047d8).

Quoted 9 lines

commit 59abb06198ee9471e29c970f294eae80c0b39be1
Author: Blue Swirl <[email protected]>
Date:   Sun Jan 22 11:00:44 2012 +0000

Once I revert this patch on the tip everything works fine again...

  Stefan

And this patch here gets it to work:

exec-obsolete.h +0 -0
index 03cf35e..a673386 100644
@@ -101,7 +101,7 @@ static inline void

cpu_physical_memory_mask_dirty_range(ram_
    end = start + length;
    mask = ~dirty_flags;
    p = ram_list.phys_dirty + (start >> TARGET_PAGE_BITS);

Quoted 8 lines
Quoted 5 lines

-    for (addr = start; addr <= end; addr += TARGET_PAGE_SIZE) {
+    for (addr = start; addr < end; addr += TARGET_PAGE_SIZE) { *p++ &= mask;
    }
 }

Nice. Please add a description (something like "Fix suspend/resume broken by off-by-one error in 7309...") and Signed-off-by: line.

On second thought, the code is also broken for case start = (ram_addr_t)-TARGET_PAGE_SIZE, length = TARGET_PAGE_SIZE. I'll make another patch.