[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 21/34] accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bits
|
From: |
Anton Johansson |
|
Subject: |
[RFC PATCH 21/34] accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bits |
|
Date: |
Fri, 19 Jan 2024 15:40:11 +0100 |
CPU_TLB_DYN_MAX_BITS depends on TARGET_VIRT_ADDR_SPACE_BITS on 64-bit
hosts, and is not yet target independent.
Signed-off-by: Anton Johansson <anjo@rev.ng>
---
accel/tcg/cputlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 967d5da6d4..42be5b6289 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -172,7 +172,7 @@ static void tlb_mmu_resize_locked(CPUTLBDesc *desc,
CPUTLBDescFast *fast,
rate = desc->window_max_entries * 100 / old_size;
if (rate > 70) {
- new_size = MIN(old_size << 1, 1 << CPU_TLB_DYN_MAX_BITS);
+ new_size = MIN(old_size << 1, 1 << tcg_ctx->tlb_dyn_max_bits);
} else if (rate < 30 && window_expired) {
size_t ceil = pow2ceil(desc->window_max_entries);
size_t expected_rate = desc->window_max_entries * 100 / ceil;
--
2.43.0
- [RFC PATCH 14/34] exec: [CPUTLB] Move PAGE_* macros to common header, (continued)
- [RFC PATCH 14/34] exec: [CPUTLB] Move PAGE_* macros to common header, Anton Johansson, 2024/01/19
- [RFC PATCH 16/34] exec: [CPUTLB] Move cpu_*()/cpu_env() to common header, Anton Johansson, 2024/01/19
- [RFC PATCH 20/34] accel/tcg: [CPUTLB] Use TCGContext.guest_mo for memory ordering, Anton Johansson, 2024/01/19
- [RFC PATCH 19/34] accel/tcg: [CPUTLB] Use TCGContext.addr_type instead of TARGET_LONG_BITS, Anton Johansson, 2024/01/19
- [RFC PATCH 23/34] tcg: [CPUTLB] Add `mo_te` field to TCGContext, Anton Johansson, 2024/01/19
- [RFC PATCH 21/34] accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bits,
Anton Johansson <=
- [RFC PATCH 22/34] accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c, Anton Johansson, 2024/01/19
- [RFC PATCH 25/34] accel/tcg: [CPUTLB] Use tcg_ctx->mo_te instead of MO_TE, Anton Johansson, 2024/01/19
- [RFC PATCH 28/34] accel/tcg: Make plugin-gen.c target independent, Anton Johansson, 2024/01/19
- [RFC PATCH 27/34] accel/tcg: Make translate-all.c target independent, Anton Johansson, 2024/01/19
- [RFC PATCH 29/34] accel/tcg: Make tb-maint.c target indpendent, Anton Johansson, 2024/01/19