Message ID | 20241114160131.48616-40-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/tcg: Convert victim tlb to IntervalTree | expand |
On 11/14/24 08:01, Richard Henderson wrote: > The entire operation of ptest is performed within > get_physical_address as part of ACCESS_PTEST. > There is no need to install the page into softmmu. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > target/m68k/helper.c | 10 +--------- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/target/m68k/helper.c b/target/m68k/helper.c > index 1decb6f39c..0a54eca9bb 100644 > --- a/target/m68k/helper.c > +++ b/target/m68k/helper.c > @@ -1460,7 +1460,6 @@ void HELPER(ptest)(CPUM68KState *env, uint32_t addr, uint32_t is_read) > hwaddr physical; > int access_type; > int prot; > - int ret; > target_ulong page_size; > > access_type = ACCESS_PTEST; > @@ -1476,14 +1475,7 @@ void HELPER(ptest)(CPUM68KState *env, uint32_t addr, uint32_t is_read) > > env->mmu.mmusr = 0; > env->mmu.ssw = 0; > - ret = get_physical_address(env, &physical, &prot, addr, > - access_type, &page_size); > - if (ret == 0) { > - tlb_set_page(env_cpu(env), addr & TARGET_PAGE_MASK, > - physical & TARGET_PAGE_MASK, > - prot, access_type & ACCESS_SUPER ? > - MMU_KERNEL_IDX : MMU_USER_IDX, page_size); > - } > + get_physical_address(env, &physical, &prot, addr, access_type, &page_size); > } > > void HELPER(pflush)(CPUM68KState *env, uint32_t addr, uint32_t opmode) Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 1decb6f39c..0a54eca9bb 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -1460,7 +1460,6 @@ void HELPER(ptest)(CPUM68KState *env, uint32_t addr, uint32_t is_read) hwaddr physical; int access_type; int prot; - int ret; target_ulong page_size; access_type = ACCESS_PTEST; @@ -1476,14 +1475,7 @@ void HELPER(ptest)(CPUM68KState *env, uint32_t addr, uint32_t is_read) env->mmu.mmusr = 0; env->mmu.ssw = 0; - ret = get_physical_address(env, &physical, &prot, addr, - access_type, &page_size); - if (ret == 0) { - tlb_set_page(env_cpu(env), addr & TARGET_PAGE_MASK, - physical & TARGET_PAGE_MASK, - prot, access_type & ACCESS_SUPER ? - MMU_KERNEL_IDX : MMU_USER_IDX, page_size); - } + get_physical_address(env, &physical, &prot, addr, access_type, &page_size); } void HELPER(pflush)(CPUM68KState *env, uint32_t addr, uint32_t opmode)
The entire operation of ptest is performed within get_physical_address as part of ACCESS_PTEST. There is no need to install the page into softmmu. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/m68k/helper.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)