summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2017-09-19 07:26:09 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2017-09-19 07:26:09 -0500
commit1b3f60eba9084f39c9e971fc8676150595468294 (patch)
treec0bd1f5618234eaa3a1d70c547f3be7486bfd357
parent00e8794d3edf4d52fbf605506fe936a665dab15d (diff)
downloadkernel-1b3f60eba9084f39c9e971fc8676150595468294.tar.gz
kernel-1b3f60eba9084f39c9e971fc8676150595468294.tar.xz
kernel-1b3f60eba9084f39c9e971fc8676150595468294.zip
Fix PPC build
-rw-r--r--Revert-KVM-Don-t-accept-obviously-wrong-gsi-values-via-KVM_IRQFD.patch46
-rw-r--r--kernel.spec4
2 files changed, 50 insertions, 0 deletions
diff --git a/Revert-KVM-Don-t-accept-obviously-wrong-gsi-values-via-KVM_IRQFD.patch b/Revert-KVM-Don-t-accept-obviously-wrong-gsi-values-via-KVM_IRQFD.patch
new file mode 100644
index 000000000..ebebceb9e
--- /dev/null
+++ b/Revert-KVM-Don-t-accept-obviously-wrong-gsi-values-via-KVM_IRQFD.patch
@@ -0,0 +1,46 @@
+From patchwork Sat Sep 16 20:12:24 2017
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Subject: Revert "KVM: Don't accept obviously wrong gsi values via KVM_IRQFD"
+From: =?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?= <jschoenh@amazon.de>
+X-Patchwork-Id: 9954473
+Message-Id: <1505592744-31498-1-git-send-email-jschoenh@amazon.de>
+To: Paolo Bonzini <pbonzini@redhat.com>,
+ =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>
+Cc: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <jschoenh@amazon.de>,
+ linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
+ sachinp@linux.vnet.ibm.com,
+ Abdul Haleem <abdhalee@linux.vnet.ibm.com>, kvm@vger.kernel.org
+Date: Sat, 16 Sep 2017 22:12:24 +0200
+
+This reverts commit 36ae3c0a36b7456432fedce38ae2f7bd3e01a563.
+
+The commit broke compilation on !CONFIG_HAVE_KVM_IRQ_ROUTING. Also,
+there may be cases with CONFIG_HAVE_KVM_IRQ_ROUTING, where larger
+gsi values make sense.
+
+As the commit was meant as an early indicator to user space that
+something is wrong, reverting just restores the previous behavior
+where overly large values are ignored when encountered (without
+any direct feedback).
+
+Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
+Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
+---
+ virt/kvm/eventfd.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
+index c608ab4..f2ac53a 100644
+--- a/virt/kvm/eventfd.c
++++ b/virt/kvm/eventfd.c
+@@ -565,8 +565,6 @@ kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args)
+ {
+ if (args->flags & ~(KVM_IRQFD_FLAG_DEASSIGN | KVM_IRQFD_FLAG_RESAMPLE))
+ return -EINVAL;
+- if (args->gsi >= KVM_MAX_IRQ_ROUTES)
+- return -EINVAL;
+
+ if (args->flags & KVM_IRQFD_FLAG_DEASSIGN)
+ return kvm_irqfd_deassign(kvm, args);
diff --git a/kernel.spec b/kernel.spec
index a743b264b..c8b3ce95a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -639,6 +639,9 @@ Patch617: Fix-for-module-sig-verification.patch
Patch618: HID-rmi-Make-sure-the-HID-device-is-opened-on-resume.patch
Patch619: input-rmi4-remove-the-need-for-artifical-IRQ.patch
+# Fixes PPC build
+Patch620: Revert-KVM-Don-t-accept-obviously-wrong-gsi-values-via-KVM_IRQFD.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2196,6 +2199,7 @@ fi
* Tue Sep 19 2017 Justin M. Forbes <jforbes@redhat.com> - 4.14.0-0.rc1.git1.1
- Linux v4.14-rc1-13-gebb2c2437d80
- Reenable debugging options.
+- Fix PPC build
* Mon Sep 18 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.14.0-0.rc1.git0.1
- Linux v4.14-rc1