Message ID | 20210601140738.2026-3-yuzenghui@huawei.com |
---|---|
State | New |
Headers | show |
Series | KVM: arm64: Commit exception state on exit to userspace | expand |
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index c18740a1e541..7730b81aad6d 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -715,11 +715,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) return ret; } - if (run->immediate_exit) - return -EINTR; - vcpu_load(vcpu); + if (run->immediate_exit) { + ret = -EINTR; + goto out; + } + kvm_sigset_activate(vcpu); ret = 1; @@ -892,6 +894,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu) kvm_sigset_deactivate(vcpu); +out: /* * In the unlikely event that we are returning to userspace * with pending exceptions or PC adjustment, commit these