diff options
author | Chao Du <duchao@eswincomputing.com> | 2023-12-11 12:40:14 +0300 |
---|---|---|
committer | Tan En De <ende.tan@starfivetech.com> | 2024-05-22 18:31:44 +0300 |
commit | ddf429dc288d15817bc5ce624136d3b917e7964d (patch) | |
tree | 2062ec91c4275d99ea5af05700f8441a93b86ad2 | |
parent | d322a5879fa93e76922ce931855b2a04df8f2c31 (diff) | |
download | linux-ddf429dc288d15817bc5ce624136d3b917e7964d.tar.xz |
RISC-V: KVM: remove a redundant condition in kvm_arch_vcpu_ioctl_run()
[ Upstream commit bcd08e9bae57b5585e438b7fa58aba4b145a59cf ]
The latest ret value is updated by kvm_riscv_vcpu_aia_update(),
the loop will continue if the ret is less than or equal to zero.
So the later condition will never hit. Thus remove it.
Signed-off-by: Chao Du <duchao@eswincomputing.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
-rw-r--r-- | arch/riscv/kvm/vcpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index aa66b0c7e883..481bb210cbca 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -764,8 +764,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) /* Update HVIP CSR for current CPU */ kvm_riscv_update_hvip(vcpu); - if (ret <= 0 || - kvm_riscv_gstage_vmid_ver_changed(&vcpu->kvm->arch.vmid) || + if (kvm_riscv_gstage_vmid_ver_changed(&vcpu->kvm->arch.vmid) || kvm_request_pending(vcpu) || xfer_to_guest_mode_work_pending()) { vcpu->mode = OUTSIDE_GUEST_MODE; |