KVM_PUT_FULL_STATE is the higher level defined so far in "system/kvm.h"; do not check for more.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/loongarch/kvm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index e5ea2dba9da..45292edcb1c 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -397,7 +397,7 @@ static int kvm_loongarch_put_csr(CPUState *cs, int level) &env->CSR_RVACFG); /* CPUID is constant after poweron, it should be set only once */ - if (level >= KVM_PUT_FULL_STATE) { + if (level == KVM_PUT_FULL_STATE) { ret |= kvm_set_one_reg(cs, KVM_IOC_CSRID(LOONGARCH_CSR_CPUID), &env->CSR_CPUID); } @@ -801,7 +801,7 @@ int kvm_arch_put_registers(CPUState *cs, int level, Error **errp) once = 1; } - if (level >= KVM_PUT_FULL_STATE) { + if (level == KVM_PUT_FULL_STATE) { /* * only KVM_PUT_FULL_STATE is required, kvm kernel will clear * guest_addr for KVM_PUT_RESET_STATE -- 2.51.0
