qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl
@ 2022-06-09  1:07 Bin Meng
  2022-06-09  1:07 ` [PATCH 2/3] target/riscv: kvm: Set env->misa_ext_mask to the supported value Bin Meng
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Bin Meng @ 2022-06-09  1:07 UTC (permalink / raw)
  To: Alistair Francis; +Cc: qemu-devel, qemu-riscv

env->misa_mxl was already set in the RISC-V cpu init routine, and
validated at the beginning of riscv_cpu_realize(). There is no need
to do a redundant initialization later.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 target/riscv/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index a91253d4bd..61d1737741 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -752,7 +752,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
             ext |= RVJ;
         }
 
-        set_misa(env, env->misa_mxl, ext);
+        env->misa_ext_mask = env->misa_ext = ext;
     }
 
     riscv_cpu_register_gdb_regs_for_features(cs);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-06-16  2:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09  1:07 [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl Bin Meng
2022-06-09  1:07 ` [PATCH 2/3] target/riscv: kvm: Set env->misa_ext_mask to the supported value Bin Meng
2022-06-13  0:34   ` Alistair Francis
2022-06-09  1:07 ` [PATCH 3/3] target/riscv: Skip parsing extensions from properties for KVM Bin Meng
2022-06-13  0:36   ` Alistair Francis
2022-06-13  0:32 ` [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl Alistair Francis
2022-06-13 12:30   ` Bin Meng
2022-06-16  2:33     ` Alistair Francis
2022-06-16  2:41       ` Bin Meng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).