Message ID | 20220609010724.104033-2-bmeng.cn@gmail.com |
---|---|
State | New |
Headers | show |
Series | [1/3] target/riscv: Remove the redundant initialization of env->misa_mxl | expand |
On Thu, Jun 9, 2022 at 11:09 AM Bin Meng <bmeng.cn@gmail.com> wrote: > > env->misa_ext_mask might be set to the same value of env->misa_ext > in riscv_cpu_realize() based on given properties, but it may differ > from what KVM tells us. > > Let's set the correct env->misa_ext_mask in kvm_arch_init_vcpu(). > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > > target/riscv/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c > index 70b4cff06f..c592980299 100644 > --- a/target/riscv/kvm.c > +++ b/target/riscv/kvm.c > @@ -410,7 +410,7 @@ int kvm_arch_init_vcpu(CPUState *cs) > if (ret) { > return ret; > } > - env->misa_ext = isa; > + env->misa_ext_mask = env->misa_ext = isa; > > return ret; > } > -- > 2.34.1 > >
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index 70b4cff06f..c592980299 100644 --- a/target/riscv/kvm.c +++ b/target/riscv/kvm.c @@ -410,7 +410,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (ret) { return ret; } - env->misa_ext = isa; + env->misa_ext_mask = env->misa_ext = isa; return ret; }
env->misa_ext_mask might be set to the same value of env->misa_ext in riscv_cpu_realize() based on given properties, but it may differ from what KVM tells us. Let's set the correct env->misa_ext_mask in kvm_arch_init_vcpu(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- target/riscv/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)