From 623632f3ac8cf26433c353f3208b3fcdd6fff70e Mon Sep 17 00:00:00 2001 From: Wei Yang Date: Wed, 20 Nov 2019 13:15:13 -0500 Subject: [PATCH] exec.c: correct the maximum skip value during compact skip is defined with 6 bits. So the maximum value should be (1 << 6). Backports commit 26ca2075babd7775e246b9eb7da75d6de77eb658 from qemu --- qemu/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/exec.c b/qemu/exec.c index 5669fd8d..e7c9ce5c 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -247,7 +247,7 @@ static void phys_page_compact(PhysPageEntry *lp, Node *nodes, unsigned long *com 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; }