diff mbox series

[PULL,05/29] exec.c: correct the maximum skip value during compact

Message ID 1568644929-9124-6-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/29] i386/kvm: support guest access CORE cstate | expand

Commit Message

Paolo Bonzini Sept. 16, 2019, 2:41 p.m. UTC
From: Wei Yang <richardw.yang@linux.intel.com>

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/exec.c b/exec.c
index d9827ef..d1969bb 100644
--- 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;
     }