[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/6] exec.c: correct the maximum skip value during c
From: |
Wei Yang |
Subject: |
[Qemu-devel] [PATCH 5/6] exec.c: correct the maximum skip value during compact |
Date: |
Thu, 21 Mar 2019 16:25:54 +0800 |
skip is defined with 6 bits. So the maximum value should be (1 << 6).
Signed-off-by: Wei Yang <address@hidden>
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exec.c b/exec.c
index 788a8c3f69..6c660f656c 100644
--- a/exec.c
+++ b/exec.c
@@ -322,7 +322,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;
}
--
2.19.1
- [Qemu-devel] [PATCH 0/6] Refine exec, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 1/6] exec.c: replace hwaddr with uint64_t for better understanding, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc(), Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 3/6] exec.c: get nodes_nb_alloc with one MAX calculation, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 4/6] exec.c: subpage->sub_section is already initialized to 0, Wei Yang, 2019/03/21
- [Qemu-devel] [PATCH 5/6] exec.c: correct the maximum skip value during compact,
Wei Yang <=
- [Qemu-devel] [PATCH 6/6] exec.c: add a check between constants to see whether we could skip, Wei Yang, 2019/03/21