From: Greg Kroah-Hartman Date: Mon, 31 May 2021 11:49:35 +0000 (+0200) Subject: drop queue-5.12/kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch X-Git-Tag: v4.4.271~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7dcd7f2cfc2ab410b42d1fd7cd92af95f6639109;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.12/kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch --- diff --git a/queue-5.12/kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch b/queue-5.12/kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch deleted file mode 100644 index 42bda642318..00000000000 --- a/queue-5.12/kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e3e880bb1518eb10a4b4bb4344ed614d6856f190 Mon Sep 17 00:00:00 2001 -From: Zenghui Yu -Date: Wed, 26 May 2021 22:18:31 +0800 -Subject: KVM: arm64: Resolve all pending PC updates before immediate exit - -From: Zenghui Yu - -commit e3e880bb1518eb10a4b4bb4344ed614d6856f190 upstream. - -Commit 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before -returning to userspace") fixed the PC updating issue by forcing an explicit -synchronisation of the exception state on vcpu exit to userspace. - -However, we forgot to take into account the case where immediate_exit is -set by userspace and KVM_RUN will exit immediately. Fix it by resolving all -pending PC updates before returning to userspace. - -Since __kvm_adjust_pc() relies on a loaded vcpu context, I moved the -immediate_exit checking right after vcpu_load(). We will get some overhead -if immediate_exit is true (which should hopefully be rare). - -Fixes: 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before returning to userspace") -Signed-off-by: Zenghui Yu -Signed-off-by: Marc Zyngier -Link: https://lore.kernel.org/r/20210526141831.1662-1-yuzenghui@huawei.com -Cc: stable@vger.kernel.org # 5.11 -Signed-off-by: Greg Kroah-Hartman ---- - arch/arm64/kvm/arm.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - ---- a/arch/arm64/kvm/arm.c -+++ b/arch/arm64/kvm/arm.c -@@ -715,11 +715,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v - 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; -@@ -913,6 +915,7 @@ static int vcpu_interrupt_line(struct kv - else - set = test_and_clear_bit(bit_index, hcr); - -+out: - /* - * If we didn't change anything, no need to wake up or kick other CPUs - */ diff --git a/queue-5.12/series b/queue-5.12/series index 0f244f0e527..1e67ee1a540 100644 --- a/queue-5.12/series +++ b/queue-5.12/series @@ -71,7 +71,6 @@ kvm-x86-fix-vcpu-preempted-state-from-guest-s-point-of-view.patch kvm-arm64-move-__adjust_pc-out-of-line.patch kvm-arm64-fix-debug-register-indexing.patch kvm-arm64-prevent-mixed-width-vm-creation.patch -kvm-arm64-resolve-all-pending-pc-updates-before-immediate-exit.patch mei-request-autosuspend-after-sending-rx-flow-control.patch staging-iio-cdc-ad7746-avoid-overwrite-of-num_channels.patch iio-gyro-fxas21002c-balance-runtime-power-in-error-path.patch