qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 5/6] accel/tcg: Introduce tlb_set_page_full


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 5/6] accel/tcg: Introduce tlb_set_page_full
Date: Mon, 5 Sep 2022 23:20:33 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 5/9/22 22:22, Richard Henderson wrote:
Now that we have collected all of the page data into
CPUTLBEntryFull, provide an interface to record that
all in one go, instead of using 4 arguments.  This interface
allows CPUTLBEntryFull to be extended without having to
change the number of arguments.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  include/exec/cpu-defs.h | 14 ++++++++++
  include/exec/exec-all.h | 22 +++++++++++++++
  accel/tcg/cputlb.c      | 62 ++++++++++++++++++++++++++++-------------
  3 files changed, 78 insertions(+), 20 deletions(-)

@@ -1117,35 +1117,36 @@ void tlb_set_page_with_attrs(CPUState *cpu, 
target_ulong vaddr,
      CPUTLBEntry *te, tn;
      hwaddr iotlb, xlat, sz, paddr_page;
      target_ulong vaddr_page;
-    int asidx = cpu_asidx_from_attrs(cpu, attrs);
-    int wp_flags;
+    int asidx, wp_flags, prot;
      bool is_ram, is_romd;
assert_cpu_is_self(cpu); - if (size <= TARGET_PAGE_SIZE) {
+    if (full->lg_page_size <= TARGET_PAGE_BITS) {
          sz = TARGET_PAGE_SIZE;
      } else {
-        tlb_add_large_page(env, mmu_idx, vaddr, size);
-        sz = size;
+        sz = (hwaddr)1 << full->lg_page_size;

Could use BIT_ULL() here.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]