]> git.proxmox.com Git - mirror_qemu.git/commitdiff
exec.c: correct the maximum skip value during compact
authorWei Yang <richardw.yang@linux.intel.com>
Thu, 21 Mar 2019 08:25:54 +0000 (16:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Sep 2019 10:32:20 +0000 (12:32 +0200)
skip is defined with 6 bits. So the maximum value should be (1 << 6).

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190321082555.21118-6-richardw.yang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c

diff --git a/exec.c b/exec.c
index d9827ef840aae6b8e5f5d83bc24f69ffdf08d24e..d1969bb894694f6d42d6ac0c39fa77172607b8a8 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -324,7 +324,7 @@ static void phys_page_compact(PhysPageEntry *lp, Node *nodes)
     assert(valid_ptr < P_L2_SIZE);
 
     /* Don't compress if it won't fit in the # of bits we have. */
-    if (lp->skip + p[valid_ptr].skip >= (1 << 3)) {
+    if (lp->skip + p[valid_ptr].skip >= (1 << 6)) {
         return;
     }