[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 04/88] target/hppa: Always report one page to tlb_set_page
|
From: |
Richard Henderson |
|
Subject: |
[PATCH v3 04/88] target/hppa: Always report one page to tlb_set_page |
|
Date: |
Wed, 1 Nov 2023 18:28:52 -0700 |
No need to trigger the large_page_mask code unnecessarily.
Drop the now unused HPPATLBEntry.page_size field.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/cpu.h | 5 +++--
target/hppa/mem_helper.c | 11 +++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 84bb6edc60..1480d0237a 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -179,15 +179,16 @@ typedef struct HPPATLBEntry {
IntervalTreeNode itree;
target_ureg pa;
+
+ unsigned entry_valid : 1;
+
unsigned u : 1;
unsigned t : 1;
unsigned d : 1;
unsigned b : 1;
- unsigned page_size : 4;
unsigned ar_type : 3;
unsigned ar_pl1 : 2;
unsigned ar_pl2 : 2;
- unsigned entry_valid : 1;
unsigned access_id : 16;
} HPPATLBEntry;
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index 687ae44ed0..60cae646cc 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -268,9 +268,16 @@ bool hppa_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
trace_hppa_tlb_fill_success(env, addr & TARGET_PAGE_MASK,
phys & TARGET_PAGE_MASK, size, type, mmu_idx);
- /* Success! Store the translation into the QEMU TLB. */
+
+ /*
+ * Success! Store the translation into the QEMU TLB.
+ * Note that we always install a single-page entry, because that
+ * is what works best with softmmu -- anything else will trigger
+ * the large page protection mask. We do not require this,
+ * because we record the large page here in the hppa tlb.
+ */
tlb_set_page(cs, addr & TARGET_PAGE_MASK, phys & TARGET_PAGE_MASK,
- prot, mmu_idx, TARGET_PAGE_SIZE << (ent ? 2 * ent->page_size
: 0));
+ prot, mmu_idx, TARGET_PAGE_SIZE);
return true;
}
--
2.34.1
- [PATCH v3 00/88] target/hppa: Implement hppa64 cpu, Richard Henderson, 2023/11/01
- [PATCH v3 03/88] target/hppa: Use IntervalTreeNode in HPPATLBEntry, Richard Henderson, 2023/11/01
- [PATCH v3 07/88] tcg: Improve expansion of deposit of constant, Richard Henderson, 2023/11/01
- [PATCH v3 10/88] target/hppa: Remove get_temp_tl, Richard Henderson, 2023/11/01
- [PATCH v3 05/88] target/hppa: Split out hppa_flush_tlb_range, Richard Henderson, 2023/11/01
- [PATCH v3 01/88] target/hppa: Include PSW_P in tb flags and mmu index, Richard Henderson, 2023/11/01
- [PATCH v3 02/88] target/hppa: Rename hppa_tlb_entry to HPPATLBEntry, Richard Henderson, 2023/11/01
- [PATCH v3 14/88] target/hppa: Truncate rotate count in trans_shrpw_sar, Richard Henderson, 2023/11/01
- [PATCH v3 09/88] target/hppa: Remove get_temp, Richard Henderson, 2023/11/01
- [PATCH v3 04/88] target/hppa: Always report one page to tlb_set_page,
Richard Henderson <=
- [PATCH v3 18/88] target/hppa: Fix extrw and depw with sar for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 15/88] target/hppa: Fix trans_ds for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 17/88] target/hppa: Fix bb_sar for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 06/88] target/hppa: Populate an interval tree with valid tlb entries, Richard Henderson, 2023/11/01
- [PATCH v3 12/88] target/hppa: Fix hppa64 case in machine.c, Richard Henderson, 2023/11/01
- [PATCH v3 19/88] target/hppa: Introduce TYPE_HPPA64_CPU, Richard Henderson, 2023/11/01
- [PATCH v3 16/88] target/hppa: Fix do_add, do_sub for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 23/88] target/hppa: Update cpu_hppa_get/put_psw for hppa64, Richard Henderson, 2023/11/01
- [PATCH v3 13/88] target/hppa: Fix load in do_load_32, Richard Henderson, 2023/11/01
- [PATCH v3 11/88] target/hppa: Remove load_const, Richard Henderson, 2023/11/01