summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yang2019-03-21 09:25:54 +0100
committerPaolo Bonzini2019-09-16 12:32:20 +0200
commit26ca2075babd7775e246b9eb7da75d6de77eb658 (patch)
treeef8caaebd03f2f04bc098c9c78e6e3c5d7608318
parentexec.c: subpage->sub_section is already initialized to 0 (diff)
downloadqemu-26ca2075babd7775e246b9eb7da75d6de77eb658.tar.gz
qemu-26ca2075babd7775e246b9eb7da75d6de77eb658.tar.xz
qemu-26ca2075babd7775e246b9eb7da75d6de77eb658.zip
exec.c: correct the maximum skip value during compact
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>
-rw-r--r--exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index d9827ef840..d1969bb894 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;
}